Closed hbock-42 closed 11 months ago
👋 @hbock-42 Thank you for bringing this to our attention. We've just a released an update to our system that may resolve this issue. Could you please try restarting the app, or even better re-install and fresh build and try again? Let us know if you continue to see the hang up.
Hello @Ariflo , thank you for the quick update.
As you suggested a fress build was necessary, but the problem is solved. Rebuilding the project after flutter clean was not enough, I had to manually uninstall the application from my phone and reinstall it to solve the problem (I can confirm this is required since I had our professional app installed, and the reproducible project installed, and for both of them, just rebuilding was not enough).
So problem solved, I just have to figure out how to make my customers delete then reinstall the application
Is there something we can do to prevent our users to be able de delete then re-install the application? Maybe we could delete some files generated the first time the magic SDK is used (shared pref or I don't know)? It would force us to make a new version of our app and force our users to update but this is definitely not a problem
Is there something we can do to prevent our users to be able de delete then re-install the application? Maybe we could delete some files generated the first time the magic SDK is used (shared pref or I don't know)? It would force us to make a new version of our app and force our users to update but this is definitely not a problem
@hbock-42 unfortunately the problem stems from data put in the local storage of the webview that our SDK utilizes. With that in mind, the only way to clear the cache of a webview on an iPhone is to uninstall and re-install the app. 😢
Our sincerest apologies, as we know this solution is not ideal. For now we are suggesting that our developers release an empty update to encourage their users to re-install the app. As is suggested here
Problem
On ios, when we try to use the
Magic.instance.user.isLoggedIn()
method, the app enters an unknown state (aka not crashing, but theisLoggedIn
method never returns.Test configuration
xcode 15.0.1 ios 16.6.1 iPhone SE (physical device)
flutter 3.3.9 + magic SDK 5.0.0 flutter 3.16.0 + magic SDK 5.0.0 flutter 3.10.1 + magic SDK 5.0.0 flutter 3.10.1 + magic SDK 2.0.2
What I have found so far
Messages are being dequeue in
magic_sdk.relayer.webview.dart
, but I suspect the ios Webview crashes duringrunJavaScript
execution:Since
_webViewCtrl.runJavaScript
is a future and is not awaited (which is normal here), I cannot be sure that the problem occurs here, but since it calls the platform specificrunJavaScript
method I cannot debug any further.When the problem occurs, this appears in the terminal:
Sample code
Magic.instance.user.isLoggedIn()
and "stub" version to see the demo works no problem with a random Future.