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 : Unexpected Duplicate. with Warp backend. #64

Open
sheganinans opened this issue May 24, 2018 · 11 comments
Open

Error : Unexpected Duplicate. with Warp backend. #64

sheganinans opened this issue May 24, 2018 · 11 comments

Comments

@sheganinans
Copy link

sheganinans commented May 24, 2018

I keep getting this error when using the jsaddle-warp backend.
However the same exact reflex widget when using jsaddle-webkit2gtk will work perfectly fine.

To replicate this error:

git clone --recurse-submodule https://github.com/sheganinans/reflex-warp
cd reflex-warp
reflex-platform/try-reflex
nix-shell -A shells.ghc
cabal new-repl warp-reflex
main

Connect a web browser to http://localhost:3911, and click the button a few times and check the output in the cabal repl. Soon enough the error will show up and the webapp will freeze.

However if you instead run cabal new-repl webkit-reflex and try pushing the button, the app will work exactly as expected.

@sheganinans
Copy link
Author

Any luck on the replication of this bug? I tried it on a different installation of NixOS and got the same behavior.

@nomeata
Copy link

nomeata commented Jul 18, 2018

Does the browser freeze with high CPU usage? That’s what I am observing here at least…

@nomeata
Copy link

nomeata commented Jul 18, 2018

According to https://www.reddit.com/r/haskell/comments/88k18x/monthly_hask_anything_april_2018/dwm8qzr/ it is a Firefox-specific problem, and using Chrome avoids it.

@schell
Copy link

schell commented Apr 21, 2019

I see this too, it’s a bummer because FF is my main browser. Any headway?

@schell
Copy link

schell commented May 16, 2019

@3noch - you seem to have some insight into this bug. What exactly is the problem on FF?

@vincent-prz
Copy link

Upping this issue, as I really care about not having to use Chrome to use JSaddle.

@niteria
Copy link

niteria commented Jun 17, 2020

I took a look at this and minimized the example to https://github.com/niteria/jsaddle-repro

As expected it works in Chrome Version 81.0.4044.122 (Official Build) (64-bit) and fails on Firefox 77.0.1 (64-bit).

This is using the latest jsaddle and jsaddle-warp, version 0.9.7.0 for both.

@niteria
Copy link

niteria commented Jun 18, 2020

Ok, this is really the same as #51.
It fails in Firefox because Firefox completely disallows synchronous XHR requests. Chrome is less strict.

There's sync-xhr that's supposed to allow this https://featurepolicy.info/policies/sync-xhr, but it's not implemented on Firefox.

@danwdart
Copy link

So would the solution be only using async xhr?

@danwdart
Copy link

Seems to be the same as #54 too maybe

@danwdart
Copy link

danwdart commented Sep 5, 2024

Has progress been made towards this? I've been compiling to JS every time since seeing this issue - seeing as the default browser on deployments gets what looks like memory leaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants