title: Signed URLs on Firebase Cloud Storage suddenly become inaccessible
body: <p>The application I'm working on allows users to create businesses on the map, and upload associated images.</p>
  
  <p>I use Cloud Functions to resize images for various screen resolutions and upload those back to GCS.</p>
  
  <p>To make those images accessible to the public, I generate signed URL which gets saved in the associated entity in Real-time Database.</p>
  
  <pre><code>const [signedUrl] = await bucket.file(path).getSignedUrl({
    action: "read",
    expires: "01-01-2500",
  })
  </code></pre>
  
  <p>Until today, URLs generated as per the code above would allow anyone to view the images. Then suddenly, all of the previously generated URLs became inaccessible and instead show the following error:</p>
  
  <pre><code>&lt;Error&gt;
   &lt;Code&gt;SignatureDoesNotMatch&lt;/Code&gt;
   &lt;Message&gt;
     The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method.
   &lt;/Message&gt;
   &lt;StringToSign&gt;
     GET 16725225600 /project-name.appspot.com/placeImage%2F300w%2FUPfppRM1ZyjbwBNiakgzyQ%3D%3D.jpg
   &lt;/StringToSign&gt;
  &lt;/Error&gt;
  </code></pre>
  
  <p>I see the above message for all of the previously uploaded images. Newly uploaded images can be viewed just fine. </p>
  
  <p>My code closely mimics <a href="https://github.com/firebase/functions-samples/blob/master/generate-thumbnail/functions/index.js" rel="nofollow noreferrer">this example</a> provided by functions-samples, however I'm worried about taking this to production in case the issue becomes a recurring one.</p>
  
  <p>What could be the source of this problem and is there any way to protect ourselves against it in the future?</p>