Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

[Bug] "specified key does not exist" when downloading a valid key #193

Closed
m1foley opened this issue Apr 19, 2017 · 2 comments
Closed

[Bug] "specified key does not exist" when downloading a valid key #193

m1foley opened this issue Apr 19, 2017 · 2 comments
Labels

Comments

@m1foley
Copy link
Contributor

m1foley commented Apr 19, 2017

fe0af89 seems to have broken Fake S3 for me. I get "The specified key does not exist" when trying to download with the given key. The following code works with the commit prior to this one.

> Shrine.storages[:cache].download("db4b567b56291cb67a70554045e5e577")
Aws::S3::Errors::NoSuchKey: The specified key does not exist

Proof that the key exists:

$ find tmp/fakes3
...
tmp/fakes3/mybucket/cache/db4b567b56291cb67a70554045e5e577
tmp/fakes3/mybucket/cache/db4b567b56291cb67a70554045e5e577/.fakes3_metadataFFF
tmp/fakes3/mybucket/cache/db4b567b56291cb67a70554045e5e577/.fakes3_metadataFFF/content
tmp/fakes3/mybucket/cache/db4b567b56291cb67a70554045e5e577/.fakes3_metadataFFF/metadata

Maybe the cause is that I didn't explicitly set any metadata when creating the file? With the real S3, this bucket is publicly accessible so that's an acceptable scenario.

$ cat tmp/fakes3/mybucket/cache/db4b567b56291cb67a70554045e5e577/.fakes3_metadataFFF/metadata
---
:md5: a1d0f47bad9f6f4d63dac11938cda184
:content_type: multipart/form-data; boundary=----WebKitFormBoundaryhby0J50haaPXJCzV
:size: 246
:modified_date: '2017-04-19T03:42:09.000Z'
:amazon_metadata: {}
:custom_metadata: {}
@m1foley m1foley changed the title [Bug] "specified key does not exist" for valid keys [Bug] "specified key does not exist" when downloading a valid key Apr 19, 2017
@pickhardt
Copy link
Collaborator

I'll have a look in the next few days. It seems like a bug.

@pickhardt pickhardt added the bug label Apr 27, 2017
pickhardt added a commit that referenced this issue Apr 30, 2017
@pickhardt
Copy link
Collaborator

Try version 1.1.0 - should work now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants