GET gs://example.appspot.com/images net::ERR_UNKNOWN_URL_SCHEME

17,198

It seems like you're putting the gs:// URL (which is an internal Google Storage reference) into a control that can't handle it (such as an img tag).

If you want to use the file in an img tag, you'll have to get the download URL for the file. From the documentation:

storageRef.child('images/stars.jpg').getDownloadURL().then(function(url) {
  // Get the download URL for 'images/stars.jpg'
  // This can be inserted into an <img> tag
  // This can also be downloaded directly
}).catch(function(error) {
  // Handle any errors
});
Share:
17,198
M'Boulas
Author by

M'Boulas

Scientist by training. Research and publications. Coding is my second life, and my passion.

Updated on August 18, 2022

Comments

  • M'Boulas
    M'Boulas over 1 year

    I've been getting this error message lately and I wonder why.

    GET gs://example.appspot.com/images net::ERR_UNKNOWN_URL_SCHEME

    Below are my references to the storage service:

    var storage = firebase.storage();
    
    var storageRef = storage.ref();
    
    var storageRefImgs = storageRef.child('images');
    

    I have Google Chrome 51 and I'm running Windows 10.