privacy-screen
privacy-screen copied to clipboard
bug: runtime error: `application tried to present modal view controller on itself`
Plugin version: v4.2.3
Platform(s): iOS
Steps to reproduce:
- just keep the default config
- swipe from the bottom so that the App Switcher opens
- click on the app, so that it opens again
- immediately and quickly (this is important) swipe up from the bottom so that the App Switcher opens
- do this a few times until the said error occurs
I know this is not an ideal reproduction. But I cannot find a consistent/simple way to reproduce this instead. Mostly it happens after trying step 2,3,4 like 2-5 times though
Does the problem still exist with the latest version?
Unfortunately, yes
I can confirm this issue - we have exactly the same problem. After downgrading to 4.2.2, the crashes are gone.
PRs are welcome.
Posso confirmar este problema - temos exatamente o mesmo problema. Após o downgrade para 4.2.2, as falhas desapareceram.
@micbis Hello friend, everything okay? I hope so. Can I ask a question? How do you know it's this plugin that caused the error? I'm also having this error in this topic, but I couldn't reach a conclusion that it was this problem. I'm just curious, but I'm dealing with the same problem.
Posso confirmar este problema - temos exatamente o mesmo problema. Após o downgrade para 4.2.2, as falhas desapareceram.
@micbis Hello friend, everything okay? I hope so. Can I ask a question? How do you know it's this plugin that caused the error? I'm also having this error in this topic, but I couldn't reach a conclusion that it was this problem. I'm just curious, but I'm dealing with the same problem.
Friend, I asked because the errors that appear to me point directly to the plugin. See the image below.
Other errors have a similar description but don't directly show which file. Look at the image below, it's quite similar to the shared error.
I'm not sure if both errors are related. Do you think they might be related?
Regarding the plugin, I'm still on version 4.0.0. I need to update. Another thing is that I couldn't replicate the problem. I see I have the logs, but I can't reproduce it, and even worse, I don't know the impact on the application—whether it crashes, freezes, or sets off fireworks, haha.
Thank
I can confirm the crash is caused by the plugin. As far as I can tell, the plugin tries to display the privacyViewController multiple if handleWillResignActiveNotification is called multiple times by the OS.
@7-plus-t Would you be willing to create a PR?
@robingenz done, see https://github.com/capacitor-community/privacy-screen/pull/93
