Closed april-swellfox closed 1 year ago
Hi,
If you created your application before last Thursday, you'll need to follow this migration guide to deploy your Next.js 13 app: https://docs.aws.amazon.com/amplify/latest/userguide/update-app-nextjs-version.html
Thank you for your reply.
I followed the instructions and it built automatically to the main branch and it was successful. My latest updates are actually in a different branch. I redeployed that particular branch and build was still successful. But this branch has an access control settings and it doesn't seem to accept the correct username and password.
So I removed the access control settings for that branch. Redeploy this version
button is no longer available. (I just found out that it takes a few minutes to see the button again).
I created a webhook for this particular branch to trigger a build. Again build was successful and the access control still prompts me to enter the username and password. I tried different browsers but still the same.
I redeployed the branch several times and same thing happened, the prompt was still there. It seems that the build ignores the access control settings.
@april-swellfox can you share your basic auth settings. Have you enabled it globally by any chance?
No, global password is unchecked. My main and develop branches are restricted but that specific branch is publicly viewable.
I pushed again just to trigger a build and it's still the same, build is successful and the prompt is still there.
@april-swellfox. april branch still not migrated. You need to migrate the branches individually. Can you please try migrating the april branch to Hosting Compute as described here https://docs.aws.amazon.com/amplify/latest/userguide/update-app-nextjs-version.html
I actually updated my main branch since that migrated successfully. It does have an access control but won't accept my username and password and I'm sure I typed the correct username and password.
Where can I see the banner with the Migrate button? I can't see it.
I created a new branch and hosted it, so it doesn't have an access control. But when it is done deploying and opened the link, there's an access control prompt.
Thank you for the updates @april-swellfox we are continuing to investigate this behavior on our end and will provide an update shortly.
Hi @april-swellfox There is a rewrite rule in your application that directs traffic to the old CloudFront distribution used prior to migrating. The requests are being made to that distribution which stores the old access control credentials - this is why your new credentials are not working. Ideally, this rule would have been deleted in the migration process but this appears to be a bug.
You can resolve this issue by navigating to App settings -> Rewrites and redirects and removing the rule.
Please let us know if removing this rule has resolved the issue for you. Thank you for your patience and we apologize for this inconvenience.
@hloriana That worked! Thank you!
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Before opening, please confirm:
App Id
dk0lb4vk3xvnt
AWS Region
us-east-1
Amplify Hosting feature
Frontend builds
Describe the bug
My app is now running Next 13. Locally, this works great. When it is almost done building, it gets this error:
Invalid next.config.js options detected.
My
next.config.js
does not havetarget
property:It seems like Amplify is adding the
target
property tonext.config.js
which is not supported in Next 13.Expected behavior
It should build successfully.
Reproduction steps
Build Settings
Log output
Additional information
No response