title: Firebase functions: failed to deploy Error 403 failed to read tags for host us.gcr.io
body: <p>My project consists of two NodeJS based firebase functions which have been there for months now, I wanted to change some smtp info in one, so modified it but can't deploy anymore.</p>
  <p>Things I want to clear before heading further:</p>
  <ol>
  <li>Yes, I'm properly logged in in the firebase cli.</li>
  <li>The functions are not new, changes are in only one, that too in strings, errors in both.</li>
  <li>Yes, I'm the admin of the account.</li>
  <li>The Firebase tools version is 9.16.5</li>
  </ol>
  <p>Steps I took:</p>
  <ol>
  <li><p><code>firebase deploy --only functions</code> - Worked fine, functions got deployed.</p>
  </li>
  <li><p><code>firebase emulator:start</code> - read the docs (<a href="https://firebase.google.com/docs/hosting/functions#direct-requests-to-function" rel="nofollow noreferrer">here</a>) to check on localhost, ran it, saw the issue, fixed it and tried deploying again.</p>
  </li>
  <li><p><code>firebase deploy --only functions</code> - resulted to <code>Unhandled error cleaning up build images</code> and <code>Error: Functions did not deploy properly.</code> (step 1 to 3 took barely 5 minutes).</p>
  </li>
  <li><p>Googled it, found <code>firebase deploy --only functions --debug</code> - resulted to the errors:</p>
  <pre><code>[2021-08-28T20:15:08.518Z] Got sourceToken undefined for region us-central1
  [2021-08-28T20:15:08.525Z] Total Function Deployment time: 7497
  [2021-08-28T20:15:08.525Z] 2 Functions Deployed
  [2021-08-28T20:15:08.530Z] 2 Functions Errored
  [2021-08-28T20:15:08.534Z] Average Function Deployment time: 3751
  i  functions: cleaning up build files...
  [2021-08-28T20:15:08.540Z] &gt;&gt;&gt; [apiv2][query] GET https://us.gcr.io/v2/x/gcf/us-central1/tags/list [none]
  [2021-08-28T20:15:08.541Z] &gt;&gt;&gt; [apiv2][query] GET https://us.gcr.io/v2/x/gcf/us-central1/tags/list [none]
  [2021-08-28T20:15:09.692Z] &lt;&lt;&lt; [apiv2][status] GET https://us.gcr.io/v2/x/gcf/us-central1/tags/list 403
  [2021-08-28T20:15:09.693Z] &lt;&lt;&lt; [apiv2][body] GET https://us.gcr.io/v2/x/gcf/us-central1/tags/list 
     {&quot;errors&quot;:[{&quot;code&quot;:&quot;DENIED&quot;,&quot;message&quot;:&quot;Failed to read tags for host 'us.gcr.io', 
     repository '/v2/x/gcf/us-central1/tags/list'&quot;}]}
  [2021-08-28T20:15:09.699Z] Failed docker command with error HTTP Error: 403, 
     Unknown Error {&quot;name&quot;:&quot;FirebaseError&quot;,&quot;children&quot;:[],&quot;context&quot;:{&quot;body&quot;:{&quot;errors&quot;:
     [{&quot;code&quot;:&quot;DENIED&quot;,&quot;message&quot;:&quot;Failed to read tags for host 'us.gcr.io', repository 
     '/v2/x/gcf/us-central1/tags/list'&quot;}],&quot;error&quot;:{&quot;message&quot;:&quot;Unknown Error&quot;}},
     &quot;response&quot;:{&quot;statusCode&quot;:403}},&quot;exit&quot;:1,&quot;message&quot;:&quot;HTTP Error: 403, Unknown Error&quot;,&quot;status&quot;:403} 
  </code></pre>
  </li>
  </ol>
  <p>Similar answers here on SO or <a href="https://github.com/firebase/firebase-tools/issues/641" rel="nofollow noreferrer">this github issue</a> didn't help.</p>
  <p>Is this some sort of billing issue because in firebase's function logs, I see this message <code>Billing account not configured. External network is not accessible and quotas are severely limited. Configure billing account to remove these restrictions</code>, although, the (previously deployed) function gets executed properly. But, I'm already on blaze plan.</p>
  <p><strong>Edit</strong>: I was expecting this issue related to the <code>firebase emulators:start</code> command, so, deleted the repository, re-cloned it and tried to deploy it, but no, the error still persists.</p>
  <p><strong>Edit 2</strong>: It is still not working, I've commented additional log on the <a href="https://github.com/firebase/firebase-tools/issues/3714" rel="nofollow noreferrer">Github issue</a> I created which mentions</p>
  <pre><code>&quot;error&quot;:{&quot;code&quot;:9,&quot;message&quot;:&quot;Cloud storage operation for gcf-sources-704287304411-us-
  central1 failed as the billing account is not available&quot;}
  </code></pre>
  <p>This hints of a problem with the billing account which seems fine in the billing section of the Firebase console, and the plan is Blaze.</p>
  <p>There are some questions on SO in which it has been mentioned that <code>billing account is not configured</code> and not <code>billing account is not available</code>. And, they don't help either.</p>