question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't show popup if application is paused and then resumed

See original GitHub issue

Using the latest pre-released version: 1.1.3.73-pre

If I run my application on Android, then pressed back button -> application goes to paused mode after that I resume back and cannot show any popup windows anymore.

It simply never returned from await _navigation.PushPopupAsync(page); (The only difference from the examples I can see is that we use FormsAppCompatActivity, NOT FormsApplicationActivity, not sure if it can be a problem)

Then if I tap back button, nothing is happening. Tap it again (second time), get exception:

01-03 17:05:11.009 I/MonoDroid(11178): System.InvalidOperationException: Sequence contains no elements
01-03 17:05:11.009 I/MonoDroid(11178):   at System.Linq.Enumerable.Last[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00010] in <65f4a23934a3468fae9abe3139b55169>:0 
01-03 17:05:11.009 I/MonoDroid(11178):   at Xamarin.Forms.Platform.Android.AppCompat.Platform.HandleBackPressed (System.Object sender, System.EventArgs e) [0x0000a] in D:\agent\_work\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:281 
01-03 17:05:11.009 I/MonoDroid(11178):   at (wrapper delegate-invoke) <Module>:invoke_bool_object_EventArgs (object,System.EventArgs)
01-03 17:05:11.009 I/MonoDroid(11178):   at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnBackPressed () [0x00000] in D:\agent\_work\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:63 
01-03 17:05:11.009 I/MonoDroid(11178):   at Android.App.Activity.n_OnBackPressed (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <c8cab2efd85f442389020057942eca89>:0 
01-03 17:05:11.009 I/MonoDroid(11178):   at (wrapper dynamic-method) System.Object:fe9499a8-27c1-4801-821e-2260ccec42ec (intptr,intptr)
01-03 17:05:11.018 I/System.out(11178): (HTTPLog)-Static: isSBSettingEnabled false

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
rotorgamescommented, Jan 13, 2018

@swapnil591 I think that it must work. You should be able to open a new page after an application resuming. I will review it and will fix it soon

1reaction
rotorgamescommented, Jan 13, 2018

@swapnil591 @wattsdeveloper I have changed some code recently so you can have some problem with it. I have added code which remove each popup pages from PopupStack when the Init method is invoked. I had to do it because Xamarin.Android doesn’t remove static fields from memory when an application is sleeping because of it the PopupStack is not cleaned and you can see old pages which there are not in the display but there are in the PopupStack after an application has been resumed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dialog should resume other application or activity in android
When dialog is displayed, then current activity should be resumed and not paused, if dialog is there. But, When dialog is displaying, current ......
Read more >
Calling showDialog while paused fails to display dialog when ...
The Activity will be resumed but the dialog is not visible. The Activity appears dimmed (like there is a dialog displayed but you...
Read more >
App Pause in Android Q? - Umang Chamaria - Medium
Once an application is in pause state, you will not receive notifications from the app for the rest of the day. The app...
Read more >
macos - All applications got paused after disk space usage ...
To un-pause those paused/not responding applications after you free up some space, try to run this command: pkill -CONT -u $UID.
Read more >
How do you resume a route when it doesn't show where ...
When i restarted the game it said the route was paused, but despite me being in the same place where the app crashed......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found