question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Images uploaded through Firebase Admin SDK not displaying properly in the Firebase Console

See original GitHub issue

[REQUIRED] Step 2: Describe your environment

Mac OS 10.14.6 firebase-admin : 8.7.0 Firebase Admin SDK Firebase Storage Node v10.16.0 Npm 6.12.0

[REQUIRED] Step 3: Describe the problem

I am uploading images to Firebase Storage from a Node.js app that I have built. The upload seems to go fine, but any image upload through the Firebase Admin SDK will not open in the Firebase Console. If I try clicking on the image I get:

`404. That’s an error.

The requested URL was not found on this server. That’s all we know.`

In the Firebase console detail inspector, it just infinitely spins showing a loading progress bar.

If I inspect the image through Google Cloud Console, the image opens fine.

I have not tested downloading the image from an app or through the Firebase Admin SDK to see if it works.

Steps to reproduce:

Upload an image using the Node JS Firebase Admin SDK. I have tried this to multiple directories and I get the same issue every time.

Relevant Code:

await FirebaseAdmin.storage().bucket().upload(`./ImageName/${ImageName}.png`, {destination: `Image/${ImageName}/${ImageName}.png`, gzip: true, contentType: "image/png", metadata: {contentType: "image/png"}})

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:23 (5 by maintainers)

github_iconTop GitHub Comments

63reactions
msvargascommented, Feb 7, 2020

Hi, I was have same error, review google cloud console if very simple, no display in console because firebase console need firebaseStorageDownloadTokens, check example:

first install : npm install uuid

    bucket.upload(filename, {
      destination,
      metadata: {
          metadata :{
            firebaseStorageDownloadTokens: uuidv4(),
         }
      },
    })

7reactions
Valentin-Seehausencommented, May 19, 2020

It doesn’t look like there’s anything that we can do in this repo to fix this issue. If it’s indeed an issue with the Console, please file a support issue at https://firebase.google.com/support

Come one, guys. You need external users to forward a breaking issue to another google team?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js failed to upload image file to firebase from the server
The Firebase console uses the download URL of images to display them. When you upload an image through the Admin SDK, it's using...
Read more >
Upload files with Cloud Storage on Web - Firebase
Cloud Storage for Firebase allows you to quickly and easily upload files to a Cloud Storage bucket provided and managed by Firebase.
Read more >
Uploading Images to Firebase Storage (and retrieving them)
Firebase is a platform that contains many useful features including the Firestore database which we've used in the past.
Read more >
Firebase Storage for Web: Uploading & Downloading An ...
Firebase Storage for Web: Uploading & Downloading An Image With Authentication [JavaScript].
Read more >
Upload files to Firebase Cloud Storage in ... - LogRocket Blog
To use any of the Firebase services in your app, you have to set them up for that particular project in Firebase Console....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found