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

DevMode portals don't have a functional route for index.html #260

Closed
markcarroll opened this issue Apr 22, 2019 · 6 comments
Closed

DevMode portals don't have a functional route for index.html #260

markcarroll opened this issue Apr 22, 2019 · 6 comments

Comments

@markcarroll
Copy link
Contributor

markcarroll commented Apr 22, 2019

  1. Create a new stack with DeploymentMode=true
  2. Go to the S3 hosted URL emitted by CF
  3. Get Page Not Found on screen
@markcarroll
Copy link
Contributor Author

It looks like this also messes up the config.js creation. Since the write-config.js script reads the URL output from CF and then tries to add /config.js to it, this no longer works.

@echo-bravo-yahoo
Copy link
Contributor

What URL are you seeing as a stack output?

@markcarroll
Copy link
Contributor Author

Don't have it available now, but the URL I got was the S3 bucket URL root. However, going there didn't work. It came up with the nav bar and Page Not Found in the main content area. Clicking on the logo top left changed to the correct page.
Sorry, I switched away from DevMode so not able to repro right now.

@echo-bravo-yahoo echo-bravo-yahoo changed the title DevelopmentMode=true - S3 URL generated by CF gives Page Not Found DevMode portals don't have a functional route for index.html Apr 25, 2019
@echo-bravo-yahoo
Copy link
Contributor

So, the URL that the stack outputs is something like: https://STACK-NAME.s3.us-west-2.amazonaws.com/index.html. The index.html is necessary, because the S3 bucket doesn't have routing rules (like CloudFront's default object or S3 website bucket's static page). Unfortunately, the single-page webapp doesn't have a route for index.html, so it serves the 'not found' page. The best workaround for this is probably to add a route for index.html to the SPA.

Work items this issue tracks:

  • Add a route for /index.html to the SPA
  • Fix write-config to work with the S3 URLs

alex-chew pushed a commit to alex-chew/aws-api-gateway-developer-portal that referenced this issue Jun 24, 2019
@alex-chew
Copy link
Contributor

@markcarroll - The issue should be fixed by #282, with the caveat that page refresh and deep linking still do not work. If you are still experiencing the problem, please feel free to re-open the issue.

@nhy1210
Copy link

nhy1210 commented Feb 25, 2021

Page refresh and open in new tab or window are not found. I enable the S3 static web hosting and get this done but can not sign in because of the callback URL problem with Cognito. Any suggestions are much appreciated.

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

No branches or pull requests

5 participants