Cant access firebase/firestore when cloning flutter project to another computer - flutter

I have uploaded my project on github and cloned to another computer. It compiles fine but it hasnt got access to Firbase/firestore and therefore i cant use this cloned project properly with authentication and so on.
Do I have to change something when I clone a flutter app with firebase to another computer to make it work and gain access to the database and the authentication?
Errormessage:
D/EGL_emulation(10634): app_time_stats: avg=6275.84ms min=9.86ms max=106419.61ms count=17
D/EGL_emulation(10634): app_time_stats: avg=11.48ms min=5.31ms max=40.71ms count=60
D/EGL_emulation(10634): app_time_stats: avg=9.29ms min=4.92ms max=16.29ms count=56
D/EGL_emulation(10634): app_time_stats: avg=8.66ms min=5.06ms max=15.26ms count=61
D/EGL_emulation(10634): app_time_stats: avg=9.94ms min=4.58ms max=24.23ms count=61
D/EGL_emulation(10634): app_time_stats: avg=10.22ms min=5.13ms max=20.02ms count=60
D/EGL_emulation(10634): app_time_stats: avg=8.59ms min=4.91ms max=15.28ms count=60
D/EGL_emulation(10634): app_time_stats: avg=8.31ms min=5.03ms max=16.29ms count=61
D/EGL_emulation(10634): app_time_stats: avg=8.91ms min=4.52ms max=14.01ms count=61
D/EGL_emulation(10634): app_time_stats: avg=9.90ms min=4.90ms max=17.99ms count=60
I/flutter (10634): 2 false
D/EGL_emulation(10634): app_time_stats: avg=9.15ms min=5.06ms max=22.87ms count=60
D/EGL_emulation(10634): app_time_stats: avg=83.28ms min=12.88ms max=1016.12ms count=15
W/Firestore(10634): (24.4.0) [WatchStream]: (24ebbad) Stream closed with status: Status{code=UNAVAILABLE, description=Channel shutdownNow invoked, cause=null}.
W/DynamiteModule(10634): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule(10634): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller(10634): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.

this could have many reasons.
Check your GitIgnore maybe some Firebase config files were not uploaded to Github and are therefore missing in the cloned project.
Check your Firebase security rules. Check how you are allowed to access your DB.
If this didn't work, provide the thrown error, please.

Solution:
It happend to be that the android emulator on my other computer was a bad version where firebase didn’t work correctly.
I only had to downgrade from android emulator 31.3.10 then everything worked fine.
This video shows how:
https://youtu.be/qo3SbdbXFos

Related

Flutter: How to preserve the file created through getApplicationDocumentsDirectory() on an iPhone?

I made an app for which I store images in a file (using getApplicationDocumentsDirectory()), everything works fine, except on the physical iPhone where I cannot access the data again if I quit the running app.
when I try to reopen the app I get this message error :
Reload already in progress, ignoring request
Restarted application in 1,654ms.
════════ Exception caught by image resource service ════════════════════════════
The following FileSystemException was thrown resolving an image codec:
Cannot open file, path = '/var/mobile/Containers/Data/Application/63108BB4-7170-44CF-8DF6-43885B77C05B/Documents/4TSqff2TFeUnxwQUJXymrZw23ir2.jpg' (OS Error: No such file or directory, errno = 2)
When the exception was thrown, this was the stack
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:356:9)
<asynchronous suspension>
#1 FileImage._loadAsync
<asynchronous suspension>
Path: /var/mobile/Containers/Data/Application/63108BB4-7170-44CF-8DF6-43885B77C05B/Documents/ImageName1.jpg
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by image resource service ════════════════════════════
Cannot open file, path = '/var/mobile/Containers/Data/Application/63108BB4-7170-44CF-8DF6-43885B77C05B/Documents/WgZMKUy95lOSV9jnlQOE6hbCStS2.jpg' (OS Error: No such file or directory, errno = 2)
════════════════════════════════════════════════════════════════════════════════
In android studio, I don't have this problem!

Admob error "Content URL must be non-empty." after start in Flutter

can someone help me. I added Google Admob to my Flutter project and did everything according to the instructions. Now I get the following error message with the emulator.I haven't found anything in other forums.
PlatformException (PlatformException(error, Content URL must be non-empty., null, java.lang.IllegalArgumentException: Content URL must be non-empty.
at com.google.android.gms.common.internal.Preconditions.checkNotEmpty(com.google.android.gms:play-services-basement##17.6.0:4)
at com.google.android.gms.ads.AdRequest$Builder.setContentUrl(com.google.android.gms:play-services-ads-lite##20.1.0:2)
at io.flutter.plugins.googlemobileads.FlutterAdRequest.asAdRequest(FlutterAdRequest.java:68)
at io.flutter.plugins.googlemobileads.FlutterInterstitialAd.load(FlutterInterstitialAd.java:53)
at io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.onMethodCall(GoogleMobileAdsPlugin.java:304)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:323)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
I solve the Problem with the follow things:
classpath 'com.google.gms:google-services:4.3.8'
and
compileSdkVersion 30
minSdkVersion 21
targetSdkVersion 30

How to resolve "Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated." for InMobi Unity Mediation Plugin

I am trying to implement google-admob mediation and currently working on Integrating InMobi ads. I followed all the steps as per https://developers.google.com/admob/unity/mediation/inmobi .I was able to create the Account ID and Placement ID in the inMobi website . I successfully was able to configure AdMob ad unit in my admob account.
The problem is in the 3rd step of the process which is "Import the InMobi SDK and adapter". I extracted the latest version of Google Mobile Ads mediation plugin for InMobi from this link https://developers.google.com/admob/unity/mediation/inmobi#inmobi-unity-mediation-plugin-changelog .
But while performing this step Assets > Play Services Resolver > Android Resolver > Force Resolve , I am getting the following "Android Dependencies , Resolution failed" error. I am attaching the screen shot and the log file below. I tried to change the version of the InMobi Unity Mediation Plugin some 5 times,but all the time it keeps failing. I changed to stack trace to full and understand but still can't really figure out what to do.
For inMobi ad mediation for unity there is no video on youtube also. Please help me to figure out the solution for this problem.
Log files details:
Running Gradle...
C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Hub/Editor/2021.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\Users\cheth\FlutteringBirds1\Assets\Plugins\Android" "-PMAVEN_REPOS=file:///C:/Users/cheth/FlutteringBirds1/Assets/Firebase/m2repository;https://maven.google.com/;https://jcenter.bintray.com/" "-PPACKAGES_TO_COPY=com.google.firebase:firebase-common:19.5.0;com.google.firebase:firebase-analytics:18.0.2;com.google.android.gms:play-services-base:17.6.0;com.google.firebase:firebase-app-unity:7.1.0;com.google.firebase:firebase-messaging:21.0.1;com.google.firebase:firebase-messaging-unity:7.1.0;com.google.android.gms:play-services-ads:19.5.0;com.google.ads.mediation:inmobi:9.1.1.0" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=3.6.0"
Executing command: C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Hub/Editor/2021.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\Users\cheth\FlutteringBirds1\Assets\Plugins\Android" "-PMAVEN_REPOS=file:///C:/Users/cheth/FlutteringBirds1/Assets/Firebase/m2repository;https://maven.google.com/;https://jcenter.bintray.com/" "-PPACKAGES_TO_COPY=com.google.firebase:firebase-common:19.5.0;com.google.firebase:firebase-analytics:18.0.2;com.google.android.gms:play-services-base:17.6.0;com.google.firebase:firebase-app-unity:7.1.0;com.google.firebase:firebase-messaging:21.0.1;com.google.firebase:firebase-messaging-unity:7.1.0;com.google.android.gms:play-services-ads:19.5.0;com.google.ads.mediation:inmobi:9.1.1.0" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=3.6.0"
Reporting analytics data: /androidresolver/resolve/gradle/failed/fetch?unityVersion=2021.1.6f1&unityPlatform=WindowsEditor&installSource=upm&version=1.2.164&scope= 'Android Resolver: Gradle Resolve: Tool Extraction Failed'
ERROR: Gradle failed to fetch dependencies.
Failed to run 'C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Hub/Editor/2021.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\Users\cheth\FlutteringBirds1\Assets\Plugins\Android" "-PMAVEN_REPOS=file:///C:/Users/cheth/FlutteringBirds1/Assets/Firebase/m2repository;https://maven.google.com/;https://jcenter.bintray.com/" "-PPACKAGES_TO_COPY=com.google.firebase:firebase-common:19.5.0;com.google.firebase:firebase-analytics:18.0.2;com.google.android.gms:play-services-base:17.6.0;com.google.firebase:firebase-app-unity:7.1.0;com.google.firebase:firebase-messaging:21.0.1;com.google.firebase:firebase-messaging-unity:7.1.0;com.google.android.gms:play-services-ads:19.5.0;com.google.ads.mediation:inmobi:9.1.1.0" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=3.6.0"'
stdout:
stderr:
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
at org.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
at org.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:109)
at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
at org.codehaus.groovy.reflection.ReflectionCache.<clinit>(ReflectionCache.java:39)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:209)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:107)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
at org.gradle.api.internal.plugins.DefaultExtraPropertiesExtension.<init>(DefaultExtraPropertiesExtension.java:29)
at org.gradle.api.internal.plugins.DefaultConvention.<init>(DefaultConvention.java:47)
at org.gradle.api.internal.ExtensibleDynamicObject.<init>(ExtensibleDynamicObject.java:58)
at org.gradle.initialization.DefaultSettings.<init>(DefaultSettings.java:93)
at org.gradle.initialization.DefaultSettings_Decorated.<init>(Unknown Source)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:51)
at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
at org.gradle.initialization.SettingsFactory.createSettings(SettingsFactory.java:52)
at org.gradle.initialization.ScriptEvaluatingSettingsProcessor.process(ScriptEvaluatingSettingsProcessor.java:56)
at org.gradle.initialization.PropertiesLoadingSettingsProcessor.process(PropertiesLoadingSettingsProcessor.java:37)
at org.gradle.initialization.SettingsEvaluatedCallbackFiringSettingsProcessor.process(SettingsEvaluatedCallbackFiringSettingsProcessor.java:34)
at org.gradle.initialization.RootBuildCacheControllerSettingsProcessor.process(RootBuildCacheControllerSettingsProcessor.java:36)
at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:48)
at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:45)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:315)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:305)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:101)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.initialization.BuildOperationSettingsProcessor.process(BuildOperationSettingsProcessor.java:45)
at org.gradle.initialization.DefaultSettingsLoader.findSettingsAndLoadIfAppropriate(DefaultSettingsLoader.java:104)
at org.gradle.initialization.DefaultSettingsLoader.findAndLoadSettings(DefaultSettingsLoader.java:45)
at org.gradle.initialization.SettingsAttachingSettingsLoader.findAndLoadSettings(SettingsAttachingSettingsLoader.java:35)
at org.gradle.internal.composite.CommandLineIncludedBuildSettingsLoader.findAndLoadSettings(CommandLineIncludedBuildSettingsLoader.java:34)
at org.gradle.internal.composite.ChildBuildRegisteringSettingsLoader.findAndLoadSettings(ChildBuildRegisteringSettingsLoader.java:47)
at org.gradle.internal.composite.CompositeBuildSettingsLoader.findAndLoadSettings(CompositeBuildSettingsLoader.java:35)
at org.gradle.initialization.DefaultGradleLauncher$LoadBuild.run(DefaultGradleLauncher.java:277)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.initialization.DefaultGradleLauncher.loadSettings(DefaultGradleLauncher.java:202)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:147)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:134)
at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:58)
at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:55)
at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:82)
at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:75)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:183)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:75)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:55)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:58)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:39)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:49)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:44)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:315)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:305)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:101)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:44)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:49)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:46)
at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:78)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:46)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:31)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:42)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:28)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:52)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:59)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:36)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:68)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:38)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:37)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:60)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:32)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:41)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:48)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:32)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:55)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:207)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:403)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:376)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:37)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:369)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:299)
at org.gradle.launcher.Main.doAction(Main.java:36)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
FAILURE: Build failed with an exception.
* What went wrong:
Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated.
> Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
exit code: 1
It's a bug that has existed for years. Maybe we've been dealing with this since the 2017 release. But unfortunately, it is not even clear what Unity is doing about it.
To solve: Edit->Preferences->External Tools
In the window that opens, you must remove the checkboxes at the bottom and give the same paths! It's ridiculous, but yes, it's true!!!
Good luck, we need it.
In my case switching Edit->Preferences->ExternalTools->JDK from default OpenJDK to manually installed old Oracle JavaSE8 JDK helped.
I had the same error message and tried a lot of things to fix it. Finally updating Java from jdk-17 to jdk-19 fixed it. I also updated the environment variables
JAVA_HOME=C:\Program Files\Java\jdk-19
and
PATH=C:\Program Files\Java\jdk-19\bin
Note that the PATH variable actually contains many more paths from other programs on my system. A windows logoff and login is required for the changes to take effect.

Flutter Firebase Authentication app crashes after creating user

I've been using firebase services for quite some time.
So i started a new flutter project yesterday and i'm experiencing app crashes, some times when when a user registers an account With Firebase Auth. according to console log, its probably because of invoking onAuthStateChanged.
Can anyone help me resolve this.
NB: Sometimes an account is created successfully without the app crashing.
This is the code where i call onAuthStateChanged :
User _userFromFirebase(FirebaseUser user){
return user != null ? User(uid: user.uid, email: user.email, name: user.displayName, phoneNo: user.phoneNumber)
: null ;
}
Stream<User> get user {
return _auth.onAuthStateChanged.map(_userFromFirebase);
}
Below is the debug console output;
D/FirebaseAuth(14930): Notifying id token listeners about user ( VZcLcnr4dJOZgLjFYU3ls96yHK13 ).
D/FirebaseAuth(14930): Notifying auth state listeners about user ( VZcLcnr4dJOZgLjFYU3ls96yHK13 ).
D/AndroidRuntime(14930): Shutting down VM
E/AndroidRuntime(14930): FATAL EXCEPTION: main
E/AndroidRuntime(14930): Process: com.tonnyapps.app3, PID: 14930
E/AndroidRuntime(14930): java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugin.common.MethodChannel.invokeMethod(java.lang.String, java.lang.Object)' on a null object reference
E/AndroidRuntime(14930): at io.flutter.plugins.firebaseauth.FirebaseAuthPlugin$3.onAuthStateChanged(FirebaseAuthPlugin.java:710)
E/AndroidRuntime(14930): at com.google.firebase.auth.zzp.run(com.google.firebase:firebase-auth##19.2.0:3)
E/AndroidRuntime(14930): at android.os.Handler.handleCallback(Handler.java:873)
E/AndroidRuntime(14930): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(14930): at com.google.android.gms.internal.firebase_auth.zzj.dispatchMessage(com.google.firebase:firebase-auth##19.2.0:6)
E/AndroidRuntime(14930): at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime(14930): at android.app.ActivityThread.main(ActivityThread.java:7050)
E/AndroidRuntime(14930): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(14930): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
E/AndroidRuntime(14930): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
I/Process (14930): Sending signal. PID: 14930 SIG: 9
Lost connection to device.
After many efforts tweaking around with the code and updating dependencies to support higher versions of firebase_auth. I was able to upgrade and fix the version of firebase_auth to version 0.20.1, since it was the last non null-safe version.
And Wallah, it worked, this must have been a bug with whatever version i was using. But it was solved with later releases. The users can now create users successfully and proceed with the normal app flow.
So setting firebase_auth: 0.20.1 in the pubspec.yaml, worked for me.
Since, the project is old, I would recommend the best option is updating all the code, and preferably migrating the project to null safety. This should give you more control over the project future development, and also probably fix the bugs you are experiencing with the old code.

Weex Library Crash on Android

I am getting this random crash in weex on android platform.
Weex version details-
v1.3.8
- weexpack : v1.2.3
- weex-builder : v0.4.0
- weex-previewer : v1.5.1
Facing a crash in sdk : java.lang.NullPointerException: Attempt to invoke virtual method 'com.taobao.weex.ui.flat.WidgetContainer com.taobao.weex.ui.flat.FlatGUIContext.getFlatComponentAncestor(com.taobao.weex.ui.component.WXComponent)' on a null object reference
at com.taobao.weex.ui.component.WXComponent.setComponentLayoutParams(WXComponent.java:559)
at com.taobao.weex.ui.component.WXComponent.setLayout(WXComponent.java:551)
at com.taobao.weex.ui.RenderActionContextImpl.setLayout(RenderActionContextImpl.java:82)
at com.taobao.weex.ui.WXRenderManager.setLayout(WXRenderManager.java:150)
at com.taobao.weex.dom.DOMActionContextImpl$ApplyUpdateConsumer$1.execute(DOMActionContextImpl.java:276)
at com.taobao.weex.ui.WXRenderManager$1.run(WXRenderManager.java:104)
at com.taobao.weex.common.WXThread$SafeRunnable.run(WXThread.java:48)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)
Already fixed, not released yet. You can build from source if emergency.