-
Notifications
You must be signed in to change notification settings - Fork 301
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
Error: [object Object] #46
Comments
Every get this figured out? I'm seeing the same problems, trying the same options in the script as you are.. applied the policies, made index.html public, etc.. can't quite figure out what is missing. Edit - Got it working.. This is what my file ended up looking like..
|
I had the same issue. Check your console--there's probably a cross-domain policy error? If so, setting a CORS policy on your S3 bucket should solve the issue. |
I'm having the same problem, and I do have a CORS policy. Can you share yours? |
@draeath Looks something like this?
|
I had the same issue. And finally change my bucket policy. |
Ditto - same issue here. Also, does the s3 bucket have to be set to website hosting, or can that be left disabled? (I have tried both, and makes no difference, I still get the same error) |
Doh - turns out I was specifying the website endpoint in the bucket url, not the REST endpoint (so, should be https://BUCKET.s3-eu-west-1.amazonaws.com not https://BUCKET.s3-website-eu-west-1.amazonaws.com). Also, have now proved that the S3 bucket does not have to be set to website hosting (if implementing using method 1 in the readme). |
Yep as long as the html and js gets returned from an HTTP GET, it should be able to run the API stuff necessary to build the index. (you could actually host these elsewhere even) |
Hi, I am getting the same error. In console, i am getting 403 Forbidden when calling in the http://BUCKET_URL/?delimiter=/ We have not made the bucket public but have bucket policy allowing access from specific IP addresses. Any idea what could be the reason. I can successfully get to index.html and it downloads list.js but then after that it shows forbidden error |
I've tried a few different approaches, and I keep ending up with the same 403 issue/output:
I have CORS and Bucket Policy set per documentation. I attempted the above solution. I also attempted this solution (issue 80).
My bucket is also structured just as in issue 80: xx.xxxx.xxx In my simplest attempt per documentation:
...results in a 403 in console. |
you have to have the policy to allow s3:ListBucket "arn:aws:s3:::<bucket_name>" and s3:GetObject on "arn:aws:s3:::<bucket_name>/*" |
Son of a gun. That would make sense. Thanks! So two quick things in case anyone runs into same issue, my final parameters are:
And with bucket policy set to:
|
Was getting this error and now getting another issue after updating my config. I'm using option #4 as I do not want to have to use the -website in the links. My config is below and my index.html is in the root of the bucket. I'd like to be able to access the file using the virtualhost style just http://bucketname.s3.amazonaws.com from the root, just the author set it up in his example, however, when I hit that page it just shows me the xml, but when i append /index.html to the end it works. Public access is on. Bucket policy is configured as well as CORS. See below. index.html
|
I ran into this, too. I think in most cases, the CORS error we're all seeing in the debug console is a red herring. The real problem occurs due using a real DNS name/multi-level name as the name of your bucket, configuring s3-bucket-listing to access your bucket via a subdomain of tl;dr:
Say we have a bucket named if (typeof S3_REGION != 'undefined') {
var BUCKET_URL = location.protocol + '//' + location.hostname + '.' + S3_REGION + '.amazonaws.com'; // e.g. just 's3' for us-east-1 region
var BUCKET_WEBSITE_URL = location.protocol + '//' + location.hostname;
} Or perhaps you've manually specified The first thing the browser tries to do is make an So why doesn't a non-HTTPS request work? Because you can't make AJAX requests to a non-HTTPS URL from an HTTPS page. The request fails before it even hits the network. If the name of your bucket contains multiple full-stop-separated parts – i.e., its AWS subdomain is more than one level below the leftmost |
Have S3 bucket in website mode with URL navigation
I think I followed your readme closely but this is what comes up.
Error: [object Object]
Here is the website endpoint (you can check the actual source from your browser).
http://images.healthwrights.org.s3-website-us-east-1.amazonaws.com/
It is in east-1 and I followed the correct rest api url for that you indicated. (no trailing /)
typo somewhere, or a setup issue or a bug?
The text was updated successfully, but these errors were encountered: