-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
sample-app-jsaddle doesn't work under Firefox #597
Comments
niteria
added a commit
to niteria/miso
that referenced
this issue
Jun 19, 2020
The github issue explains the rationale. The gist is that sync functions don't work in jsaddle+Firefox and miso doesn't need a sync function here, async is fine.
niteria
added a commit
to niteria/miso
that referenced
this issue
Jun 19, 2020
The github issue explains the rationale. The gist is that sync functions don't work in jsaddle+Firefox and miso doesn't need a sync function here, async is fine.
niteria
added a commit
to niteria/miso
that referenced
this issue
Jun 19, 2020
The github issue explains the rationale. The gist is that sync functions don't work in jsaddle+Firefox and miso doesn't need a sync function here, async is fine.
dmjio
pushed a commit
that referenced
this issue
Jun 19, 2020
Fixed by afe2536 |
cdfa
added a commit
to cdfa/miso
that referenced
this issue
Sep 17, 2021
I think this causes Firefox to spin indefinitely when using JSaddle. Context: dmjio#597
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If you build the
sample-app-jsaddle
app and open it inFirefox
the app will hang, loop sending many XHR requests and you getError : Unexpected Duplicate. syncCallbacks=True nBatch=4 nExpected=6
onstdout
.This is not really an issue with
miso
, but withjsaddle
.miso
is triggering ghcjs/jsaddle#64I'm opening this because I think this is easy to side-step in
miso
.Additional context
The crux of the problem with
jsaddle
+Firefox
is thatFirefox
(as opposed toChrome
) is strict about disallowing synchronous XHR requests.Synchronous XHR requests are used in
jsaddle
to implement calls from the browser to thejsaddle
backend for Haskell functions that return results.Fortunately
miso
is written in a continuation-passing style, so as far as I can tell it has no need for such functions.In fact, the only instance of using a sync function that I run into is in
miso/jsaddle-ffi/Miso/FFI.hs
Lines 221 to 227 in af33633
It's clearly not using the result, and changing from
function
toasyncFunction
on this linemiso/jsaddle-ffi/Miso/FFI.hs
Line 223 in af33633
sample-app-jsaddle
and my own app run successfully underjsaddle
onFirefox
.The text was updated successfully, but these errors were encountered: