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

Console Ninja remains inactive and doesn't detect the live server #183

Open
smcenlly opened this issue Aug 4, 2023 · 16 comments
Open

Console Ninja remains inactive and doesn't detect the live server #183

smcenlly opened this issue Aug 4, 2023 · 16 comments

Comments

@smcenlly
Copy link
Member

smcenlly commented Aug 4, 2023

Dear Console Ninja developers,

I'm trying to use your extension with my JavaScript project that runs on VS Code's live server plugin. However, Console Ninja remains inactive and doesn't detect the live server.

I've already tried:

  • Enabling live server in extension settings
  • Restarting VS Code

I'm attaching the logs that contain the following:

  • Console Ninja tries starting and stopping host
  • It installs necessary files
  • But doesn't find any tools to patch
  • And remains inactive

Could you please check if there is some problem with detecting live server or integration with it? Maybe I'm missing some step in the setup.

It would be great if you could advise on getting Console Ninja to work with live server, as it seems a very useful extension for debugging.

Thank you for your time!
Any help is much appreciated.

Let me know if you need any other details from my end.

image

i use live server
image

and latest node
image

could you help me , please?

Originally posted by @Alecto in #120 (comment)

@ArtemGovorov
Copy link
Member

@Alecto Can you please do the following:

  • open Ninja trace.log file, clear and save it,
  • double check that you have Live Server extension checked in the Ninja VS Code settings,
  • close all instances of VS Code, open an instance of VS Code with your project,
  • start Live Server on the project,
  • copy and content of the Ninja trace.log and paste it here in response.

Please also share the following:

  • What is the version of the Live Server extension that you have installed?

@Alecto
Copy link

Alecto commented Aug 7, 2023

thank you for your help, I did all the steps according to the instructions

double check that you have Live Server extension checked in the Ninja VS Code settings,

image

What is the version of the Live Server extension that you have installed?

I always use the latest version for all plugins.
live server is a latest - v5.7.9
image

close all instances of VS Code, open an instance of VS Code with your project,

done, i work with a single instance of the vscode

start Live Server on the project,

done
image

copy and content of the Ninja trace.log and paste it here in response.


08:21:49.041 info extension stopping host
08:21:49.298 info extension host process output: port:[59548]
08:21:49.279 info host ------------ starting ------------
08:21:49.293 info host removing cache folder: f5b0a8670fbdee88709b4ceefa2b7f9c
08:21:49.298 info extension 
08:21:49.308 info host client connected: extension { address: '::', family: 'IPv6', port: 59548 }
08:21:49.395 info host starting host: {"extensionFolder":"d:\\IDE\\VSCodeForStream\\data\\extensions\\wallabyjs.console-ninja-0.0.192","runtimeHookFile":"d:\\IDE\\VSCodeForStream\\data\\extensions\\wallabyjs.console-ninja-0.0.192\\out\\runtimeHook\\tracer.js","globalErrorHandlerFile":"d:\\IDE\\VSCodeForStream\\data\\extensions\\wallabyjs.console-ninja-0.0.192\\out\\runtimeHook\\errorHandler.js","filesToInstrument":[{"path":"d:\\webprojects\\learning-templates\\_____class_____\\___javascript-start\\main.js","reason":"search"},{"path":"d:\\webprojects\\learning-templates\\_____class_____\\___javascript-start\\assets\\jasmine\\main.3.spec.js","reason":"search"},{"path":"d:\\webProjects\\learning-templates\\_____class_____\\___javascript-start\\index.html","reason":"open"}],"debug":false,"config":{"dateTimeFormat":"HH:mm:ss.SSS","showDateTime":true,"installBinToPath":true,"openLinksInEditor":true,"maxLogViewerEntries":15000,"fontSize":10,"autoClearLogViewerOnFileChanges":true,"outputMode":"Beside File","captureFunctions":false,"searchUrl":"https://www.google.com/search?q={query}","enableProFeatures":true,"toolsToAutoPatch":["vite","jest","webpack","next.js","cypress","http-server","serve","live-server","nuxt","remix","qwik","hydrogen","serverless","astro","live-server-extension","live-preview-extension"],"showErrors":true,"showLogsOnlyFromOpenedFiles":false,"showLogsFromLogPointsOnly":false,"showLogsFromMultipleRunningToolsTogether":false},"allowedHosts":["localhost","127.0.0.1","example.cypress.io","boss","192.168.0.246","192.168.88.1","192.168.118.1"],"host":"127.0.0.1"}
08:21:49.406 info host starting tools discovery and integration
08:21:49.411 info host looking for tools to patch
08:21:49.413 info host worker Starting Host Worker...
08:21:49.424 info host found 1 tool file(s) to patch
08:21:49.424 info host patching d:\IDE\VSCodeForStream\data\extensions\ritwickdey.liveserver-5.7.9\node_modules\live-server\index.js
08:21:49.491 info host completed tools discovery and integration

Current status
Console Ninja is inactive. Console Ninja has scanned your project dependencies, but has not found any tools that are supported.
image

@ArtemGovorov
Copy link
Member

Thanks, can you please run through the updated set of steps below and share the result:

  • open Ninja trace.log file, clear and save it,
  • close all instances of VS Code, open an instance of VS Code with your project,
  • if Console Ninja is paused, start Console Ninja before starting Live Server (so that the paused is changed to inactive icon)
  • start Live Server on the project,
  • copy and content of the Ninja trace.log and paste it here in response.

@alia104
Copy link

alia104 commented Aug 9, 2023

I'm having the same issue and I've just completed the above steps. Here is the output from the trace.log

10:25:50.221 info extension stopping host
10:25:50.283 info extension client disconnected: 1006 
10:25:50.283 info buildHook-7214 client disconnected: 1006 
10:25:50.283 info buildHook-7214 disconnected from host: 60569
10:25:50.283 info buildHook-7214 disconnected from all hosts
10:26:07.659 info extension stopping host
10:26:07.927 info extension host process output: port:[60569]
10:26:07.915 info host ------------ starting ------------
10:26:07.922 info host removing cache folder: d6a7f8d2bb365a6515b69db23ce4952e
10:26:07.927 info extension 
10:26:07.938 info host client connected: extension { address: '::', family: 'IPv6', port: 60569 }
10:26:07.975 info host starting host: {"extensionFolder":"/Users/feliciaarchuleta/.vscode/extensions/wallabyjs.console-ninja-0.0.195","runtimeHookFile":"/Users/feliciaarchuleta/.vscode/extensions/wallabyjs.console-ninja-0.0.195/out/runtimeHook/tracer.js","globalErrorHandlerFile":"/Users/feliciaarchuleta/.vscode/extensions/wallabyjs.console-ninja-0.0.195/out/runtimeHook/errorHandler.js","filesToInstrument":[{"path":"/users/feliciaarchuleta/code/degreed/complete-javascript-course/12-numbers-dates-timers-bankist/starter/script.js","reason":"search"},{"path":"/Users/feliciaarchuleta/code/degreed/complete-javascript-course/12-Numbers-Dates-Timers-Bankist/starter/script.js","reason":"open"}],"debug":false,"config":{"dateTimeFormat":"HH:mm:ss","showDateTime":true,"installBinToPath":true,"openLinksInEditor":true,"maxLogViewerEntries":15000,"fontSize":10,"outputMode":"Beside File","captureFunctions":true,"searchUrl":"https://www.google.com/search?q={query}","enableProFeatures":true,"toolsToAutoPatch":["jest","webpack","cypress","http-server","serve","live-server","serverless","live-server-extension","live-preview-extension"],"showErrors":true,"showLogsOnlyFromOpenedFiles":false,"showLogsFromLogPointsOnly":false,"showLogsFromMultipleRunningToolsTogether":false},"allowedHosts":["localhost","127.0.0.1","example.cypress.io","T0FCX7LF9W","10.0.0.228","10.248.159.53"],"host":"127.0.0.1"}
10:26:07.987 info host starting tools discovery and integration
10:26:07.991 info host looking for tools to patch
10:26:07.997 info host found 1 tool file(s) to patch
10:26:07.997 info host patching /Users/feliciaarchuleta/.vscode/extensions/ritwickdey.liveserver-5.7.9/node_modules/live-server/index.js
10:26:08.000 info host completed tools discovery and integration
10:26:08.010 info host worker Starting Host Worker...
10:26:15.756 info buildHook-7694 installing build hook for live-server-extension at /, node v16.17.1
10:26:15.773 info buildHook-7694 allowed tools: jest, webpack, cypress, http-server, serve, live-server, serverless, live-server-extension, live-preview-extension, node
10:26:15.773 info buildHook-7694 running tools: live-server-extension
10:26:15.774 info buildHook-7694 installing fs interceptor
10:26:15.912 info host client connected: buildHook { address: '::', family: 'IPv6', port: 60569 }
10:26:15.924 info buildHook-7694 file processed (stat): 0 log points, error handler: true
10:26:15.949 info buildHook-7694 file processed (stat): 4 log points, error handler: false
10:26:15.950 info buildHook-7694 allowed tools: jest, webpack, cypress, http-server, serve, live-server, serverless, live-server-extension, live-preview-extension, node
10:26:15.950 info buildHook-7694 running tools: live-server-extension
10:26:17.150 info host client connected: runtimeHook { address: '::', family: 'IPv6', port: 60569 }
10:26:17.187 info host client connected: runtimeHook { address: '::', family: 'IPv6', port: 60569 }

@Alecto
Copy link

Alecto commented Aug 9, 2023

I did everything according to your last instructions.
I provide a log:

18:40:32.124 info buildHook-30840 installing build hook for live-server-extension at d:\ide\vscodeforstream, node v16.17.1
18:40:32.158 info buildHook-30840 allowed tools: vite, jest, webpack, next.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, live-server-extension, live-preview-extension, node
18:40:32.158 info buildHook-30840 running tools: live-server-extension
18:40:32.160 info buildHook-30840 installing fs interceptor
18:40:32.282 info host client connected: buildHook { address: '::', family: 'IPv6', port: 59548 }
18:40:32.284 info buildHook-30840 allowed tools: vite, jest, webpack, next.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, live-server-extension, live-preview-extension, node
18:40:32.284 info buildHook-30840 running tools: live-server-extension
18:40:32.292 info buildHook-30840 file processed (stat): 0 log points, error handler: false
18:40:32.316 info buildHook-30840 file processed (stat): 1 log points, error handler: false

@ArtemGovorov
Copy link
Member

@Alecto @alia104 This time from the log it looks like it has got a bit further and should now be working. Please try:

  • editing your code (where console.log is located),
  • and also try refreshing the web page in browser.

If it doesn't help, please create a sample GitHub repo demonstrating the issue, we are happy to take a look.

@Alecto
Copy link

Alecto commented Aug 10, 2023

I checked and did what you wrote. No, the plugin does not work. All the same: "Console Ninja is inactive". Thanks for taking the time and trying to help, but apparently it's not fate to use this plugin.

@alia104
Copy link

alia104 commented Aug 10, 2023

My issue seems intermittent. Whenever I see the console ninja symbol at the top of my IDE I know it's working. Even when I run through all the steps to ensure Live Server is connected it still may not work.

**Edit: There's a chance the problem could be related to being on a VPN. I just disconnected from my VPN and I'm up and running with Console Ninja again.

@smcenlly
Copy link
Member Author

There's a chance the problem could be related to being on a VPN

Thanks for letting us know. We have definitely encountered VPN issues with our other product(s), Wallaby.js and Quokka.js, which work in a similar way to Console Ninja.

Console Ninja communicates on your local machine using a localhost WebSocket. We have seen that some VPN providers have experimental settings that will block this traffic. Since everything is localhost, there's no security concern.

@zome5
Copy link

zome5 commented Aug 27, 2023

I've had the same issue. I fixed it by changing the Feature Set in settings to Community
ninja-console
By default it is set to Pro. Immediately after changing it, the status of the extension switched to running.

@smcenlly
Copy link
Member Author

In terms of how Console Ninja works, there's no technical difference between the Pro and Community edition that would stop Console Ninja from working.

We expect you may have set your Console Ninja configuration options in such a way that you are not getting the output you are expecting. Please try setting your Console Ninja configuration to the defaults, I think then Pro will work for you.

If it's still not working for you, we'd appreciate you providing your Console Ninja log file from the ~/.console-ninja/trace.log file in your user home directory

image

@zome5
Copy link

zome5 commented Aug 28, 2023

Now I cannot make it run, no matter which Feature Set I choose.
Log:

15:47:13.769 info extension stopping host
15:47:13.774 info host removing cache folder: 31b9f7957b1bf817d312a4797c61fa64
15:47:21.662 info buildHook-32864 installing build hook for live-server-extension at d:\program files (x86)\microsoft vs code, node v16.17.1
15:47:27.900 info extension stopping host
15:47:28.227 info extension host process output: port:[50802]
15:47:28.203 info host ------------ starting ------------
15:47:28.221 info host removing cache folder: 975fda819e7aeaf14a560049baa5ff9b
15:47:28.227 info extension 
15:47:28.242 info host client connected: extension { address: '::', family: 'IPv6', port: 50802 }
15:47:28.351 info host starting host: {"extensionFolder":"c:\\Users\\Alienware\\.vscode\\extensions\\wallabyjs.console-ninja-0.0.206","runtimeHookFile":"c:\\Users\\Alienware\\.vscode\\extensions\\wallabyjs.console-ninja-0.0.206\\out\\runtimeHook\\tracer.js","globalErrorHandlerFile":"c:\\Users\\Alienware\\.vscode\\extensions\\wallabyjs.console-ninja-0.0.206\\out\\runtimeHook\\errorHandler.js","filesToInstrument":[{"path":"d:\\programowanie\\vscode\\trening\\sierpień\\drag und drop\\chess\\movepatterns.js","reason":"search"},{"path":"d:\\programowanie\\VSCode\\trening\\Sierpień\\drag und drop\\chess\\main.js","reason":"open"}],"debug":false,"config":{"dateTimeFormat":"HH:mm:ss.SSS","showDateTime":true,"installBinToPath":true,"openLinksInEditor":true,"maxLogViewerEntries":15000,"fontSize":10,"autoClearLogViewerOnFileChanges":true,"outputMode":"Beside File","captureFunctions":false,"searchUrl":"https://www.google.com/search?q={query}","enableProFeatures":false,"toolsToAutoPatch":["vite","jest","webpack","next.js","cypress","http-server","serve","live-server","nuxt","remix","qwik","hydrogen","serverless","astro","live-server-extension","live-preview-extension"],"showErrors":true,"showLogsOnlyFromOpenedFiles":false,"showLogsFromLogPointsOnly":false,"showLogsFromMultipleRunningToolsTogether":false},"allowedHosts":["localhost","127.0.0.1","example.cypress.io","DESKTOP-T287QB4","192.168.178.56"],"host":"127.0.0.1"}
15:47:28.366 info host starting tools discovery and integration
15:47:28.369 info host worker Starting Host Worker...
15:47:28.372 info host looking for tools to patch
15:47:28.388 info host found 1 tool file(s) to patch
15:47:28.389 info host patching c:\Users\Alienware\.vscode\extensions\ritwickdey.liveserver-5.7.9\node_modules\live-server\index.js
15:47:28.396 info host completed tools discovery and integration
15:47:28.742 info buildHook-32864 allowed tools: vite, jest, webpack, next.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, live-server-extension, live-preview-extension, node
15:47:28.742 info buildHook-32864 running tools: live-server-extension
15:47:28.745 info buildHook-32864 installing fs interceptor
15:47:28.748 info host client connected: buildHook { address: '::', family: 'IPv6', port: 50802 }
15:47:28.749 info buildHook-32864 allowed tools: vite, jest, webpack, next.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, live-server-extension, live-preview-extension, node
15:47:28.749 info buildHook-32864 running tools: live-server-extension

@Alecto
Copy link

Alecto commented Aug 28, 2023

I tried to set pro or community - it doesnt work

@smcenlly
Copy link
Member Author

Now I cannot make it run, no matter which Feature Set I choose.

@zome5 - your log file indicates that Console Ninja did not detect that Live Server has started. The most likely reason for this is that Console Ninja is Paused. You should be able to fix this by running the VS Code command Console Ninja: Start. If the command is not available, it means that Console Ninja is already started. If the command is available then it likely explains the cause of your problem.

I tried to set pro or community - it doesnt work

@Alecto - We don't believe that Console Ninja working/not working will be affected by this setting. Can you please confirm that you are not behind a VPN / Firewall as that may be causing a problem. We're also wondering if Console Ninja works for you when not using Live Server? For example if you use a create react app project?

@tsdineshjai
Copy link

Lol. After following all steps that has been mentioned , its still no use of using this extension.

@smcenlly
Copy link
Member Author

smcenlly commented Jun 3, 2024

@tsdineshjai - can you please:

  • open Ninja ~/.console-ninja/trace.log file, clear and save it,
  • close all instances of VS Code, open an instance of VS Code with your project,
  • if Console Ninja is paused, start Console Ninja before starting Live Server (so that the paused is changed to inactive icon)
  • start Live Server on the project,
  • copy and content of the Ninja ~/.console-ninja/trace.log and paste it in your response.

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

No branches or pull requests

6 participants