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

Error: Unable to decode turbo-stream response from URL #10348

Open
zackperdue opened this issue Dec 18, 2024 · 3 comments
Open

Error: Unable to decode turbo-stream response from URL #10348

zackperdue opened this issue Dec 18, 2024 · 3 comments

Comments

@zackperdue
Copy link

Reproduction

https://stackblitz.com/edit/remix-run-remix-gpjalp3q?file=app%2Froutes%2Fitems.%24slug.tsx

System Info

System:
    OS: macOS 15.1.1
    CPU: (14) arm64 Apple M3 Max
    Memory: 107.41 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v18.19.0/bin/npm
    pnpm: 8.15.3 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 131.0.6778.140
    Safari: 18.1.1

Used Package Manager

npm

Expected Behavior

When loading this route the page should load correctly and page should be visible.

Actual Behavior

at cu (https://website.com/assets/components-BetrtQQV.js:112:2432)
    at async ih (https://website.com/assets/components-BetrtQQV.js:112:1485)
    at async xn (https://website.com/assets/index-uys_nLR2.js:11:4625)
    at async ke (https://website.com/assets/index-uys_nLR2.js:10:29048)
    at async Nt (https://website.com/assets/index-uys_nLR2.js:10:29667)
    at async _r (https://website.com/assets/index-uys_nLR2.js:10:23174)
    at async Pe (https://website.com/assets/index-uys_nLR2.js:10:20554)
    at async Object.It [as navigate] (https://website.com/assets/index-uys_nLR2.js:10:18894)
@clowNay
Copy link

clowNay commented Dec 19, 2024

I'm seeing the same issue here, does it have something to with basename/base? It seems to me that it is the request to .data that fails, because it hits an invalid URL.

In my example I have base of /dev/foo/bar/ and if I load a routing link that points to path / it seems to try to fetch loaderData from /dev/foo/bar.data which to me seems a bit incorrect.

@zackperdue
Copy link
Author

I'm seeing the same issue here, does it have something to with basename/base? It seems to me that it is the request to .data that fails, because it hits an invalid URL.

In my example I have base of /dev/foo/bar/ and if I load a routing link that points to path / it seems to try to fetch loaderData from /dev/foo/bar.data which to me seems a bit incorrect.

Yeah I'm not too sure. I'm hosting on lambdas but I'm not sure if that matters. The page never loads no matter how I navigate to it whether with a link or directly. The weird thing is it only happens when it's deployed and not in dev mode on my local machine.

@zackperdue
Copy link
Author

zackperdue commented Dec 19, 2024

I also have two very similar routes. One works but the other doesn't and gets this turbo stream error.

working:
route: _public.items.$slug.tsx
url: website.com/items/some-thing

not working:
route: _public.some-items.$slug.tsx
url: website.com/some-items/another-thing

I also tried something just to see, and this worked:
route: _public.someItems.$slug.tsx
url: website.com/someItems/another-thing

it seems as though its breaking when hyphens are included in the path as well as a route parameter.

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

2 participants