'No app check token for request' flutter firebase error
Solution 1
Go to Firebase console, then navigate to the storage tab. You should see something like this:
Click "Configure App Check" and there will be a config page. Ensure that your Firebase Storage is not set to enforce app check.
Of course, the ideal option would be to set up app check. Invertase recently released this plugin for setting it up with Flutter. You can check out the article here.
Solution 2
In my case I solved the problem by using the await typecasting. You are not getting the error related to app check token request. You are getting the error for not waiting for the completion of download. Just add the line after await which is required for the UploadTask finished and it works.
final Reference storageReference = firebase_storage.FirebaseStorage.instance
.ref()
.child("products")
.child("product_$productId.png");
String downloadURL;
UploadTask uploadTask = storageReference.putFile(mFileImage);
downloadURL = await (await uploadTask).ref.getDownloadURL();
ryan chandra
Updated on December 31, 2022Comments
-
ryan chandra over 1 year
my flutter android app was working well until i want to upload something to firebase storage. i get 'No app check token for request' error message
does anyone know what to do to solve this problem?
-
Andrii Syrokomskyi over 2 yearsIf the AppCheck is not activated, access to the storage is affected by the rules:
https://console.firebase.google.com/ > Storage > Rules
.
-
-
ryan chandra almost 3 yearsactually the status in firebase storage is unenforce so i dont know why the system still using app check feature for my app
-
Alex Hartford almost 3 yearsThat's definitely odd! Can you include your code in the question?
-
MmBaguette over 2 yearsHey, same issue is happening to me. Did anyone find an answer to this? I was doing
storageReference.ref(imageFilePath).imageRef.getDownloadURL();
. -
mike hennessy over 2 yearsSame for me, have status to "unenforced" but getting that error.