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

examples don't work on firefox #30

Open
cdepillabout opened this issue Feb 12, 2019 · 2 comments
Open

examples don't work on firefox #30

cdepillabout opened this issue Feb 12, 2019 · 2 comments
Labels
documentation Provides documentation or working example Medium Severity

Comments

@cdepillabout
Copy link

cdepillabout commented Feb 12, 2019

Since updating reflex-examples to use Obelisk to run/build the examples, it looks like the examples have stopped working on Firefox.

The last commit I could find that works on Firefox is fc13182. The next few commits after that change over to use Obelisk (5825358, d18bc83, db4673f, etc). The examples stop working in Firefox at this time.

The current master also seems to be broken in Firefox.

Here's what I'm trying to do and what happens:

  1. Run ob run in order to run the examples. Eventually it says Frontend running on http://localhost:8000/ on the console.

  2. I open http://localhost:8000 in Firefox. This displays a page that looks just like https://examples.reflex-frp.org/.

  3. However, in my terminal, I get the following message:

    Error : Unexpected Duplicate. syncCallbacks=True nBatch=2 nExpected=4
    

    Note that this is in the console where I've run ob run (not Firefox's Javascript console).

    Sometimes I get this message immediately. Sometimes it only shows up after clicking Basic To Do List. Sometimes I am able to successfully click the Basic To Do List link without seeing the error. A similar thing happens if I just immediately go to http://localhost:8000/examples/basictodo and try to enter text.

  4. I don't see any errors in the browser console.

  5. At this point the browser becomes unresponsive and no links respond to click. I can't do anything here.

I also tried running nix-build and opening ./result/ghcjs/frontend/bin/frontend.jsexe/index.html directly in Firefox, but nothing shows on the screen.

Pinging @dfordivam.


However, for some reason I don't seem to have any problem with the https://examples.reflex-frp.org site, so I'm not sure what is going on here.

@3noch
Copy link
Member

3noch commented Feb 12, 2019

ob run uses jsaddle-warp which doesn't work stably in Firefox. This is a known issue and will hopefully be fixed eventually. For now you'll have to use Chrome for development with ob run.

@cdepillabout
Copy link
Author

cdepillabout commented Feb 12, 2019

@3noch Thanks for letting me know.

I think this is the jsaddle-warp bug you're talking about, in case anyone else is interested:

ghcjs/jsaddle#64

I guess this issue (#30) can be closed, since it is an upstream problem, but it would be nice for the README to be updated with a note about ob run not working on Firefox.

As a work-around, I was able to run the server directly by following the directions from the obelisk README:

$ nix-build -A exe
$ cd result/
$ ./backend

This works in both Chromium and Firefox.

@matthewbauer matthewbauer added the documentation Provides documentation or working example label Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Provides documentation or working example Medium Severity
Projects
None yet
Development

No branches or pull requests

4 participants