Skip to content

Urgent: The specified key does not exist #1037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wahengchang opened this issue Dec 22, 2015 · 4 comments
Closed

Urgent: The specified key does not exist #1037

wahengchang opened this issue Dec 22, 2015 · 4 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API.

Comments

@wahengchang
Copy link

What I do is upload file to bucket, and make public link.
it work fine when I run my local nodejs host, upload succesed, make public link and able to download, however when I deploy to my nodejs hosting (Leancloud, something like Heroku) the error message was showed.

<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
</Error>

I am sure that the json file is in the root of the folder, and the "storage" is set.

var storage = gcloud.storage({
  keyFilename:  
  projectId: 
});

it works fine in local nodejs host http://localhost:3000/#/upload but not http://mywebsite/#/upload

and formidable is used to do the file handling

@stephenplusplus
Copy link
Contributor

Can you show the code you're using and point out which part returns the error?

@stephenplusplus stephenplusplus added the api: storage Issues related to the Cloud Storage API. label Dec 22, 2015
@stephenplusplus
Copy link
Contributor

Browse some of these results for the error code and see if any strike some ideas: https://www.google.com/search?q=nosuchkey+google

It basically means the filename you're trying to download doesn't exist, so I'm wondering if it's an issue of escaping any special characters in the file name. Our library handles this already, though. And the fact it works locally but not when deployed doesn't give me any clarity on the issue either.

My only thought without seeing your code is maybe you're providing an already URI-escaped filename to this library and we are re-escaping it.

@wahengchang
Copy link
Author

hi, stephen, thanks for your reply, my problem is solved.

my project is hosted on "Leancloud", for some reason the service_key.json was not deployed and there is not error msg was showed, so I through it was a problem of the API. You are right the file is not either uploaded of makepublic.

Now, I have moved the project to Heroku, another nodejs hosting and it run well.

@stephenplusplus
Copy link
Contributor

Oh, interesting. Glad it's resolved!

sofisl pushed a commit that referenced this issue Jan 17, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 468790263

Source-Link: googleapis/googleapis@873ab45

Source-Link: googleapis/googleapis-gen@cb6f37a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API.
Projects
None yet
Development

No branches or pull requests

2 participants