question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document deployment to S3

See original GitHub issue

Description

When deploying CRA apps to S3, the error document is effectively ignored by IE11. This causes all routes outside of the root route to reach IE’s default 404 page. I have not yet tested this on other IE versions.

Expected behavior

If error document is set to index.html, the application should still display the App.js component when visiting <S3-route>/anything. (Alternatively, if a customerror.html is set, it should display that, but doesn’t.)

Chrome, Firefox and Safari perform this behavior as expected.

Actual behavior

IE default 404 page.

Environment

  1. npm ls react-scripts: react-scripts@0.7.0
  2. node -v: v5.5.0
  3. npm -v: 3.5.3

Have tested from:

  1. Operating system: Win 8.1
  2. Browser and version: IE11

Reproducible Demo

I’ve got an example S3 deployment set up. You’ll notice that the root route works fine, but you’ll get the IE 404 page with any addition to the URL.

S3 Configuration:

The bucket has an open permissions policy:

{
	"Version": "2016-11-1",
	"Statement": [
		{
			"Sid": "AddPerm",
			"Effect": "Allow",
			"Principal": "*",
			"Action": [
				"s3:GetObject"
			],
			"Resource": [
				"arn:aws:s3:::demo-party/*"
			]
		}
	]
}

and is configured for static website hosting: screen shot 2016-11-01 at 10 39 56 am

More than happy to help debug further, but I’m about out of ideas on my end.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
wolovimcommented, Nov 11, 2016

I’ve written a blog post about deploying with S3 and CloudFront. Let me know if you’d like something added to the outputted README regarding either of these.

1reaction
gaearoncommented, Nov 20, 2016

When deploying CRA apps to S3, the error document is effectively ignored by IE11.

To be clear there’s nothing we can do in Create React App to fix an issue with Internet Explorer. We didn’t write it after all 😉

But it would be great to add a link to the article to user guide.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a pipeline that uses Amazon S3 as a deployment ...
Option 2: Deploy built archive files to Amazon S3 from an S3 source bucket · Step 1: Create and upload source files to...
Read more >
Deploy to S3 - CloudBees Documentation
Navigate to your project's deployment configuration page by selecting Project Settings on the top right side of the page. Next, select the Deploy...
Read more >
Deploy to Amazon S3 | Docs | Buddy: The DevOps Automation ...
Configure Amazon S3 action · Create a new project, select your Git provider and choose the repository with your project · Add a...
Read more >
S3 Deployment - Travis CI Docs
S3 Deployment. This page documents deployments using dpl v1 which currently is the default version. The next major version dpl v2 will be...
Read more >
Deploying to Amazon S3 bucket - AppVeyor
Remove all bucket/folder files before deployment ( remove_files ) - Optional. Default is false . Enable public access to published S3 objects (...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found