Closed yuri-lomashko-itechart closed 3 years ago
I completely agree with this option to fix the problem.
That looks like the correct way to fix that stack trace - if you propose a PR I can merge + release @yuri-lomashko-itechart :pray:
2.1.1 is out with the fix :rocket:
https://github.com/invertase/react-native-apple-authentication/releases/tag/v2.1.1
Thanks for the quick release 👍
Unfortunately on v2.1.2 still occurs, 2.1.1 works fine
@BoTomVK that defies believe - I can't see anything in the v2.1.1 vs v2.1.2 diff that would affect this:
https://github.com/invertase/react-native-apple-authentication/compare/v2.1.1...v2.1.2
That implies a very rare crash (that would happen on v2.1.1 as well but just was not seen), something unrelated that is causing it (outside this module?), or just generally a bad understanding of what's going on.
I get this same crash and Exception (on android, release build only, haven't tested on IOS) after upgrading from 2.1.0 to 2.1.5 (RN 0.64.2), only calling isSupported
method on app startup. Reverting to 2.1.1 fixes the problem. I did not have the problem with v2.1.0 though. Maybe this issue should be reopened ?
java.lang.IllegalStateException: Method addObserver must be called on the main thread at androidx.lifecycle.LifecycleRegistry.enforceMainThreadIfNeeded(LifecycleRegistry.java:317) at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.java:172) at io.sentry.android.core.AppLifecycleIntegration.register(AppLifecycleIntegration.java:53) at io.sentry.core.Sentry.init(Sentry.java:159) at io.sentry.core.Sentry.init(Sentry.java:96) at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:59) at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:44) at io.sentry.RNSentryModule.startWithOptions(RNSentryModule.java:74) at java.lang.reflect.Method.invoke(Method.java) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372) at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151) at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27) at android.os.Looper.loop(Looper.java:233) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226) at java.lang.Thread.run(Thread.java:923)
Hi @badaz unfortunately my last comment still stands, even after I just re-read the diff between 2.1.1 and 2.1.2. Nothing in there looks like it would cause that. I don't see our code in that stack trace at all actually, it looks like you crashed in sentry init.
Hi, thanks for your answer. You're right, it looks like it, however the only change between working and not working is the installed version of this lib. I will investigate more and come back to post my findings
Hello, I always receive the error when calling the method
signIn
on AndroidCode example:
Error:
[Updated] Possible solution in bridge:
Env: