Streaming does work not on Vite/MacOS
vladmiller opened this issue · comments
Reproduction
I have an absolutely fresh remix installation w/ streaming support.
https://github.com/vladmiller/remix-broken-streamin-test
The problem is that it does not work on my dev machine, however, the same code works in stakblitz.
I have tried downgrading local node to v18.20.2
(similar to what stackblitz) – example still fails.
System Info
Local dev environment:
System:
OS: macOS 14.4.1
CPU: (8) arm64 Apple M2
Memory: 319.02 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
npm: 10.5.0 - ~/.nvm/versions/node/v20.11.1/bin/npm
pnpm: 8.15.6 - /opt/homebrew/bin/pnpm
Watchman: 2024.04.08.00 - /opt/homebrew/bin/watchman
Browsers:
Firefox 124.0.2 (64-bit)
npmPackages:
@remix-run/dev: ^2.8.1 => 2.8.1
@remix-run/node: ^2.8.1 => 2.8.1
@remix-run/react: ^2.8.1 => 2.8.1
@remix-run/serve: ^2.8.1 => 2.8.1
vite: ^5.1.0 => 5.2.9
Used Package Manager
pnpm
Expected Behavior
After two seconds, I expect to see This is your message: Hello world
on the screen.
Actual Behavior
If fails with
This will always show.
Error loading message
Additional information
The code works on local environment in incognito mode, when all extensions are disabled.
Disabling all extensions and enabling them one by one reveals that it's Spoof Geolocation Extension
that breaks the code.
https://webextension.org/listing/spoof-geolocation.html
https://addons.mozilla.org/en-US/firefox/addon/spoof-geolocation/
Observation
This is not relevant to remix, and most likely an issue with the @hey-api/openapi-ts
package, however, OpenAPI methods generated from @hey-api/openapi-ts
are failing to defer.
return defer({
clients: Oauth2Service.getApiV2Oauth2Clients()
})
Instead I need to wrap them in another promise
return defer({
clients: new Promise(async resolve => {
resolve(await Oauth2Service.getApiV2Oauth2Clients())
}),
})
Can you clarify what you are expecting Remix to do here? The streaming repo you provided works fine for me locally in dev mode in both Chrome and Firefox. It seems like you've identified that this is an issue with the extension? Extensions have been known to cause React hydration issues in 18.2 so that may be of some help.
@brophdawg11 Reckon we can close the issue. I have opened the report before I have identified that it's the extension that causes troubles.