When installing Firebase on Unity, I get an error “Unloading broken assembly”












2















I am planning to introduce Firebase to add a push notification function to the game I made with Unity.



I pasted the application-specific google-services.json in the Asset folder,
I installed FirebaseMessaging.unitypackage of SDK downloaded from here, but I get an error.





Console




Unloading broken assembly Assets/Firebase/Plugins/Firebase.App.dll, this assembly can cause crashes in the runtime







Unloading broken assembly Assets/Firebase/Plugins/Firebase.Messaging.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







Generation of the Firebase Android resource file google-services.xml from Assets/google-services.json failed.
If you have not included a valid Firebase Android resources in your app it will fail to initialize.
C:/UnityProjects/Test/Assets..AssetsFirebaseEditorgenerate_xml_from_google_services_json.exe -i "Assets/google-services.json" -l.
Microsoft.VC90.CRT.manifest could not be extracted!
You can start to diagnose this issue by executing "C:/UnityProjects/Test/Assets..AssetsFirebaseEditorgenerate_xml_from_google_services_json.exe -i "Assets/google-services.json" -l." from the command line.
UnityEngine.Debug:LogError(Object)
Firebase.Editor.GenerateXmlFromGoogleServicesJson:RunResourceGenerator(String, String, Boolean) (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:508)
Firebase.Editor.GenerateXmlFromGoogleServicesJson:ReadBundleIds(String) (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:369)
Firebase.Editor.GenerateXmlFromGoogleServicesJson:UpdateConfigFileDirectory() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:261)
Firebase.Editor.GenerateXmlFromGoogleServicesJson:CheckConfiguration() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:223)
Firebase.Editor.GenerateXmlFromGoogleServicesJson:.cctor() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:83)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()






I'd like to add this;



public void Start() {
Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived;
Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived;
}


but due to errors, I get errors on the OnTokenReceived and OnMessageReceived parts.



Do these have problems with google-services.json created with Firebase for applications?
Anyone please solve me.










share|improve this question





























    2















    I am planning to introduce Firebase to add a push notification function to the game I made with Unity.



    I pasted the application-specific google-services.json in the Asset folder,
    I installed FirebaseMessaging.unitypackage of SDK downloaded from here, but I get an error.





    Console




    Unloading broken assembly Assets/Firebase/Plugins/Firebase.App.dll, this assembly can cause crashes in the runtime







    Unloading broken assembly Assets/Firebase/Plugins/Firebase.Messaging.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







    Generation of the Firebase Android resource file google-services.xml from Assets/google-services.json failed.
    If you have not included a valid Firebase Android resources in your app it will fail to initialize.
    C:/UnityProjects/Test/Assets..AssetsFirebaseEditorgenerate_xml_from_google_services_json.exe -i "Assets/google-services.json" -l.
    Microsoft.VC90.CRT.manifest could not be extracted!
    You can start to diagnose this issue by executing "C:/UnityProjects/Test/Assets..AssetsFirebaseEditorgenerate_xml_from_google_services_json.exe -i "Assets/google-services.json" -l." from the command line.
    UnityEngine.Debug:LogError(Object)
    Firebase.Editor.GenerateXmlFromGoogleServicesJson:RunResourceGenerator(String, String, Boolean) (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:508)
    Firebase.Editor.GenerateXmlFromGoogleServicesJson:ReadBundleIds(String) (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:369)
    Firebase.Editor.GenerateXmlFromGoogleServicesJson:UpdateConfigFileDirectory() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:261)
    Firebase.Editor.GenerateXmlFromGoogleServicesJson:CheckConfiguration() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:223)
    Firebase.Editor.GenerateXmlFromGoogleServicesJson:.cctor() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:83)
    UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()






    I'd like to add this;



    public void Start() {
    Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived;
    Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived;
    }


    but due to errors, I get errors on the OnTokenReceived and OnMessageReceived parts.



    Do these have problems with google-services.json created with Firebase for applications?
    Anyone please solve me.










    share|improve this question



























      2












      2








      2








      I am planning to introduce Firebase to add a push notification function to the game I made with Unity.



      I pasted the application-specific google-services.json in the Asset folder,
      I installed FirebaseMessaging.unitypackage of SDK downloaded from here, but I get an error.





      Console




      Unloading broken assembly Assets/Firebase/Plugins/Firebase.App.dll, this assembly can cause crashes in the runtime







      Unloading broken assembly Assets/Firebase/Plugins/Firebase.Messaging.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







      Generation of the Firebase Android resource file google-services.xml from Assets/google-services.json failed.
      If you have not included a valid Firebase Android resources in your app it will fail to initialize.
      C:/UnityProjects/Test/Assets..AssetsFirebaseEditorgenerate_xml_from_google_services_json.exe -i "Assets/google-services.json" -l.
      Microsoft.VC90.CRT.manifest could not be extracted!
      You can start to diagnose this issue by executing "C:/UnityProjects/Test/Assets..AssetsFirebaseEditorgenerate_xml_from_google_services_json.exe -i "Assets/google-services.json" -l." from the command line.
      UnityEngine.Debug:LogError(Object)
      Firebase.Editor.GenerateXmlFromGoogleServicesJson:RunResourceGenerator(String, String, Boolean) (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:508)
      Firebase.Editor.GenerateXmlFromGoogleServicesJson:ReadBundleIds(String) (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:369)
      Firebase.Editor.GenerateXmlFromGoogleServicesJson:UpdateConfigFileDirectory() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:261)
      Firebase.Editor.GenerateXmlFromGoogleServicesJson:CheckConfiguration() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:223)
      Firebase.Editor.GenerateXmlFromGoogleServicesJson:.cctor() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:83)
      UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()






      I'd like to add this;



      public void Start() {
      Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived;
      Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived;
      }


      but due to errors, I get errors on the OnTokenReceived and OnMessageReceived parts.



      Do these have problems with google-services.json created with Firebase for applications?
      Anyone please solve me.










      share|improve this question
















      I am planning to introduce Firebase to add a push notification function to the game I made with Unity.



      I pasted the application-specific google-services.json in the Asset folder,
      I installed FirebaseMessaging.unitypackage of SDK downloaded from here, but I get an error.





      Console




      Unloading broken assembly Assets/Firebase/Plugins/Firebase.App.dll, this assembly can cause crashes in the runtime







      Unloading broken assembly Assets/Firebase/Plugins/Firebase.Messaging.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







      Generation of the Firebase Android resource file google-services.xml from Assets/google-services.json failed.
      If you have not included a valid Firebase Android resources in your app it will fail to initialize.
      C:/UnityProjects/Test/Assets..AssetsFirebaseEditorgenerate_xml_from_google_services_json.exe -i "Assets/google-services.json" -l.
      Microsoft.VC90.CRT.manifest could not be extracted!
      You can start to diagnose this issue by executing "C:/UnityProjects/Test/Assets..AssetsFirebaseEditorgenerate_xml_from_google_services_json.exe -i "Assets/google-services.json" -l." from the command line.
      UnityEngine.Debug:LogError(Object)
      Firebase.Editor.GenerateXmlFromGoogleServicesJson:RunResourceGenerator(String, String, Boolean) (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:508)
      Firebase.Editor.GenerateXmlFromGoogleServicesJson:ReadBundleIds(String) (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:369)
      Firebase.Editor.GenerateXmlFromGoogleServicesJson:UpdateConfigFileDirectory() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:261)
      Firebase.Editor.GenerateXmlFromGoogleServicesJson:CheckConfiguration() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:223)
      Firebase.Editor.GenerateXmlFromGoogleServicesJson:.cctor() (at Z:/tmp/tmp.CeTbzghE2x/firebase/app/client/unity/editor/src/GenerateXmlFromGoogleServicesJson.cs:83)
      UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()






      I'd like to add this;



      public void Start() {
      Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived;
      Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived;
      }


      but due to errors, I get errors on the OnTokenReceived and OnMessageReceived parts.



      Do these have problems with google-services.json created with Firebase for applications?
      Anyone please solve me.







      c# android firebase unity3d firebase-realtime-database






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 28 '18 at 12:22







      Beginner_

















      asked Nov 28 '18 at 12:16









      Beginner_Beginner_

      3316




      3316
























          3 Answers
          3






          active

          oldest

          votes


















          1














          Check your Project Settings > IOS. Make sure the .NET is 4.X not 3.
          https://docs.unity3d.com/Manual/ScriptingRuntimeUpgrade.html






          share|improve this answer































            0














            I was facing the same error and find an answer from the Firebase's Github. Here is the post from the Github:




            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:



            Firebase/*.dll : Target Android, Editor, Standalone - with the
            exception of FIrebase.Database.dll Firebase/Firebase.Database.dll
            : Target Android-only Firebase/iOS/*.dll : Target iOS
            Firebase/Mono/Firebase.Database.dll : Target Editor, Standalone




            Here is the link: https://github.com/firebase/quickstart-unity/issues/256



            Hope it helps.






            share|improve this answer































              0














              I ran into this problem with a freshly created project. The project was targeting Android and I was loading the dotnet4 version of the assembly. I switched to the dotnet3 version and it fixed the issue. I noticed that the Script Runtime Version targets .NET 3.5 Equivalent by default. I'm brand new to Unity, so I'm not sure if that's the issue.






              share|improve this answer























                Your Answer






                StackExchange.ifUsing("editor", function () {
                StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                StackExchange.snippets.init();
                });
                });
                }, "code-snippets");

                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "1"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53519283%2fwhen-installing-firebase-on-unity-i-get-an-error-unloading-broken-assembly%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                1














                Check your Project Settings > IOS. Make sure the .NET is 4.X not 3.
                https://docs.unity3d.com/Manual/ScriptingRuntimeUpgrade.html






                share|improve this answer




























                  1














                  Check your Project Settings > IOS. Make sure the .NET is 4.X not 3.
                  https://docs.unity3d.com/Manual/ScriptingRuntimeUpgrade.html






                  share|improve this answer


























                    1












                    1








                    1







                    Check your Project Settings > IOS. Make sure the .NET is 4.X not 3.
                    https://docs.unity3d.com/Manual/ScriptingRuntimeUpgrade.html






                    share|improve this answer













                    Check your Project Settings > IOS. Make sure the .NET is 4.X not 3.
                    https://docs.unity3d.com/Manual/ScriptingRuntimeUpgrade.html







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 3 at 21:21









                    TimHTimH

                    133




                    133

























                        0














                        I was facing the same error and find an answer from the Firebase's Github. Here is the post from the Github:




                        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:



                        Firebase/*.dll : Target Android, Editor, Standalone - with the
                        exception of FIrebase.Database.dll Firebase/Firebase.Database.dll
                        : Target Android-only Firebase/iOS/*.dll : Target iOS
                        Firebase/Mono/Firebase.Database.dll : Target Editor, Standalone




                        Here is the link: https://github.com/firebase/quickstart-unity/issues/256



                        Hope it helps.






                        share|improve this answer




























                          0














                          I was facing the same error and find an answer from the Firebase's Github. Here is the post from the Github:




                          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:



                          Firebase/*.dll : Target Android, Editor, Standalone - with the
                          exception of FIrebase.Database.dll Firebase/Firebase.Database.dll
                          : Target Android-only Firebase/iOS/*.dll : Target iOS
                          Firebase/Mono/Firebase.Database.dll : Target Editor, Standalone




                          Here is the link: https://github.com/firebase/quickstart-unity/issues/256



                          Hope it helps.






                          share|improve this answer


























                            0












                            0








                            0







                            I was facing the same error and find an answer from the Firebase's Github. Here is the post from the Github:




                            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:



                            Firebase/*.dll : Target Android, Editor, Standalone - with the
                            exception of FIrebase.Database.dll Firebase/Firebase.Database.dll
                            : Target Android-only Firebase/iOS/*.dll : Target iOS
                            Firebase/Mono/Firebase.Database.dll : Target Editor, Standalone




                            Here is the link: https://github.com/firebase/quickstart-unity/issues/256



                            Hope it helps.






                            share|improve this answer













                            I was facing the same error and find an answer from the Firebase's Github. Here is the post from the Github:




                            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:



                            Firebase/*.dll : Target Android, Editor, Standalone - with the
                            exception of FIrebase.Database.dll Firebase/Firebase.Database.dll
                            : Target Android-only Firebase/iOS/*.dll : Target iOS
                            Firebase/Mono/Firebase.Database.dll : Target Editor, Standalone




                            Here is the link: https://github.com/firebase/quickstart-unity/issues/256



                            Hope it helps.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Dec 7 '18 at 12:39









                            SalranaxSalranax

                            14




                            14























                                0














                                I ran into this problem with a freshly created project. The project was targeting Android and I was loading the dotnet4 version of the assembly. I switched to the dotnet3 version and it fixed the issue. I noticed that the Script Runtime Version targets .NET 3.5 Equivalent by default. I'm brand new to Unity, so I'm not sure if that's the issue.






                                share|improve this answer




























                                  0














                                  I ran into this problem with a freshly created project. The project was targeting Android and I was loading the dotnet4 version of the assembly. I switched to the dotnet3 version and it fixed the issue. I noticed that the Script Runtime Version targets .NET 3.5 Equivalent by default. I'm brand new to Unity, so I'm not sure if that's the issue.






                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    I ran into this problem with a freshly created project. The project was targeting Android and I was loading the dotnet4 version of the assembly. I switched to the dotnet3 version and it fixed the issue. I noticed that the Script Runtime Version targets .NET 3.5 Equivalent by default. I'm brand new to Unity, so I'm not sure if that's the issue.






                                    share|improve this answer













                                    I ran into this problem with a freshly created project. The project was targeting Android and I was loading the dotnet4 version of the assembly. I switched to the dotnet3 version and it fixed the issue. I noticed that the Script Runtime Version targets .NET 3.5 Equivalent by default. I'm brand new to Unity, so I'm not sure if that's the issue.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Dec 11 '18 at 18:51









                                    PepperPepper

                                    11




                                    11






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Stack Overflow!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53519283%2fwhen-installing-firebase-on-unity-i-get-an-error-unloading-broken-assembly%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        Contact image not getting when fetch all contact list from iPhone by CNContact

                                        count number of partitions of a set with n elements into k subsets

                                        A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks