Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

REPL reloads itself when typing into the console #119

Closed
calvinl opened this issue Aug 17, 2018 · 5 comments
Closed

REPL reloads itself when typing into the console #119

calvinl opened this issue Aug 17, 2018 · 5 comments

Comments

@calvinl
Copy link

calvinl commented Aug 17, 2018

Steps to reproduce

Tell us about your environment:

  • ndb version: v1.0.23
  • Platform / OS version: macOS High Sierra (10.13.6 (17G65))
  • Node.js version: v10.9.0

What steps will reproduce the problem?

  1. Install ndb globally or locally.
  2. Create a javascript file and add arbitrary code - I just used a simple console.log.
  3. Run ndb file.js
  4. Try typing into the console/repl. With (almost) every keystroke, the repl reloads and says "Welcome to the ndb REPL!"

What is the expected result?

The REPL doesn't reload.

What happens instead?
The REPL (seemingly) reloads on keystroke. See screenshot.

screen shot 2018-08-16 at 9 37 11 pm

In the terminal, this appears:

 1: 0x10003818c node::Abort() [/usr/local/Cellar/node/10.9.0/bin/node]
 2: 0x100093973 node::BackgroundTaskRunner::PostDelayedTask(std::__1::unique_ptr<v8::Task, std::__1::default_delete<v8::Task> >, double) [/usr/local/Cellar/node/10.9.0/bin/node]
 3: 0x100173b9a v8_inspector::V8InspectorImpl::EvaluateScope::setTimeout(double) [/usr/local/Cellar/node/10.9.0/bin/node]
 4: 0x10017c03e v8_inspector::V8RuntimeAgentImpl::evaluate(v8_inspector::String16 const&, v8_inspector::protocol::Maybe<v8_inspector::String16>, v8_inspector::protocol::Maybe<bool>, v8_inspector::protocol::Maybe<bool>, v8_inspector::protocol::Maybe<int>, v8_inspector::protocol::Maybe<bool>, v8_inspector::protocol::Maybe<bool>, v8_inspector::protocol::Maybe<bool>, v8_inspector::protocol::Maybe<bool>, v8_inspector::protocol::Maybe<bool>, v8_inspector::protocol::Maybe<double>, std::__1::unique_ptr<v8_inspector::protocol::Runtime::Backend::EvaluateCallback, std::__1::default_delete<v8_inspector::protocol::Runtime::Backend::EvaluateCallback> >) [/usr/local/Cellar/node/10.9.0/bin/node]
 5: 0x10013fe8a v8_inspector::protocol::Runtime::DispatcherImpl::evaluate(int, std::__1::unique_ptr<v8_inspector::protocol::DictionaryValue, std::__1::default_delete<v8_inspector::protocol::DictionaryValue> >, v8_inspector::protocol::ErrorSupport*) [/usr/local/Cellar/node/10.9.0/bin/node]
 6: 0x10013e3f7 v8_inspector::protocol::Runtime::DispatcherImpl::dispatch(int, v8_inspector::String16 const&, std::__1::unique_ptr<v8_inspector::protocol::DictionaryValue, std::__1::default_delete<v8_inspector::protocol::DictionaryValue> >) [/usr/local/Cellar/node/10.9.0/bin/node]
 7: 0x100118bd4 v8_inspector::protocol::UberDispatcher::dispatch(std::__1::unique_ptr<v8_inspector::protocol::Value, std::__1::default_delete<v8_inspector::protocol::Value> >, int*, v8_inspector::String16*) [/usr/local/Cellar/node/10.9.0/bin/node]
 8: 0x100176b0f v8_inspector::V8InspectorSessionImpl::dispatchProtocolMessage(v8_inspector::StringView const&) [/usr/local/Cellar/node/10.9.0/bin/node]
 9: 0x1000e0bc1 node::inspector::NodeInspectorClient::dispatchMessageFromFrontend(int, v8_inspector::StringView const&) [/usr/local/Cellar/node/10.9.0/bin/node]
10: 0x1000e0932 node::inspector::(anonymous namespace)::SameThreadInspectorSession::Dispatch(v8_inspector::StringView const&) [/usr/local/Cellar/node/10.9.0/bin/node]
11: 0x1000ecab0 void node::inspector::(anonymous namespace)::AnotherThreadObjectReference<node::inspector::(anonymous namespace)::MainThreadSessionState>::Apply<std::__1::unique_ptr<v8_inspector::StringBuffer, std::__1::default_delete<v8_inspector::StringBuffer> > >(node::inspector::(anonymous namespace)::MainThreadSessionState*, void (node::inspector::(anonymous namespace)::MainThreadSessionState::*)(std::__1::unique_ptr<v8_inspector::StringBuffer, std::__1::default_delete<v8_inspector::StringBuffer> >), std::__1::unique_ptr<v8_inspector::StringBuffer, std::__1::default_delete<v8_inspector::StringBuffer> >&) [/usr/local/Cellar/node/10.9.0/bin/node]
12: 0x1000eb830 node::inspector::MainThreadInterface::DispatchMessages() [/usr/local/Cellar/node/10.9.0/bin/node]
13: 0x1000947f7 node::PerIsolatePlatformData::RunForegroundTask(std::__1::unique_ptr<v8::Task, std::__1::default_delete<v8::Task> >) [/usr/local/Cellar/node/10.9.0/bin/node]
14: 0x100093e0f node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/usr/local/Cellar/node/10.9.0/bin/node]
15: 0x100774ec5 uv__async_io [/usr/local/Cellar/node/10.9.0/bin/node]
16: 0x1007841e6 uv__io_poll [/usr/local/Cellar/node/10.9.0/bin/node]
17: 0x100775341 uv_run [/usr/local/Cellar/node/10.9.0/bin/node]
18: 0x10003f89a node::Start(v8::Isolate*, node::IsolateData*, int, char const* const*, int, char const* const*) [/usr/local/Cellar/node/10.9.0/bin/node]
19: 0x10003ec52 node::Start(uv_loop_s*, int, char const* const*, int, char const* const*) [/usr/local/Cellar/node/10.9.0/bin/node]
20: 0x10003e8ff node::Start(int, char**) [/usr/local/Cellar/node/10.9.0/bin/node]
21: 0x100003034 start [/usr/local/Cellar/node/10.9.0/bin/node]
@alexkozy
Copy link
Contributor

alexkozy commented Aug 17, 2018

Thanks for your report. The root is on the node side: nodejs/node#22157
Workaround until we fix it:

  1. click gear button on the top right side of console.
  2. uncheck "Eager evaluation" checkbox.

We should fix it fast.

screen shot 2018-08-16 at 7 09 44 pm

@alexkozy
Copy link
Contributor

I created pull request to Node and I hope to get it merged before next Node 10 release.
nodejs/node#22383

@alexkozy
Copy link
Contributor

Most likely next Node 10 release will happen around next Tuesday and it will include fix, I will update this issue as soon as it happens.

@alexkozy
Copy link
Contributor

Finally fixed with Node 10.10, please update your node and thanks for your report.

@calvinl
Copy link
Author

calvinl commented Sep 11, 2018

@ak239 thanks so much! great job resolving this. 👍 will test it out as soon as I have a chance to.

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

No branches or pull requests

2 participants