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

Streaming does work not on Vite/MacOS #9252

Closed
vladmiller opened this issue Apr 18, 2024 · 2 comments
Closed

Streaming does work not on Vite/MacOS #9252

vladmiller opened this issue Apr 18, 2024 · 2 comments
Labels
bug:unverified feat:deferred needs-response We need a response from the original author about this issue/PR

Comments

@vladmiller
Copy link

vladmiller commented Apr 18, 2024

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())
    }),
  })
@brophdawg11
Copy link
Contributor

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 brophdawg11 added needs-response We need a response from the original author about this issue/PR feat:deferred labels Apr 18, 2024
@vladmiller vladmiller changed the title Streaming does not on Vite/MacOS Streaming does work not on Vite/MacOS Apr 18, 2024
@vladmiller
Copy link
Author

@brophdawg11 Reckon we can close the issue. I have opened the report before I have identified that it's the extension that causes troubles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:unverified feat:deferred needs-response We need a response from the original author about this issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants