Xamarin.forms: [Bug][Android] Problem while navigating between pages after httpclient.PostAsync(...)

Created on 4 Nov 2020  路  8Comments  路  Source: xamarin/Xamarin.Forms

Description

I have a page (DocumentList ) with a list of document (folders) and, when i click in one of them, i open a new page (DocumentEditor), in which i have a button to add some photos (file into the document folder) and another one to send them to an url.
So, the execution flow is the follow:

DocumentList -> DocumentEditor -> AddPhotos

In DocumentEditor i have, as said before, the possibility to send the document (and related photos) to an url through a client.postAsync(String Url, MultipartFormDataContent). I haven't any problem during this operation, but only when i press the back button in the navigation bar or if i execute a Navigation.PopAsync/PopToRootAsync.

I can come back in the prev page (DocumentList), but the title is cutted and, if i want to select another document, it opens a black DocumentEditor Page.

If i don't send the document, i haven't any problem with back button, so, it's definitely a problem with client.postAsync.

This bug is only on Android. Everything is working well on IOS.

Steps to Reproduce

  1. From the mainpage, open a new page with Navigation.PushAsync
  2. Do an httpClient.PostAsync()
  3. Do a Navigation.PopAsync()

Expected Behavior

A normal working page

Actual Behavior

Bugged page

Basic Information

  • Version with issue: i've tested from 4.8.0.1451 to 4.8.0.1560
  • Last known good version: idk
  • IDE: vs 2019
  • Platform Target Frameworks:

    • iOS: n/a

    • Android: 10

  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

DocumentList before postAsync:
https://i.stack.imgur.com/ipkgH.jpg

DocumentEditor before postAsync:
https://i.stack.imgur.com/SeAT2.jpg

DocumentList after postAsync and back button pressed (notice the title):
https://i.stack.imgur.com/aBmV7.jpg

DocumentEditor after selected a document in prev image:
https://i.stack.imgur.com/HlpTx.jpg

Reproduction Link

Workaround

navigation Android unverified bug

All 8 comments

Hello @fedus, this seems a complicated issue and we really need a reproduction to understand what's going on. Can you please upload a small sample ?

Thanks

Hi @rmarinho , sorry for the delay...

here's the sample...ios project is not implemented (or it's partially implemented because i've used shared codes) because i didn't have the bug there:

https://github.com/feduss/SampleProblem12739_

There's some kind of problem with the prev url. Try this, by copy and paste it manually into the browser (because the final "_" is missing cliccking directly in the link):

https://github.com/feduss/SampleProblem12739_

Was this page helpful?
0 / 5 - 0 ratings