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

Uncaught reference error with Monix 3.2.0 and Scala-Js 1.0.1 #1166

Closed
kbielefe opened this issue Apr 26, 2020 · 8 comments
Closed

Uncaught reference error with Monix 3.2.0 and Scala-Js 1.0.1 #1166

kbielefe opened this issue Apr 26, 2020 · 8 comments

Comments

@kbielefe
Copy link

@kbielefe kbielefe commented Apr 26, 2020

I am getting an Uncaught ReferenceError: setImmediate is not defined on this line when running under Monix 3.2.0 and Scala-Js 1.0.1. Appears to be a manifestation of this runtime behavior change. Should be able to replace it with:

if (js.typeOf(js.Dynamic.global.setImmediate) != "undefined")

A search reveals no other instances of this same idiom, but it may be worth checking for some of the other breaking changes.

@alexandru
Copy link
Member

@alexandru alexandru commented Apr 27, 2020

Thanks for the very detailed report @kbielefe, we are using setImmediate where available because setTimeout ends up being throttled, unfortunately the Node.js we are using in tests does have setImmediate available, therefore we did not catch this breaking change.

We'll fix it today and do an emergency release maybe.

alexandru added a commit to alexandru/monix that referenced this issue Apr 27, 2020
@kbielefe
Copy link
Author

@kbielefe kbielefe commented Apr 27, 2020

Thanks for the quick response. I should have mentioned this was while running in a browser/V8. For the record:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 OPR/67.0.3575.137

@Avasil
Copy link
Collaborator

@Avasil Avasil commented Apr 28, 2020

@kbielefe @adamw Could you try 3.3.0-a855f81-SNAPSHOT ?

@kbielefe
Copy link
Author

@kbielefe kbielefe commented Apr 28, 2020

Be happy to. How can I get the SNAPSHOT artifact?

@adamw
Copy link

@adamw adamw commented Apr 29, 2020

@Avasil works for sttp-client :)

@adamw
Copy link

@adamw adamw commented Apr 29, 2020

@kbielefe you need to add resolvers += Resolver.sonatypeRepo("snapshots")

@kbielefe
Copy link
Author

@kbielefe kbielefe commented Apr 29, 2020

@Avasil works great with my code.

@Avasil
Copy link
Collaborator

@Avasil Avasil commented Apr 29, 2020

Awesome, thank you for feedback and reports!

I have just released official 3.2.1 with this fix

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

4 participants