firebase / quickstart-unity

Firebase Quickstart Samples for Unity
https://firebase.google.com/games
Apache License 2.0
828 stars 428 forks source link

[Question] Any reason Firebase SDK might randomly turn itself off? #1242

Closed dginovker closed 2 years ago

dginovker commented 2 years ago

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the question here:

We were having an issue on our app with a single user would randomly have their Firebase Analytics turned off mid-app. We narrowed it down to an Application.OpenURL("https://discord.gg/redacted") call, but that's where it gets weird:

03-16 22:22:37.069 24496 24707 V Discord : <-- 200 https://discord.com/api/v9/channels/redacted/messages/redacted/ack (106ms, 14-byte body)
03-16 22:22:37.081  9919 10032 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
03-16 22:22:37.082  9919 10032 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
03-16 22:22:37.086  9919 10032 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
03-16 22:22:37.090  9919 10032 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
03-16 22:22:37.094  9919 10032 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
03-16 22:22:37.094  1242  1347 I heimdall: update_proc_tgid:436, put sh(25433) in root memcg
03-16 22:22:37.097  9919 10032 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
03-16 22:22:37.100 21945 22278 W Unity   : FirebaseStorage.OnAppDisposed()
03-16 22:22:37.100 21945 22278 W Unity   : Firebase.Storage.FirebaseStorage:OnAppDisposed(Object, EventArgs)
03-16 22:22:37.100 21945 22278 W Unity   : System.EventHandler:Invoke(Object, EventArgs)
03-16 22:22:37.100 21945 22278 W Unity   : Firebase.FirebaseApp:Dispose()
03-16 22:22:37.100 21945 22278 W Unity   :  
03-16 22:22:37.100 21945 22278 W Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
03-16 22:22:37.100 21945 22278 W Unity   : 
03-16 22:22:37.101  9919 10032 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
03-16 22:22:37.106 21945 22278 W Unity   : FirebaseRemoteConfig.OnAppDisposed()
03-16 22:22:37.106 21945 22278 W Unity   : Firebase.RemoteConfig.FirebaseRemoteConfig:OnAppDisposed(Object, EventArgs)
03-16 22:22:37.106 21945 22278 W Unity   : System.EventHandler:Invoke(Object, EventArgs)
03-16 22:22:37.106 21945 22278 W Unity   : Firebase.FirebaseApp:Dispose()
03-16 22:22:37.106 21945 22278 W Unity   :  
03-16 22:22:37.106 21945 22278 W Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
03-16 22:22:37.106 21945 22278 W Unity   : 

Both FirebaseRemoteConfig and FirebaseStorage are calling .Dispose, but the stack trace doesn't come from anywhere. Is there anything in the SDK that could cause this? Docs don't mention it anywhere, and without a way to check Firebase instanced for if they've been Disposed, we don't have a great solution other than catching the exception and re-initializing everything.

paulinon commented 2 years ago

Hi @dginovker,

This issue seems rather unusual. Could you try if updating the SDK to its latest version makes a difference? If it doesn't, please provide a minimal, reproducible example so that we can identify the cause of this behavior.

google-oss-bot commented 2 years ago

Hey @dginovker. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 2 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@dginovker if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.