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

node --inspect (from docs) debugging not working #645

Open
Redsandro opened this issue Nov 14, 2018 · 3 comments
Open

node --inspect (from docs) debugging not working #645

Redsandro opened this issue Nov 14, 2018 · 3 comments

Comments

@Redsandro
Copy link

Running node_modules/.bin/ember s and FastBoot app works fine:

ember_1  | Build successful (15195ms) – Serving on http://localhost:4200/

Running node --inspect=0.0.0.0:9230 node_modules/.bin/ember s as seen in the docs crashes the build:

ember_1  | Debugger listening on ws://0.0.0.0:9230/4cadad1e-33a2-43aa-8176-e78f2ba369c3
ember_1  | For help see https://nodejs.org/en/docs/inspector
ember_1  | Debugger attached.
ember_1  | Debugger listening on ws://127.0.0.1:43210/88de5521-81b9-41dc-be17-0e8c51d72db2
ember_1  | For help see https://nodejs.org/en/docs/inspector
ember_1  | Debugger listening on ws://127.0.0.1:43211/9866cbf3-fda7-49c4-ba29-5b697bb12e6f
ember_1  | For help see https://nodejs.org/en/docs/inspector
ember_1  | Debugger listening on ws://127.0.0.1:43212/8f347f60-5b04-49e1-8658-d766960ccbea
ember_1  | For help see https://nodejs.org/en/docs/inspector
ember_1  | Starting inspector on 127.0.0.1:43210 failed: address already in use
ember_1  | Starting inspector on 127.0.0.1:43211 failed: address already in use
ember_1  | Starting inspector on 127.0.0.1:43212 failed: address already in use
ember_1  | Build Error (broccoli-persistent-filter:Babel > [Babel: ember-cli-fastboot]) in ember-cli-fastboot/instance-initializers/clear-double-boot.js
ember_1  | 
ember_1  | Worker terminated unexpectedly
ember_1  | 
ember_1  | 
ember_1  | Stack Trace and Error Report: /tmp/error.dump.43b2d349c51e3d5ce601186b35d5e8ec.log

The crash keeps removing the files (because dockerized app) but if the error dump is really really important and the above log is not enough in terms of hints for more knowledgable people, I can add volumes so I can attach this dump. But it looks like the app is spinning (debugger keeps trying to attach) and then it crashes unexpectedly.

@Redsandro
Copy link
Author

Redsandro commented Nov 14, 2018

PS - I'm using node version 8.12.0 in this container. AFAIK the inspector issue was fixed in 8.4.0+.

@Redsandro
Copy link
Author

It's not because the app is dockerized. I tried this locally (using node 8.11.3) and I am getting the same error:

$ node --inspect ./node_modules/.bin/ember s
Debugger listening on ws://127.0.0.1:9229/67d1641a-fd42-4b42-8eff-1128e75cfb9c
For help see https://nodejs.org/en/docs/inspector
Could not start watchman
Visit https://ember-cli.com/user-guide/#watchman for more info.
Warning: failed to stat /var/www/app/tmp/broccoli_merge_trees-input_base_path-0386spy4.tmp/0
Debugger listening on ws://127.0.0.1:43210/59e7e16d-9937-4614-b44d-e797b4e01834
For help see https://nodejs.org/en/docs/inspector
Debugger listening on ws://127.0.0.1:43211/3d1c5f27-8e23-4dfb-8d98-56b83c710794
For help see https://nodejs.org/en/docs/inspector
Debugger listening on ws://127.0.0.1:43212/ee86c720-a1af-4500-9c49-fe026a0f855f
For help see https://nodejs.org/en/docs/inspector
Starting inspector on 127.0.0.1:43210 failed: address already in use
Starting inspector on 127.0.0.1:43211 failed: address already in use
Starting inspector on 127.0.0.1:43212 failed: address already in use
Build Error (broccoli-persistent-filter:Babel > [Babel: ember-cli-fastboot]) in ember-cli-fastboot/instance-initializers/clear-double-boot.js

Worker terminated unexpectedly

Stack Trace and Error Report: /tmp/error.dump.d0a52049fa710c3edc78a1199ac0e92d.log

error.dump.log:

=================================================================================

ENV Summary:

  TIME: Thu Nov 15 2018 10:32:51 GMT+0100 (CET)
  TITLE: ember
  ARGV:
  - /home/redsandro/.nvm/versions/node/v8.11.3/bin/node
  - /var/www/app/node_modules/.bin/ember
  - s
  EXEC_PATH: /home/redsandro/.nvm/versions/node/v8.11.3/bin/node
  TMPDIR: /tmp
  SHELL: /bin/bash
  PATH:
  - /home/redsandro/.nvm/versions/node/v8.11.3/bin
  - /home/redsandro/bin
  - /usr/local/sbin
  - /usr/local/bin
  - /usr/sbin
  - /usr/bin
  - /sbin
  - /bin
  - /usr/games
  - /usr/local/games
  PLATFORM: linux x64
  FREEMEM: 9321517056
  TOTALMEM: 16784859136
  UPTIME: 685
  LOADAVG: 1.05810546875,0.8154296875,0.55859375
  CPUS:
  - Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz - 1908
  - Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz - 1891
  - Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz - 1977
  - Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz - 1729
  - Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz - 1825
  - Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz - 1831
  - Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz - 1708
  - Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz - 1721
  ENDIANNESS: LE
  VERSIONS:
  - ares: 1.10.1-DEV
  - cldr: 32.0
  - http_parser: 2.8.0
  - icu: 60.1
  - modules: 57
  - napi: 3
  - nghttp2: 1.32.0
  - node: 8.11.3
  - openssl: 1.0.2o
  - tz: 2017c
  - unicode: 10.0
  - uv: 1.19.1
  - v8: 6.2.414.54
  - zlib: 1.2.11

ERROR Summary:

  - broccoliBuilderErrorStack: Error: Worker terminated unexpectedly
    at ChildProcess.<anonymous> (/var/www/app/node_modules/ember-cli-fastboot/node_modules/workerpool/lib/WorkerHandler.js:181:17)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
  - codeFrame: Worker terminated unexpectedly
  - errorMessage: Build Canceled: Broccoli Builder ran into an error with `broccoli-persistent-filter:Babel > [Babel: ember-cli-fastboot]` plugin. 💥
Worker terminated unexpectedly
  - errorType: Build Error
  - location:
    - column: [undefined]
    - file: ember-cli-fastboot/instance-initializers/clear-double-boot.js
    - line: [undefined]
    - treeDir: /var/www/app/tmp/broccoli_persistent_filterbabel__babel_ember_cli_fastboot-input_base_path-pjCTzMzJ.tmp
  - message: Build Canceled: Broccoli Builder ran into an error with `broccoli-persistent-filter:Babel > [Babel: ember-cli-fastboot]` plugin. 💥
Worker terminated unexpectedly
  - name: Error
  - nodeAnnotation: Babel: ember-cli-fastboot
  - nodeName: broccoli-persistent-filter:Babel > [Babel: ember-cli-fastboot]
  - originalErrorMessage: Worker terminated unexpectedly
  - stack: Error: Worker terminated unexpectedly
    at ChildProcess.<anonymous> (/var/www/app/node_modules/ember-cli-fastboot/node_modules/workerpool/lib/WorkerHandler.js:181:17)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

=================================================================================

@Redsandro
Copy link
Author

@mansona I believe you wrote parts of the documentation that I learnt this method from. Do you have any idea what could be going on?

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

1 participant