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

notify called synchronously #812

Closed
rtfeldman opened this issue Oct 13, 2014 · 5 comments
Closed

notify called synchronously #812

rtfeldman opened this issue Oct 13, 2014 · 5 comments

Comments

@rtfeldman
Copy link
Member

Just following the error message's instructions... 😉

Uncaught Error: Error sending to port 'loadDoc': 
invalid input, expecting JSString but got undefined
elm-runtime.js:1741

Uncaught Error: The notify function has been called synchronously!
This can lead to frames being dropped.
Definitely report this to <https://github.com/elm-lang/Elm/issues>
elm-runtime.js:9143

notify elm-runtime.js:9143
(anonymous function) elm-runtime.js:1744
Uncaught Error: The notify function has been called synchronously!
This can lead to frames being dropped.
Definitely report this to <https://github.com/elm-lang/Elm/issues>

Steps to reproduce:

  1. Check out this commit in dreamwriter-elm: rtfeldman/dreamwriter@34f8d9d
  2. Install Dreamwriter's dependencies with npm install
  3. Run rm -rf node_modules/grunt-elm/test after doing npm install to work around a grunt-elm bug I haven't fixed yet (Don't accidentally build grunt-elm's tests rtfeldman/grunt-elm#3)
  4. Run npm install grunt-cli if you don't already have the Grunt CLI installed globally.
  5. Run grunt to build Dreamwriter
  6. go to localhost:8000 and click the new button in the upper-left
  7. Check the console!

This is definitely caused by my having not finished correctly implementing the JS port yet, but it does consistently reproduce an error that urged me to report it, so...here we are. 😸

@evancz
Copy link
Member

evancz commented Oct 13, 2014

This error is typically only seen by internal APIs. It's a warning for when we start an event flowing through the signal graph while already partially through the graph. The result is that things get out of sync and the previous frame will "jump ahead" of the one in front.

I am not sure why you'd be seeing it using ports though. I would guess that the locking mechanism we are using is rather coarse grained at the moment or something. In any case you can get around this with a setTimeout for now, but that's definitely not the real answer here.

@maxsnew
Copy link
Contributor

maxsnew commented Oct 13, 2014

I get this error any time I write a program that crashes.

@rtfeldman
Copy link
Member Author

Yeah it went away as soon as I finished fixing my ports stuff...just reporting it here in case being able to reproduce it proves useful for runtime development.

@mgold
Copy link
Contributor

mgold commented Oct 13, 2014

Sounds like an opportunity to check ports and provide a better error message?

@evancz
Copy link
Member

evancz commented Nov 26, 2014

I don't think there's enough to go on here, so I am going to close this for now. If we can narrow this down to a more specific issue or recommendation, let's open a new issue.

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