-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unity Editor Freezes (Firebase SDK 6.2.2 6.3.0) #445
Comments
Hello. I had the same problem (with different versions tho). You can check out the Unity Editor log to see what possibly goes wrong:
In my case I solved the issue by re-importing all the Firebase packages I use with consistent versions. Do not use some packages in 6.1.1 and others in 6.2.2. Clean the project, run the dependency resolver and if needed run As a workaround: Some of the APIs are working in the editor for easier testing, but some files needed may be corrupted due to the update. If the reimports doesn't help you, just find which boilerplate code causes problems and comment it during the editor work. In my case I had a RemoteConfig initialization, but the Remote Config Editor dll was missing. As temprorary workaround I commented my remote config initialization during work in the editor. Then uncommented it for native Android/iOS builds. Later found out the actual issue and reimported the package which restored the missing dll. Hopefully this is helpful ;) |
Unfortunately, I'm not using any packages from 6.1.1 (removed all completely and validated) |
@yakirbu can you post the code where you call |
It stops at the line: If I downgrade to 6.1.1, everything works as usual. |
Thanks for that sample @yakirbu. Can you give us some information on your current setup? Exceptions are used to indicate errors in data retrieval. Can you let us know if you see any of those? If you don't mind, it would help us a ton if you could get us instructions for how to reproduce this issue in the test app. Another thing that would be super helpful if you could try is trying to take more direct control of the FirebaseDatabase.DefaultInstance. Internal to Firebase, this is currently a weak reference (although it should stay around for the duration of your query). If you have any sort of manager class (say, where you call CheckAndFixDependenciesAsync), it would be really helpful to know if keeping a reference there makes your issue go away. Similarly, if you're already keeping a reference to FirebaseDatabase.DefaultInstance around, try setting it to null in OnDestroy. Ex (I'm writing this inline, so there may be a typo or two):
This changes behavior a little because in the UnityEditor, all the native plugins are kept around between play cycles (when you stop playing the game, the Database stays in its current state). Clearing all references to the database might clear it out. Now, this might not work since you have an active query going on (it seem). What you can also do is try putting in a FirebaseDatabase.DefaultInstance.Dispose(); in a manager class (say in an OnApplicationQuit() callback). This should not be necessary, but let us know if it does fix your issue! I look forward to your response! |
Hi, |
After upgrading Firebase from 6.1.1 to 6.2.2 (almost all firebase packages),
When calling GetValueAsync() In verbose log mode,
the console prints "[conn_0] websocket message received" endlessly.
Even when we stop the game, the console keeps printing the message.
When we reload the scripts / change the scripts / replay the game or anything that causes Unity to 'Reload Assemblies', Unity freezes (probably because the previous connection is still ongoing, and that might cause the freezes.
The text was updated successfully, but these errors were encountered: