googlesamples / google-signin-unity

Google Sign-In API plugin for Unity game engine. Works with Android and iOS.
Other
424 stars 231 forks source link

Crash when Google sign-in call in unity #239

Closed Rafan2277 closed 1 year ago

Rafan2277 commented 1 year ago

Hi , We have implement the google login using firebase sdk in unity for android device. I have implement the sign in flow complete and it's working in my android mobile. after that we add firebase storage then it start crash i am close the app. Open again and try to sign-out and try sign in again the unity app was crashed with below warnings, please advice how to solve this problem.

Crash Warning Report :

Fatal Exception: java.lang.Exception: NullReferenceException : Object reference not set to an instance of an object. at Firebase.ExceptionAggregator.ThrowAndClearPendingExceptions(Firebase.ExceptionAggregator) at Firebase.Platform.FirebaseHandler.Update(Firebase.Platform.FirebaseHandler)

ReferenceQueueDaemon: at java.lang.Object.wait(Object.java) at java.lang.Object.wait(Object.java:442) at java.lang.Object.wait(Object.java:568) at java.lang.Daemons$ReferenceQueueDaemon.runInternal(Daemons.java:216) at java.lang.Daemons$Daemon.run(Daemons.java:138) at java.lang.Thread.run(Thread.java:919)

Crashlytics Exception Handler1: at dalvik.system.VMStack.getThreadStackTrace(VMStack.java) at java.lang.Thread.getStackTrace(Thread.java:1720) at java.lang.Thread.getAllStackTraces(Thread.java:1796) at com.google.firebase.crashlytics.internal.common.CrashlyticsReportDataCapture.populateThreadsList(CrashlyticsReportDataCapture.java:334) at com.google.firebase.crashlytics.internal.common.CrashlyticsReportDataCapture.populateExecutionData(CrashlyticsReportDataCapture.java:305) at com.google.firebase.crashlytics.internal.common.CrashlyticsReportDataCapture.populateEventApplicationData(CrashlyticsReportDataCapture.java:253) at com.google.firebase.crashlytics.internal.common.CrashlyticsReportDataCapture.captureEventData(CrashlyticsReportDataCapture.java:106) at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.persistEvent(SessionReportingCoordinator.java:303) at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.persistFatalEvent(SessionReportingCoordinator.java:132) at com.google.firebase.crashlytics.internal.common.CrashlyticsController$2.call(CrashlyticsController.java:214) at com.google.firebase.crashlytics.internal.common.CrashlyticsController$2.call(CrashlyticsController.java:199) at com.google.firebase.crashlytics.internal.common.CrashlyticsBackgroundWorker$3.then(CrashlyticsBackgroundWorker.java:105) at com.google.android.gms.tasks.zze.run(com.google.android.gms:play-services-tasks@@18.0.2:1) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:67) at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27) at java.lang.Thread.run(Thread.java:919)

FinalizerDaemon: at java.lang.Object.wait(Object.java) at java.lang.Object.wait(Object.java:442) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:190) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:211) at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:272) at java.lang.Daemons$Daemon.run(Daemons.java:138) at java.lang.Thread.run(Thread.java:919)

FinalizerWatchdogDaemon: at java.lang.Thread.sleep(Thread.java) at java.lang.Thread.sleep(Thread.java:440) at java.lang.Thread.sleep(Thread.java:356) at java.lang.Daemons$FinalizerWatchdogDaemon.sleepForMillis(Daemons.java:384) at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization(Daemons.java:412) at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal(Daemons.java:324) at java.lang.Daemons$Daemon.run(Daemons.java:138) at java.lang.Thread.run(Thread.java:919)

TubeSockWriter-1: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at com.google.firebase.database.tubesock.WebSocketWriter.writeMessage(WebSocketWriter.java:137) at com.google.firebase.database.tubesock.WebSocketWriter.runWriter(WebSocketWriter.java:152) at com.google.firebase.database.tubesock.WebSocketWriter.access$000(WebSocketWriter.java:30) at com.google.firebase.database.tubesock.WebSocketWriter$1.run(WebSocketWriter.java:47) at java.lang.Thread.run(Thread.java:919)

FirebaseDatabaseWorker: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2109) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1132) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:849) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)

awaitEvenIfOnMainThread task continuation executor1: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:67) at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27) at java.lang.Thread.run(Thread.java:919)

DefaultDispatcher-worker-3: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:353) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.park(CoroutineScheduler.kt:795) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.tryPark(CoroutineScheduler.kt:740) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:711) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

OkHttp ConnectionPool: at java.lang.Object.wait(Object.java) at com.android.okhttp.ConnectionPool$1.run(ConnectionPool.java:106) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)

Okio Watchdog: at java.lang.Object.wait(Object.java) at java.lang.Object.wait(Object.java:442) at java.lang.Object.wait(Object.java:568) at com.android.okhttp.okio.AsyncTimeout.awaitTimeout(AsyncTimeout.java:313) at com.android.okhttp.okio.AsyncTimeout.access$000(AsyncTimeout.java:42) at com.android.okhttp.okio.AsyncTimeout$Watchdog.run(AsyncTimeout.java:288)

queued-work-looper: at android.os.MessageQueue.nativePollOnce(MessageQueue.java) at android.os.MessageQueue.next(MessageQueue.java:336) at android.os.Looper.loop(Looper.java:182) at android.os.HandlerThread.run(HandlerThread.java:67)

main: at android.os.MessageQueue.nativePollOnce(MessageQueue.java) at android.os.MessageQueue.next(MessageQueue.java:336) at android.os.Looper.loop(Looper.java:182) at android.app.ActivityThread.main(ActivityThread.java:7563) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)

pool-7-thread-1: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)

com.google.firebase.crashlytics.startup1: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:67) at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27) at java.lang.Thread.run(Thread.java:919)

Firebase Blocking Thread #0: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230) at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:461) at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362) at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:937) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1091) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0$CustomThreadFactory(CustomThreadFactory.java:47) at com.google.firebase.concurrent.-$$Lambda$CustomThreadFactory$HeQjDIAeENT2LKE3GfM7LN2rKe0.run(:4) at java.lang.Thread.run(Thread.java:919)

DefaultDispatcher-worker-2: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:353) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.park(CoroutineScheduler.kt:795) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.tryPark(CoroutineScheduler.kt:740) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:711) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Firebase Background Thread #3: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0$CustomThreadFactory(CustomThreadFactory.java:47) at com.google.firebase.concurrent.-$$Lambda$CustomThreadFactory$HeQjDIAeENT2LKE3GfM7LN2rKe0.run(:4) at java.lang.Thread.run(Thread.java:919)

Firebase Background Thread #1: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0$CustomThreadFactory(CustomThreadFactory.java:47) at com.google.firebase.concurrent.-$$Lambda$CustomThreadFactory$HeQjDIAeENT2LKE3GfM7LN2rKe0.run(:4) at java.lang.Thread.run(Thread.java:919)

Firebase Background Thread #2: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0$CustomThreadFactory(CustomThreadFactory.java:47) at com.google.firebase.concurrent.-$$Lambda$CustomThreadFactory$HeQjDIAeENT2LKE3GfM7LN2rKe0.run(:4) at java.lang.Thread.run(Thread.java:919)

pool-9-thread-1: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:849) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)

Firebase Background Thread #0: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0$CustomThreadFactory(CustomThreadFactory.java:47) at com.google.firebase.concurrent.-$$Lambda$CustomThreadFactory$HeQjDIAeENT2LKE3GfM7LN2rKe0.run(:4) at java.lang.Thread.run(Thread.java:919)

Measurement Worker: at java.lang.Object.wait(Object.java) at java.lang.Object.wait(Object.java:442) at m.je.run(:com.google.android.gms.dynamite_measurementdynamite@233717024@23.37.17 (100300-0):71)

DefaultDispatcher-worker-1: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:353) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.park(CoroutineScheduler.kt:795) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.tryPark(CoroutineScheduler.kt:740) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:711) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

UnityChoreographer: at android.os.MessageQueue.nativePollOnce(MessageQueue.java) at android.os.MessageQueue.next(MessageQueue.java:336) at android.os.Looper.loop(Looper.java:182) at android.os.HandlerThread.run(HandlerThread.java:67)

ScionFrontendApi: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2109) at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1091) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)

TokenRefresher: at android.os.MessageQueue.nativePollOnce(MessageQueue.java) at android.os.MessageQueue.next(MessageQueue.java:336) at android.os.Looper.loop(Looper.java:182) at android.os.HandlerThread.run(HandlerThread.java:67)

GmsDynamite: at java.lang.Object.wait(Object.java) at java.lang.Object.wait(Object.java:442) at java.lang.Object.wait(Object.java:568) at com.google.android.gms.dynamite.zza.run(com.google.android.gms:play-services-basement@@18.2.0:2)

TubeSockReader-1: at com.android.org.conscrypt.NativeCrypto.SSL_read(NativeCrypto.java) at com.android.org.conscrypt.NativeSsl.read(NativeSsl.java:411) at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:549) at java.io.DataInputStream.readFully(DataInputStream.java:198) at com.google.firebase.database.tubesock.WebSocketReceiver.read(WebSocketReceiver.java:155) at com.google.firebase.database.tubesock.WebSocketReceiver.run(WebSocketReceiver.java:48) at com.google.firebase.database.tubesock.WebSocket.runReader(WebSocket.java:428) at com.google.firebase.database.tubesock.WebSocket.access$000(WebSocket.java:47) at com.google.firebase.database.tubesock.WebSocket$2.run(WebSocket.java:143) at java.lang.Thread.run(Thread.java:919)

hlngncy commented 2 months ago

Hey! Did you figured out the reason or the solution? I have similar problem here.