Solution 1 :
I just fixed this problem. It turned out to be in my code where I forgot to use Firebase.FirebaseApp.Create(). I hope this helps someone who gets this same problem.
Problem :
I recently got this error:
Job failed with exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.InvalidOperationException: Insecure connection not allowed
and this warning with it:
Non-secure network connections disabled in Player Settings
This happens anytime I run the game build to android, force resolve, etc..
I am using Unity 2022.1.0b2 and have never gotten this error before.
I have been stuck on this problem for days now and cant find this fix, before that I got a message saying too many error when i build to android but i luckily found a fix by deleting the Plugins folder because it will be created again.
I use firebase database and authentication which when i build to android and put on google play the firebase just doesn’t work and shows nothing (no leader-board and no sign-in/sign-up).
In the unity editor the firebase stuff works and is fine just not in the build.
I also use Unity ADS and Unity IAP, both work after build and in editor.
Comments
Comment posted by olucube.com
I have same error but not using firebase at all