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

Using data function with single_fetch enabled breaks when returning a status of 204 #10328

Open
holmok-bestow opened this issue Dec 12, 2024 · 0 comments

Comments

@holmok-bestow
Copy link

Reproduction

https://stackblitz.com/edit/remix-run-remix-mem1r9ss?file=app%2Froutes%2F_index.tsx

There are two pages (index and okay with links on the page to each other)

Click the submit. the index page has the action that returns a 204 and breaks, the okay page returns 200 and works.

System Info

System:
    OS: macOS 15.1.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 175.98 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.17.0 - ~/.nvm/versions/node/v20.17.0/bin/node
    Yarn: 1.22.22 - ~/.yarn/bin/yarn
    npm: 10.8.2 - ~/.nvm/versions/node/v20.17.0/bin/npm
    pnpm: 7.26.3 - ~/Library/pnpm/pnpm
  Browsers:
    Brave Browser: 129.1.70.126
    Chrome: 131.0.6778.140
    Edge: 131.0.2903.86
    Safari: 18.1.1
  npmPackages:
    @remix-run/dev: ^2.15.1 => 2.15.1
    @remix-run/node: ^2.15.1 => 2.15.1
    @remix-run/react: ^2.15.1 => 2.15.1
    @remix-run/serve: ^2.15.1 => 2.15.1
    vite: ^5.1.0 => 5.4.11

Used Package Manager

yarn

Expected Behavior

An action that uses the data function should be able to return a 204 (no content). In my application, I have routes that are only actions that do not return data used as a quasi API (for setting user prefs, for example) that don't return anything (hence the 204).

Actual Behavior

An action that uses the data function and returns a 204 status fails with Unable to decode turbo-stream response from URL... when single_fetch is enabled.

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

1 participant