NRE on Android when a new activity is opened
See original GitHub issueThis issue has been observed on Android 9 and 10 The problem exists on the current master branch as well as v7.2.1046
The issue is reproducible in the sample app that is part of this project too. I have attached a video showing steps to reproduce the issue along with the code I modified to log the exception.
Essentially Android creates a new activity which I expect should return the app to the initial page. I have also tried creating this scenario with Xamarin Forms and Rg.Plugins.Popup (without Prism). In this case, the navigation seems to work fine.
System.NullReferenceException: Object reference not set to an instance of an object.
at Prism.Common.PageUtilities.GetCurrentPage (Xamarin.Forms.Page mainPage) [0x00002] in /_/src/Forms/Prism.Forms/Common/PageUtilities.cs:255
at Prism.Plugin.Popups.PopupPageNavigationService.DoPush (Xamarin.Forms.Page currentPage, Xamarin.Forms.Page page, System.Nullable`1[T] useModalNavigation, System.Boolean animated, System.Boolean insertBeforeLast, System.Int32 navigationOffset) [0x00218] in
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Tasks and the back stack
A new activity, by default, is launched into the task of the activity that called startActivity() . It's pushed onto the same back...
Read more >Activity opened twice - android
This app lets its user review certain items and comment on them. Activity A is started when the app is launched. If the...
Read more >Android development retrofit with kotlin. You can now extract
Android development retrofit with kotlin. You can now extract the business logic code to the Kotlin Multiplatform shared module and make it ...
Read more >Home - NRI
Absolute trust is an Nri loan againest property from sbi. Total reliability is an NRI car loan from sbi. Peace of mind is...
Read more >Paypal closed my account. This one almost got me
This was so that I could open a new account. In the left-hand pane, click "Activity … Transfer money online in seconds with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jbachelor I’ve seen the problem that you have described in some scenarios too. However, it is different from the issue I have reported here. I have implemented a workaround in my app to get rid of the Task.Delay.
Create a popup pop observable which subscribes to the PopupNavigation instance in Rg.Plugins.Popup
Wait for the popup to get cleared before any further navigation
This may work for you too.
@pravincar as this has been reported by both @jbachelor and @jdarmody as not happening anymore I’m going to close the issue. If it continues to please let me know and we’ll reopen the issue.