title: FirebaseError: Bucket name not specified or invalid
body: <p>I'm following a tutorial online for building a Social media app using Firebase on React. </p>
  
  <p>What I'm finding very puzzling is I <strong>can</strong> access the storage bucket when I create a new user, setting the default sign-up image from one I've uploaded in the Firebase Storage (using the storage bucket endpoint).</p>
  
  <p>However, when I try to send a POST request to update the image, using the same storage bucket endpoint, with a different image file, I get the error below:</p>
  
  <pre><code>FirebaseError: Bucket name not specified or invalid. Specify a valid bucket name via the storageBucket option when initializing the app, or specify the bucket name explicitly when calling the getBucket() method.
  </code></pre>
  
  <blockquote>
  <pre><code> at new FirebaseError (/Users/yousef/codeclan_work/run_dat/functions/node_modules/firebase-admin/lib/utils/error.js:42:28)
   at Storage.bucket (/Users/yousef/codeclan_work/run_dat/functions/node_modules/firebase-admin/lib/storage/storage.js:109:15)
   at Busboy.&lt;anonymous&gt; (/Users/yousef/codeclan_work/run_dat/functions/handlers/users.js:111:25)
   at Busboy.emit (events.js:209:13)
   at Busboy.emit (/Users/yousef/codeclan_work/run_dat/functions/node_modules/busboy/lib/main.js:37:33)
   at /Users/yousef/codeclan_work/run_dat/functions/node_modules/busboy/lib/types/multipart.js:52:13
   at processTicksAndRejections (internal/process/task_queues.js:75:11) {
  </code></pre>
  </blockquote>
  
  <pre><code>&gt;    errorInfo: {
  &gt;      code: 'storage/invalid-argument',
  &gt;      message: 'Bucket name not specified or invalid. Specify a valid bucket name via the storageBucket option when initializing the app, or specify the bucket name explicitly when calling the getBucket() method.'
  </code></pre>
  
  <p>I'm accessing both buckets via this:</p>
  
  <p><code>https://firebasestorage.googleapis.com/v0/b/${config.storageBucket}/o/${ImgFile}?alt=media</code></p>
  
  <p>I've tried manually typing in the storage bucket rather than passing in the values, and still get the same error.</p>