Skip to content

Back button for rewritten page broken in last version #25490

Closed
@PepijnSenders

Description

@PepijnSenders

What version of Next.js are you using?

10.2.3

What version of Node.js are you using?

14

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying your application?

none

Describe the Bug

Pressing the back-button to a rewritten page causes this bug for us in the latest version:

Screen Shot 2021-05-26 at 10 34 29 AM

Seems like shouldResolveHref, which was added in #25112 is now false and the router is not able to resolve the href anymore.

Expected Behavior

Back button to work.

To Reproduce

Have a page that is served through a rewrite, go to another page through a next/link transition (only reproducible on the second transition when the page has not been built yet and you're testing it locally), go back to the previous page with the browser back button will throw this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions