Skip to content
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

ObjectListOption.prefix() returns nothing #3

Open
dri94 opened this issue Apr 1, 2020 · 4 comments
Open

ObjectListOption.prefix() returns nothing #3

dri94 opened this issue Apr 1, 2020 · 4 comments
Assignees

Comments

@dri94
Copy link

dri94 commented Apr 1, 2020

If I upload an object with the options path = /test/filename.jpeg and path /test/again/filename.jpg then they do not seem to be correctly returned. When i call bucket.listObjects(), I get back a ObjectInfo that has path = /. If I then call bucket.listObject(ObjestListOption.prefix("/")), I get back no results. Is there a bug in the code or am I doing something wrong?

I imagine it all to be like the following analogy. A bucket is a hard drive in a computer. You can have multiple hard drives. A path is a specified location in that hard drive, and the full path will always be unique among files.

@kaloyan-raev
Copy link
Member

We haven't updated the Android library for more than 3 months. We plan update for next week. Hopefully, this would be something we fixed lately because I don't recall such an issue in our Go library.

@kaloyan-raev kaloyan-raev self-assigned this Apr 3, 2020
@dri94
Copy link
Author

dri94 commented Apr 9, 2020

Okay so with the same code and encryption key, It loads the initial list like before, but now when trying to load objects with the prefix "/" i get an exception io.storj.StorjException: go.Universe$proxyerror: kvmetainfo: encryption error: decryption failed, check encryption key: cipher: message authentication failed.. I am using the same encyrption key, why would it throw this error? @kaloyan-raev

@kaloyan-raev
Copy link
Member

Yes, this happens with the latest 0.12.0 release. Updating the Android libraries to latest changes did not resolve the issue, it just changed the erroneous behavior. We have issues with some corners cases with leading and trailing slashes. We are working on finding a good solution. I will update here when we have a working solution.

BTW, I am curious to hear about your use case that requires a leading slash for the files in the bucket.

@dri94
Copy link
Author

dri94 commented Apr 10, 2020

The only reason I made the path that way is because its how paths on linux are described /some/folder/scheme.file.. I then uploaded a file with a path some/folder/file.jpg. I can correctly dive into prefix ObjectInfo's however when I do a listObjects with the prefix folder/ or folder then I get 0 items back, when I should get file.jpg returned.. There still seems to be a bug somewhere.

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

No branches or pull requests

2 participants