qoomon / aws-s3-bucket-browser

Single page application to browse AWS S3 bucket content
https://qoomon.github.io/aws-s3-bucket-browser/index.html?bucket=https://s3.amazonaws.com/spacenet-dataset#
MIT License
246 stars 85 forks source link

List Bucket response does not contain <ListBucketResult> tag! #13

Closed Jettzett closed 3 years ago

Jettzett commented 3 years ago

Hi,

I have set up permissions according to the instructions.

When accessing the page I get the following error: "List Bucket response does not contain ListBucketResult tag!"

Any hints?

qoomon commented 3 years ago

What is the response of https://s3.eu-west-1.amazonaws.com/data.openspending.org?list-type=2&delimiter=/&prefix=datasets/&max-keys=50 looks like? (adjust the example url to your bucket)

It should look like the response from the example url https://s3.eu-west-1.amazonaws.com/data.openspending.org?list-type=2&delimiter=/&prefix=datasets/&max-keys=50 looks like

Jettzett commented 3 years ago

Thank you for your reply!

The output is quite different:

`

testbucket-bucketname 1000 false 256T.png 2021-02-01T21:54:44.000Z "007523460db8a2b71e000f3fbb242867" 822 4b424560c1a02ff8a4da1454151a3c9791900aebc803aa243fcc52022a075124 STANDARD file.html 2021-02-01T22:52:07.000Z "6d007062899f2239a1b272468a5edb73" 5611 4b424560c1a02ff8a4da1454151a3c9791900aebc803aa243fcc52022a075124 STANDARD ` (.....)
qoomon commented 3 years ago

at these lines I do the check. I can't see any problems.

May you can have a look at browser consoles network tab to debug the request and corresponding response to the bucket endpoint.

qoomon commented 3 years ago

Do you host the S3 Bucket Browser HTML file a the same domain as the bucket? If not, do you allow CORS access to your bucket?

qoomon commented 3 years ago

Grant Cross Origin Access by CORS Configuration

[
{
    "AllowedHeaders": [
        "*"
    ],
    "AllowedMethods": [
        "GET"
    ],
    "AllowedOrigins": [
        "http://www.example.com"
    ],
    "ExposeHeaders": [
        "x-amz-server-side-encryption",
        "x-amz-request-id",
        "x-amz-id-2"
    ],
    "MaxAgeSeconds": 3000
}
]
Jettzett commented 3 years ago

It is hosted on the same domain, so it should not be necessary with CORS config :-) I cant see any problems in the console.

This bucket is hosted in eu-north, could there be policy differences between S3 regions?

qoomon commented 3 years ago

so even in network tab you can see the right request and response?

qoomon commented 3 years ago

if its a public bucket you may provide me the url so I can debug it.