Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Shell application flickering on back navigation #8581

Closed
RsZoli opened this issue Nov 20, 2019 · 58 comments
Closed

[Bug] Shell application flickering on back navigation #8581

RsZoli opened this issue Nov 20, 2019 · 58 comments
Labels
a/shell 🐚 e/3 🕒 3 in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛
Projects

Comments

@RsZoli
Copy link

RsZoli commented Nov 20, 2019

Description

The navigation animation is flickering, briefly displaying a black screen when navigating back in a Shell application.

Steps to Reproduce

Navigate back.

Expected Behavior

Don't flicker.

Actual Behavior

Flickering.

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE: VS 2019 16.3.9
  • Platform Target Frameworks:
    • iOS: n/a
    • Android: 9.0
    • UWP: n/a
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices: Samsung Galaxy S8, S10

Screenshots

Slow motion video of the issue: https://i.imgur.com/bWAVzgY.mp4

Reproduction Link

@RsZoli RsZoli added s/unverified New report that has yet to be verified t/bug 🐛 labels Nov 20, 2019
@pauldipietro pauldipietro added this to New in Triage Nov 20, 2019
@RsZoli
Copy link
Author

RsZoli commented Nov 21, 2019

A temporary workaround, if you do an override, without animation there is no flickering!

protected override bool OnBackButtonPressed() {Current.Navigation.PopAsync(false); return true;}

@jfversluis
Copy link
Member

jfversluis commented Nov 25, 2019

Hey @z07713! Thanks for report and adding the video as well as a workaround! Great job 😄

Would you by any chance also be able to put together a small reproduction project to rule out that this is caused by any other code than simply navigating?

Also, did you try this on iOS and see the same thing? Or not tried on iOS?

Thanks!

@jfversluis jfversluis added a/shell 🐚 p/Android s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Nov 25, 2019
@jfversluis jfversluis moved this from New to Needs Info in Triage Nov 25, 2019
@RsZoli
Copy link
Author

RsZoli commented Nov 25, 2019

Hey @z07713! Thanks for report and adding the video as well as a workaround! Great job 😄

Would you by any chance also be able to put together a small reproduction project to rule out that this is caused by any other code than simply navigating?

Also, did you try this on iOS and see the same thing? Or not tried on iOS?

Thanks!

Hey @jfversluis , thank you for the reply, here is the repro you have asked for: https://drive.google.com/open?id=1WkGh6QwTOP380gX4RrRsksSGBoJNWeuc

Also, i have not tried this on IOS nor i have the ability to do so, i don't own a Mac.

@jfversluis
Copy link
Member

Awesome, thanks @z07713 !

Definitely see this happening, thanks for the repro.

@jfversluis jfversluis added e/5 🕔 5 and removed s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. s/unverified New report that has yet to be verified labels Nov 25, 2019
@jfversluis jfversluis moved this from Needs Info to Ready For Work in Triage Nov 25, 2019
@samhouts samhouts removed this from Ready For Work in Triage Nov 27, 2019
@djsleurink
Copy link

djsleurink commented Dec 25, 2019

It might be worth noting that the workaround
protected override bool OnBackButtonPressed() {Current.Navigation.PopAsync(false); return true;}
Only works when applied inside the code behind of the AppShell.xaml and does not work when placed on seperate pages. I think this relates to 7072

@lukazh
Copy link

lukazh commented Dec 30, 2019

As a workground, overriding the OnPopAsync of ShellSection to disable animation might be more targeted.

public class CustomShellSection : ShellSection
{
	protected override Task<Page> OnPopAsync(bool animated)
	{
		return base.OnPopAsync(false); // ignore the parameter
	}
}

@jonx
Copy link

jonx commented Jan 6, 2020

@jfversluis for me this seems to be working correctly on iOS (13.3).

Disabling the animation is not an option for us and we were just finalizing our release. We will have to rollback to 4.3 which is bad as it will reopen some bugs mostly in shell and the carousel.

We will probably have to disable some features and release without them which is sad given how long we worked on them.

Is there any workaround besides disabling animation?

Any chance this gets solved before Jan 16? Would be awesome. Thanks.

Note, the PopModal animation does not have the issue.

@jfversluis
Copy link
Member

Sorry to hear that @jonx. Even if we were to fix it before Jan 16, it's unlikely that it will be part of a NuGet we release before then. If this is something that blocks your release I wouldn't bet on that option. Sorry about that.

@jonx
Copy link

jonx commented Jan 7, 2020

It's okay @jfversluis, I understand, thanks for your comment. We'll just have to delay our release.
@z07713 is there a way for you to share your sample again, I can't access your links anymore. I'd like to see if it's really the same problem then I have because for me, I can briefly see appear another screen of my app instead of a black screen (it's in the context of a wizard; when I pop the current page, I see the first page of my wizard briefly). Thanks.
@jfversluis would you have an idea of what change in 4.4 introduced this problem? I'd like to see if there is a way to temporarily work around the problem. Thanks.

@jonx
Copy link

jonx commented Jan 7, 2020

I downgraded to 4.3.991250 and I actually still have the issue, just a little less obvious (because it's faster - quicker, I suppose). I'll do more tests if @z07713 can share his example...

@RsZoli
Copy link
Author

RsZoli commented Jan 10, 2020

@jonx there you go: https://drive.google.com/open?id=19apVlQS0TafFeBT16aCfzvtvCwcweVgS

also, it has 4.3.0.991211 Forms installed :/

@tmuskopf
Copy link

I am having this issue as well. I have tried putting the line:
protected override bool OnBackButtonPressed() { Current.Navigation.PopAsync(false); return true; }
in my appShell.xaml.cs and the Flashing is still present. If someone could help me understand the work around... That would be awesome!

@lazmeister
Copy link

Happening to us as well, since 4.3 the flicker has been around on Android.

@ahmedalejo
Copy link

ahmedalejo commented Mar 28, 2020

Just discovered this bug is on it´s one year anniversary [Shell] navigation - flickering #5755

@angelru
Copy link

angelru commented Mar 31, 2020

The same issue here when goback, flickering screen.

For example:
https://github.com/mallibone/ShellLoginSample

@PureWeen
Copy link
Contributor

PureWeen commented Apr 1, 2020

Thank you for the exploration @ahmedalejo it made this one super easy to track down and fix

#10158

@PureWeen PureWeen moved this from To do (blockers) to In Review in Shell Apr 1, 2020
@PureWeen PureWeen moved this from To do to In progress in Android Ready For Work Apr 1, 2020
@PureWeen
Copy link
Contributor

PureWeen commented Apr 1, 2020

Once the build is done if anyone wants to test the nugets and let me know if the issue is resolved that would be helpful

https://dev.azure.com/xamarin/public/_build/results?buildId=16155&view=results

@PureWeen
Copy link
Contributor

PureWeen commented Apr 1, 2020

I tested the nuget with the xaminals sample

#6294

And with this nuget the flickering no longer occurs

@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Apr 1, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Apr 1, 2020
@AndyL069
Copy link

AndyL069 commented Apr 1, 2020

@PureWeen Ok so I did a test:

I created a new Shell Sample App with Xamarin Forms 4.3.0.908675 -> No flickering
Then I updated to latest stable 4.5.0.495 -> Flickering
Then I updated to your newest release 4.6.0.1693 -> No flickering

Great work! Hope others will be able to confirm this.

@angelru
Copy link

angelru commented Apr 1, 2020

@PureWeen Ok so I did a test:

I created a new Shell Sample App with Xamarin Forms 4.3.0.908675 -> No flickering
Then I updated to latest stable 4.5.0.495 -> Flickering
Then I updated to your newest release 4.6.0.1693 -> No flickering

Great work! Hope others will be able to confirm this.

@AndreasLichtsinn can't find Xamarin Forms 4.6.0.1693

@RsZoli
Copy link
Author

RsZoli commented Apr 1, 2020

@PureWeen Ok so I did a test:

I created a new Shell Sample App with Xamarin Forms 4.3.0.908675 -> No flickering
Then I updated to latest stable 4.5.0.495 -> Flickering
Then I updated to your newest release 4.6.0.1693 -> No flickering

Great work! Hope others will be able to confirm this.

@AndreasLichtsinn i can't find the 1693 build either! Also, the 4.7.0.531-nightly still flickers :/

@AndyL069
Copy link

AndyL069 commented Apr 1, 2020

@angelru @RsZoli It's in the published artifacts that PureWeen posted
image

@PureWeen
Copy link
Contributor

PureWeen commented Apr 1, 2020

@angelru Thank you for testing!!!!

@angelru
Copy link

angelru commented Apr 1, 2020

@angelru Thank you for testing!!!!

@PureWeen I couldn't test, I can't download

@PureWeen
Copy link
Contributor

PureWeen commented Apr 1, 2020

Oh you were quoting @AndreasLichtsinn :-)

Thank you @AndreasLichtsinn for testing!!!

@AndyL069
Copy link

AndyL069 commented Apr 1, 2020

@angelru
Go to link:
https://dev.azure.com/xamarin/public/_build/results?buildId=16155&view=results
Click here:
image
Then here:
image
Then unpack the zip and create a local nuget package source to this folder:
image
Then choose this local package source and install it from there:
image

@angelru
Copy link

angelru commented Apr 2, 2020

@angelru
Go to link:
https://dev.azure.com/xamarin/public/_build/results?buildId=16155&view=results
Click here:
image
Then here:
image
Then unpack the zip and create a local nuget package source to this folder:
image
Then choose this local package source and install it from there:
image

Thanks a lot!!! it works!

@tdamir
Copy link

tdamir commented Apr 2, 2020

I can confirm that there is no flicker in Xamarin Forms 4.6.0.1693.

Thanks!

@samhouts samhouts moved this from In Progress to Done in v4.6.0 Apr 2, 2020
@samhouts
Copy link
Member

samhouts commented May 1, 2020

closed by #10158

@samhouts samhouts closed this as completed May 1, 2020
Android Ready For Work automation moved this from In progress to Done May 1, 2020
Shell automation moved this from In Review to Done May 1, 2020
@samhouts samhouts removed this from Done in Android Ready For Work May 31, 2020
@samhouts samhouts removed this from Done in Shell May 31, 2020
@baneageorge
Copy link

I have the same issue with the latest Xamarin forms 4.8. I identified that on iOS the pages that have labels with TextType='Html' causes the issue...

I opened a new issue. #12385

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/shell 🐚 e/3 🕒 3 in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛
Projects
No open projects
v4.6.0
  
Done
Development

No branches or pull requests