Open NoamMani opened 2 years ago
@dimonovdd public string PrintKeyWindow() { if (UIApplication.SharedApplication.KeyWindow == null) { return "Key Window in Null"; } var keyWindow = UIApplication.SharedApplication.KeyWindow.ToString(); return keyWindow; }
Thnx, I think that I have idea
@dimonovdd Do you want to share with us? :)
I'll try it tonight
Sorry I've been very busy. I've checked few strange ways and I can't reproduce this error. But I think that PR #717 should solve it
@dimonovdd thanks, do you know if it will be integrated into the next Rg.Popup nuget version? we can test it on our side.
Having this issue on our production app on iOS devices 15+ massively.
Turns out I have similar crashes in the code that references UIApplication.SharedApplication.KeyWindow
Its unusual how some production apps are having issues and some arent.
I haven't noticed any production issues on any of my iOS 15 devices, however lets hope this sorts out this slippery issue
yeah I'm not even able to reproduce it myself locally. Crazy stuff. But I will try it with some paths like opening the app from app links, background-foreground stuff, etc.
I have the same issue on my iOS 15+ device, but it is a race condition. If I click a button that will show a pop-up, right when the app started, then the KeyWindow
is null
and throws the exception. If I wait a few seconds longer, then it won't happen as the KeyWindow
is known then.
Just here to say this bug is not reproducing any more with the latest version
@ramonB1996 is right, it's still happening but not always.
Hi,
🐛 Bug Report
On iOS 15, sometimes we got this exception when we try to pop a specific popup:
`Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Rg.Plugins.Popup.IOS.Impl.PopupPlatformIos.AddAsync (Rg.Plugins.Popup.Pages.PopupPage page) <0x105f87294 + 0x00460> in <c764561bc21b420689a747c209523bf2#9d0a4ec250688d50b764561a6d88ab00>:0 at Rg.Plugins.Popup.Services.PopupNavigationImpl.AddAsync (Rg.Plugins.Popup.Pages.PopupPage page) <0x105f897e8 + 0x0003f> in <c764561bc21b420689a747c209523bf2#9d0a4ec250688d50b764561a6d88ab00>:0 at Rg.Plugins.Popup.Services.PopupNavigationImpl+<>cDisplayClass20_0.b0 () <0x105f90804 + 0x0007b> in <c764561bc21b420689a747c209523bf2#9d0a4ec250688d50b764561a6d88ab00>:0
at Rg.Plugins.Popup.Services.PopupNavigationImpl+<>cDisplayClass28_0.b 0 () <0x105f82440 + 0x0018b> in <c764561bc21b420689a747c209523bf2#9d0a4ec250688d50b764561a6d88ab00>:0
at Rg.Plugins.Popup.Services.PopupNavigationImpl+<>cDisplayClass23_0.b0 () <0x105f81c90 + 0x001e7> in <c764561bc21b420689a747c209523bf2#9d0a4ec250688d50b764561a6d88ab00>:0
at Rg.Plugins.Popup.Services.PopupNavigationImpl+<>cDisplayClass28_0.b 0 () <0x105f82440 + 0x0018b> in <c764561bc21b420689a747c209523bf2#9d0a4ec250688d50b764561a6d88ab00>:0
Note we call "RemovePageAsync" and we got an exception from the "AddAsync" method.
Expected behavior
Pop the specific popup.
Configuration
Version: 2.0.0.13
Platform:
Thanks.