Skip to content

Conversation

@swarnim02
Copy link

Fixes #14583 by using joinPaths utility to normalize double slashes in getManifestUrl function, preventing ERR_NAME_NOT_RESOLVED errors

Summary

Fixes #14583 - RSC routing issue with double slashes causing ERR_NAME_NOT_RESOLVED errors.

Problem

URLs with double slashes (e.g., //en//test2/test) caused malformed manifest URLs like https://en//test/test.manifest, leading to network errors in RSC applications.

Solution

  • Import joinPaths utility in browser.tsx
  • Normalize paths in getManifestUrl function for:
    • Single path manifest URLs
    • Multiple paths in query params
    • Basename configurations

Changes

  • packages/react-router/lib/rsc/browser.tsx: Added joinPaths import and normalized paths in getManifestUrl
  • packages/react-router/tests/rsc-double-slashes-test.ts: Unit tests for URL normalization
  • integration/rsc-double-slashes-test.ts: Integration tests for RSC functionality

Testing

✅ Single path normalization: //en//test2/test/en/test2/test.manifest
✅ Multiple paths normalization in query params
✅ Basename normalization
✅ Backward compatibility with normal URLs

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Closes #14583

Fixes remix-run#14583 by using joinPaths utility to normalize double slashes
in getManifestUrl function, preventing ERR_NAME_NOT_RESOLVED errors
@changeset-bot
Copy link

changeset-bot bot commented Nov 23, 2025

🦋 Changeset detected

Latest commit: 61c961f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
react-router Patch
@react-router/architect Patch
@react-router/cloudflare Patch
@react-router/dev Patch
react-router-dom Patch
@react-router/express Patch
@react-router/node Patch
@react-router/serve Patch
@react-router/fs-routes Patch
@react-router/remix-routes-option-adapter Patch
create-react-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Nov 23, 2025

Hi @swarnim02,

Welcome, and thank you for contributing to React Router!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run.

Thanks!

- The Remix team

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Nov 23, 2025

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@timdorr
Copy link
Member

timdorr commented Nov 25, 2025

Can you fill in the changeset you created? It will be what shows up in the changelog.

@swarnim02
Copy link
Author

@timdorr Thanks! The changeset description has been updated.
Let me know if any other adjustments are needed — happy to update anything.

@swarnim02
Copy link
Author

@timdorr
Filled the changeset what next!

@timdorr
Copy link
Member

timdorr commented Nov 27, 2025

Those tests that are failing need to be fixed as well.

@timdorr
Copy link
Member

timdorr commented Nov 28, 2025

Can you remove that Markdown file? That should be in the PR description, not in the repo.

Also, can you remove the package-lock.json file? This project uses pnpm.

@swarnim02
Copy link
Author

swarnim02 commented Nov 28, 2025

@timdorr Done! I've removed both the DOUBLE_SLASHES_FIX.md file and package-lock.json file as requested. The project now only uses pnpm for package management.

I've also fixed the failing tests by updating the joinPaths function to properly normalize double slashes within path segments while preserving existing behavior for trailing slashes.

@swarnim02
Copy link
Author

@timdorr
all test should passed now
can we check it once?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RSC / Routing Issue on Double Slashes

3 participants