Intermittent Access Issue with Public Cloud Storage File: NoSuchKey Error

1. Context
I’m using Google Cloud Storage to host public PDF files. I have a direct URL to a file that should be publicly accessible:

https://storage.googleapis.com/my-storage/my-document.pdf

The intention is for any user to be able to access this link directly via a browser.

2. What I’ve done
The bucket my-storage is configured to allow public access.

The object my-document.pdf was successfully uploaded and is listed in the Cloud Storage Console.

The public URL provided by the console matches the one I’m using.

I’ve also verified the permissions of the object individually.

3. The problem
The issue occurs intermittently:

On the first or second attempt to access the URL directly in the browser, I get the following error:

NoSuchKey
The specified key does not exist.
No such object: my-storage/my-document.pdf

After a few more attempts or after some time, the file begins to load normally.

This error suggests that the object doesn’t exist, but it’s definitely present in the bucket.

4. What I’ve tried
Verified the object name (including casing and spacing).

Confirmed public permissions on both the bucket and the object.

Tried accessing from different browsers, networks, and incognito mode.

Waited several minutes/hours after uploading in case it’s a propagation issue, but the error still occurs sporadically.

5. Question
Is there any known reason why public objects in Cloud Storage might intermittently return a NoSuchKey error on first access attempts?

Is there any additional configuration or propagation delay that could explain this behavior?

Hi @daniloras ,

Welcome to Google Cloud Community!

After looking into the issues you’re seeing, especially the random errors when trying to access a public file on Google Cloud Storage, it seems that there are two possible reasons behind this:

  • Billing Error (UserProjectAccountProblem): This happens if the bucket is tied to a project with a shut-down billing account or if “Requester Pays” is turned on. In both cases, even public users won’t be able to access the files. You can refer to this documentation on how to check if the Requester Pays is enabled. You may also want to check if the billing account for the project is closed or disabled. To check go to your Google Cloud Console > Billing. Check if the billing account is still active. If it’s closed, either reactivate it or link a new billing account to the project.
  • Random ‘File Not Found’ (NoSuchKey): This can happen right after a file is uploaded. GCS might not have fully updated across all regions yet, so even though the file is there, it might temporarily show up as missing. For public links, there’s no built-in retry — just let users try again after a second.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.