I just tried importing this package and it's not working.
Unloading broken assembly Assets/Firebase/Plugins/Firebase.App.dll, this assembly can cause crashes in the runtime
Unloading broken assembly Assets/Firebase/Plugins/Firebase.Analytics.dll, this assembly can cause crashes in the runtime
Unloading broken assembly Assets/Firebase/Plugins/Firebase.Platform.dll, this assembly can cause crashes in the runtime
there seems to be some bug in unity preventing a more detailed error message:
https://issuetracker.unity3d.com/issues/unloading-broken-assembly-error-message-provides-insufficient-information
I got the same error after importing Facebook SDK. The dependencies were resolved. Created APK. But, the APK refused to get installed.
In my case APK crashed instantly with that version (when app loads on mobile), No errors in log, just a pure crash. I use Facebook SDK (latest).
Had to move back to older Firebase version and wasted a full day and got a bonus headache on this.. Don't they test before releasing???
@ColorTwist we do test prior to releasing. Unity constantly offers the challenge of releasing new versions with unexpected changes in behavior.
Everyone, you shouldn't need to rollback the Firebase version .. re-enabling the platform targeting for each unloaded DLL _should_ (assuming a new Unity release has new problems) resolve the issue.
Thanks for the response Stewart! Supporting this does sound challenging.
“re-enabling the platform targeting for each unloaded DLL should (assuming a new Unity release has new problems) resolve the issue.”
What does this mean, and how do i do it?
All "Unloading the assembly" does is unload the DLL from the app domain (i.e Unity's process) then disable the platform targeting options. So what you'll need to do is select the unloaded DLL(s) and in the plugin inspector tick the platform check boxes to re-enable them for the appropriate platform.
We typically follow the pattern to enable target platforms:
I re-enable the target platforms as stated but it did not work. Any workarounds?
I have the same problem.. Any one find the solution?
Any chance someone has a way to reproduce this failure?
Here's what I did without running into problems.
Firstly:
Also I tried:
Any updates on this? Did anyone manage to reproduce the failure?
Sorry for not following up. UNfortunately i just used unity-analytics instead for my project.
However, on a seperate project, with a seperate library i ran into a simular issue with unity 2018.2.17
this was in the patch notes for 2018.2.18:
Editor: Fixed issue with precompiled managed assemblies (.dlls) in the Assets folder getting loaded twice on startup, causing two InitializeOnLoad calls where Unity API calls such as AssetDatabase.LoadAssetAtPath would fail in the first InitializeOnLoad. Now there is only one first InitializeOnLoad call and Unity APIs work as expected. (1060352)
Could be related?
Thanks for investigating Stewart, sorry for the lack of followthrough.
Selected Firebase/Sample/Database/MainScene.unity
Where to find this?
I think people are encountering this issue because they are mismatching their Unity c# scripting backend and the dotnet version of the Firebase package.
If Unity's scripting backend is set to 3.x, you need to use the packages within the dotnet3 folder.
If Unity's backend is 4.x, then you can use the dotnet4 folder.
The steps listed on the Firebase setup instructions indicate that you can use the dotnet4 folder with Unity 2017, which is true only if you set the scripting backend to 4.x (experimental). If you want to keep using the 3.x backend, then you have to use dotnet3 packages.
Hey tomkillen, I had the same issue and re-importing the Firebase package using dotnet3 resolved my issue. Thanks for catching that!
I think people are encountering this issue because they are mismatching their Unity c# scripting backend and the dotnet version of the Firebase package.
If Unity's scripting backend is set to 3.x, you need to use the packages within the dotnet3 folder.
If Unity's backend is 4.x, then you can use the dotnet4 folder.
The steps listed on the Firebase setup instructions indicate that you can use the dotnet4 folder with Unity 2017, which is true only if you set the scripting backend to 4.x (experimental). If you want to keep using the 3.x backend, then you have to use dotnet3 packages.
This fixed the issue for me as well. See this post for more info: https://stackoverflow.com/a/54029970/6080254
Most helpful comment
I think people are encountering this issue because they are mismatching their Unity c# scripting backend and the dotnet version of the Firebase package.
If Unity's scripting backend is set to 3.x, you need to use the packages within the dotnet3 folder.
If Unity's backend is 4.x, then you can use the dotnet4 folder.
The steps listed on the Firebase setup instructions indicate that you can use the dotnet4 folder with Unity 2017, which is true only if you set the scripting backend to 4.x (experimental). If you want to keep using the 3.x backend, then you have to use dotnet3 packages.