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

Attempting to connect to S3 end with "Unable to read folder content" #330

Open
dkvasnicka opened this issue Apr 30, 2020 · 8 comments
Open
Labels

Comments

@dkvasnicka
Copy link

I'm trying to connect to S3, my credentials are correct. No matter what combination of options I choose in the dialog it always ends with this:

Screen Shot 2020-04-29 at 5 00 58 PM

Also, what is the "Buckets Location" field? It has the value of US pre-entered, but what AWS term does this "location" refer to? Is it supposed to be region? I tried keeping it there, tried us-west-2, tried empty value -- same problem every time.

@ahadas
Copy link
Member

ahadas commented May 2, 2020

Hi @dkvasnicka ,

I'll need more details from the log (that you can find in Help -> Debug console) to understand the issue, could you please lower the log level, reproduce it and provide the error you'll find in the log?

As for Buckets Location, it is mapped to s3service.default-bucket-location that is explained here

@dkvasnicka
Copy link
Author

Hi, here's the relevant portion of the log:

[2020-05-02 16:28:10.395] INFO DefaultSchemeParser.java#parse,296 Warning: path should not be empty, url=s3://s3.amazonaws.com/

[2020-05-02 16:28:10.431] FINE FocusRequester.java#run,102 focus requested on com.mucommander.commons.file.protocol.s3.S3Panel

[2020-05-02 16:29:15.891] INFO DefaultSchemeParser.java#parse,296 Warning: path should not be empty, url=s3://s3.amazonaws.com/

[2020-05-02 16:29:15.896] FINE LocationChanger.java#tryChangeCurrentFolder,273 folderURL=s3://s3.amazonaws.com/

[2020-05-02 16:29:15.898] FINE LocationChanger.java#run,624 starting folder change...

[2020-05-02 16:29:16.080] FINEST LocationChanger.java#run,846 calling setCurrentFolder

[2020-05-02 16:29:16.080] FINEST LocationManager.java#setCurrentFolder,74 calling ls()

[2020-05-02 16:29:17.454] FINE LocationManager.java#setCurrentFolder,80 Couldn't ls children of s3://s3.amazonaws.com/, error: null

[2020-05-02 16:29:17.455] FINE LocationChanger.java#run,866 Caught exception

This is after I opened the dialog, left everything as it was and only filled in the credentials (the two keys), expecting to get a list of buckets.

@dkvasnicka
Copy link
Author

The way the whole S3 feature is implemented seems very confused to me. The URL is always s3://s3.amazonaws.com/ but that is a mix of two things -- the s3 URI scheme and the hostname used when accessing S3 objects via HTTP(S). If I take the URI and try to aws s3 ls it it obviously fails because that is not a bucket in my account. When I try to fill in the bucket name so that the server URL displayed by muCommander looks right it obviously fails too because it's an S3 URI, not a HTTP URI.

@ahadas
Copy link
Member

ahadas commented May 4, 2020

@dkvasnicka thanks for the provided logs. Seems we need additional logs to investigate this, would you be willing to test this with a nightly build that outputs more information?

As for the comment on the URL, note that the s3:// scheme is there to signify muCommander that the target is S3. We don't pass it to the jets3t we use to interact with the provided host. The host s3.amazonaws.com can also be replaced with a different one that serves an S3 storage if needed.

I'm not too familiar with the aws client, how did you configure it to be able to access your account?

@dkvasnicka
Copy link
Author

dkvasnicka commented May 4, 2020

would you be willing to test this with a nightly build that outputs more information?

Absolutely!

I'm not too familiar with the aws client, how did you configure it to be able to access your account?

Standard way: added appropriate section to ~/.aws/credentials https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html

I think it would be worthwhile to think about using these config files (following confirmation/approval from the user) and allow people to just have a dropdown on the S3 connection tab to select which profile to use. But that's more of an improvement suggestion at this point. However if the library you use with S3 supports loading these configs maybe it would actually be a low hanging fruit.

@ahadas
Copy link
Member

ahadas commented May 8, 2020

Cool, thanks, I'll add more detailed to the snapshot release and let you know

@aaronpkelly
Copy link

I had the same "Unable to read folder content" issue. In order to read bucket objects, I needed to include my aws region inside the Server value:

  • Server: s3.eu-west-1.amazonaws.com

Here's my full cofiguration, this works for me:

image

@Jamie96ITS
Copy link

Jamie96ITS commented Apr 17, 2023

This issue is also occuring with a Minio self-hosted backend. This error occurs whenever I try to browse a folder that only contains other sub-folders. As soon as I add any file, even a zero byte New Text Document.txt, the folder is browsable.

@pskowronek pskowronek added the bug label Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants