简体   繁体   中英

Flutter : I want to register (connect) the flutter app to firebase, but I cannot register (connect) with android emulator

After updating the android studio the day before yesterday, the video posting application that was working until then stopped working on the android emulator. (App seems to be unable to contact firebase. Works fine on iOS.)

So, I'm creating a new flutter project and registering (connecting) it to firebase, but I can connect on iOS, but I can't do it on the android emulator.

https://pub.dev/packages/firebase_storage/example

I copied and pasted the sample code on the above page to main.dart and rewrote the googleAppID, gcmSenderID, apiKey, projectID, etc. of my firebase project.

https://codelabs.developers.google.com/codelabs/flutter-firebase/#6

As a result of registering the application and downloading the setting file according to the above page, the file can be uploaded in the iOS simulator, but the following error appears in the android emulator and it is not possible to connect to firebase.

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
Plugin project :firebase_core_web not found. Please update settings.gradle.
✓ Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...
Debug service listening on ws://127.0.0.1:55308/nX8Ztoy6r9Y=/ws
Syncing files to device Android SDK built for x86...
D/EGL_emulation( 9491): eglMakeCurrent: 0xdfe1a240: ver 3 0 (tinfo 0xdfe0f790)
W/StorageUtil( 9491): no auth token for request
D/NetworkSecurityConfig( 9491): No Network Security Config specified, using platform default
W/NetworkRequest( 9491): no auth token for request
W/NetworkRequest( 9491): error sending network request POST https://firebasestorage.googleapis.com/v0/b/prono9.appspot.com/o
W/ExponenentialBackoff( 9491): network unavailable, sleeping.
W/StorageUtil( 9491): no auth token for request
W/NetworkRequest( 9491): no auth token for request

After all, it does not work with the same error as the video posting application, but I do not know the cause at all. The idea is that "it stopped working after updating android studio", but it doesn't hit anything even if I search, so it's still a personal cause.

What could be the cause?

The message no auth token for request is key for debugging this issue.

This log message means that Firebase Storage did not see any login in the current context. This includes anonymous logins. You can try clearing app data and then try again else uninstall app

No Network Security Config specified, using platform default

The D/ indicates that this is a debugging message. It indicates that you do not have your own network security configuration defined, and so platform-default rules apply. This is perfectly fine. source SO answer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM