-
-
Notifications
You must be signed in to change notification settings - Fork 19
Closed as duplicate of#289
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Given is the situation, that a request from client for a rsc.x-component is answered with a 404 from the server.
This can happen in a proxied scenario with overlapping routes.
The code currently does not handle any case where !response.ok or !response.body exists.
Chrome shows the 404 error of the resource on the console and than hangs in an endless loop with a spinning loading symbol not reacting to any user input to stop the loading. Only entering the url input and loading an other page sometimes breaks the loop.
This problem does not exist in other browser: Safari, Firefox.
react-server/packages/react-server/client/ClientProvider.jsx
Lines 681 to 703 in cfd997c
| const component = createFromReadableStream( | |
| new ReadableStream({ | |
| type: "bytes", | |
| async start(controller) { | |
| let response; | |
| try { | |
| response = await fetch(srcString, { | |
| ...options.request, | |
| method: options.method ?? (options.body ? "POST" : "GET"), | |
| body: options.body, | |
| headers: { | |
| ...options.request?.headers, | |
| accept: "text/x-component", | |
| ...(options.noCache && { "Cache-Control": "no-cache" }), | |
| ...(options.prefetch && { "React-Server-Prefetch": "true" }), | |
| ...options.headers, | |
| }, | |
| credentials: "include", | |
| signal: abortController?.signal, | |
| }); | |
| const { body } = response; | |
| window.dispatchEvent( |
Reproduction
No response
Steps to reproduce
- goto https://d1welhqlw2qcu2.cloudfront.net/client/client in a chrome browser
- klick on link with label
/client/client (dynamic static overlap)in footer
System Info
System:
OS: macOS 15.7.1
CPU: (12) arm64 Apple M4 Pro
Memory: 714.84 MB / 48.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 25.1.0 - /opt/homebrew/bin/node
npm: 11.6.2 - /opt/homebrew/bin/npm
pnpm: 9.15.5 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 141.0.7390.123
Firefox Developer Edition: 142.0
Safari: 26.0.1
Safari Technology Preview: 26.0
npmPackages:
@lazarv/react-server: workspace:^ => 0.0.0
@lazarv/react-server-adapter-aws-lambda: workspace:^ => 0.0.0Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working