You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firebase says Firebase Storage: The given file does not have any download URLs when attempting to download.
Environment info
firebase-tools: 9.12.1 Platform: Windows
Test case
add-content.mjs
// use emulatorprocess.env.GCLOUD_PROJECT="test-project";process.env.FIREBASE_STORAGE_EMULATOR_HOST="localhost:9199";importadminfrom"firebase-admin";admin.initializeApp({storageBucket: "default-bucket",});conststorage=admin.storage().bucket();constfile=storage.file("app-data/test.json");file.save(JSON.stringify({stuffs: "stuffs"})).then(()=>console.log("wrote")).catch((err)=>console.error(err));
run node add-content.mjs: you should see the message wrote
open read-content.html in chrome and check console: you should see the error message "Firebase Storage: The given file does not have any download URLs"
go to the emulator ui to check if the added file is there. (it is there. but you are unable to access it)
Expected behavior
You should be able to access it.
Actual behavior
Receiving error
Firebase Storage: The given file does not have any download URLs
My intuition may be incorrect but this randomly came to my mind: May be when I save the content, emulator is not creating a default access token. The reason behind this thought is when I go to the emulator and hit the "create new access token" button for this file, emulator creates a new access token. Then everything works as fine. The read-content.html file runs correctly.
The text was updated successfully, but these errors were encountered:
vajahath
changed the title
Firebase Storage: The given file does not have any download URLs
Firebase Storage Emulator: The given file does not have any download URLs
Jun 4, 2021
This bug is a result of the fact that download tokens are not added when uploading through the Google Cloud API endpoints (which is in line with production), however the bug is that when getDownloadURL() is called via a Firebase endpoint, it should issue a token if none exist.
@trullock we don't have a fixed release schedule but this will definitely be included in the next release. If you look at our history you can see that we normally do a release every week or so when there are changes pending!
Firebase says
Firebase Storage: The given file does not have any download URLs
when attempting to download.Environment info
firebase-tools: 9.12.1
Platform: Windows
Test case
add-content.mjs
read-content.html
Steps to reproduce
node add-content.mjs
: you should see the messagewrote
read-content.html
in chrome and check console: you should see the error message "Firebase Storage: The given file does not have any download URLs"Expected behavior
You should be able to access it.
Actual behavior
Receiving error
My intuition may be incorrect but this randomly came to my mind: May be when I save the content, emulator is not creating a default access token. The reason behind this thought is when I go to the emulator and hit the "create new access token" button for this file, emulator creates a new access token. Then everything works as fine. The
read-content.html
file runs correctly.The text was updated successfully, but these errors were encountered: