wallabyjs / console-ninja

Repository for Console Ninja questions and issues
https://console-ninja.com
Other
385 stars 22 forks source link

Console Ninja does not show log messages in vite react project #165

Closed thapqui22 closed 1 year ago

thapqui22 commented 1 year ago

What happened?

Hi,console ninja not working in my project, please help me fix that.Thanks a lot.I have image for you in bottom. 2023-07-03 (1)

Version

newest

Steps to reproduce (or sample repo)

i added exxtension to my project but it dont work

Log output

10:02:42.199 info host ------------ starting ------------
10:02:42.560 info extension 
10:02:42.733 info host client connected: extension { address: '::', family: 'IPv6', port: 52532 }
10:02:42.754 info host worker Starting Host Worker...
10:02:43.055 info host starting host: {"extensionFolder":"c:\\Users\\hlan\\.vscode\\extensions\\wallabyjs.console-ninja-0.0.172","runtimeHookFile":"c:\\Users\\hlan\\.vscode\\extensions\\wallabyjs.console-ninja-0.0.172\\out\\runtimeHook\\tracer.js","globalErrorHandlerFile":"c:\\Users\\hlan\\.vscode\\extensions\\wallabyjs.console-ninja-0.0.172\\out\\runtimeHook\\errorHandler.js","filesToInstrument":[{"path":"D:\\VScode\\Study\\Project\\src\\component\\toprankingcard\\TopRankingCardChild.jsx","reason":"search"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\searchbar\\SearchBar.jsx","reason":"search"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\testpage\\TestPage.jsx","reason":"search"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\reactquilljs\\ReactQuillTest.jsx","reason":"search"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\reactquilljs\\ReactQuillJs.jsx","reason":"search"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\productreview\\ProductReview.jsx","reason":"search"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\modal\\Modal.jsx","reason":"search"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\manageproducts\\ManageProductList.jsx","reason":"search"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\manageproducts\\ManageProducts.jsx","reason":"search"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\footer\\Footer.jsx","reason":"search"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\carousel\\Card.jsx","reason":"search"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\managemyaccount\\MyAccountPage.jsx","autoLogPoints":[{"range":{"startLine":44,"endLine":44,"startColumn":0,"endColumn":0}}],"reason":"autoLogPoints"},{"path":"D:\\VScode\\Study\\Project\\src\\component\\shoppingcart\\ShoppingCart.jsx","autoLogPoints":[{"range":{"startLine":25,"endLine":25,"startColumn":0,"endColumn":0}}],"reason":"autoLogPoints"},{"path":"d:\\VScode\\Study\\Project\\src\\App.jsx","reason":"open"},{"path":"d:\\VScode\\Study\\Project\\src\\component\\payment\\Payment.jsx","reason":"open"},{"path":"d:\\VScode\\Study\\Project\\src\\component\\searchbar\\SearchBar.jsx","reason":"open"},{"path":"d:\\VScode\\Study\\Project\\src\\component\\menubar\\MenuBar.jsx","reason":"open"},{"path":"d:\\VScode\\Study\\Project\\src\\component\\checkoutpage\\CheckOutPage.jsx","reason":"open"},{"path":"d:\\VScode\\Study\\Project\\src\\component\\footer\\Footer.jsx","reason":"open"}],"debug":false,"config":{"dateTimeFormat":"HH:mm:ss.SSS","showDateTime":true,"installBinToPath":true,"openLinksInEditor":true,"maxLogViewerEntries":15000,"fontSize":10,"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},"allowedHosts":["localhost","127.0.0.1","example.cypress.io","hlan","192.168.224.90"],"host":"127.0.0.1"}
10:02:43.070 info host starting tools discovery and integration
10:02:43.079 info host looking for tools to patch
10:02:43.681 info host found 3 tool file(s) to patch
10:02:43.683 info host patching c:\Users\hlan\.vscode\extensions\ritwickdey.liveserver-5.7.9\node_modules\live-server\index.js
10:02:43.685 info host patching D:\VScode\Study\Project\node_modules\quill-video-resize-module\node_modules\webpack\lib\webpack.js
10:02:43.685 info host patching D:\VScode\Study\Project\node_modules\vite\bin\vite.js
10:02:43.688 info host completed tools discovery and integration
10:03:42.354 info buildHook-1272 installing build hook for vite at D:\VScode\Study\Project, node v16.17.1
10:03:42.362 info buildHook-1272 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
10:03:42.369 info host client connected: buildHook { address: '::', family: 'IPv6', port: 52532 }
10:03:42.362 info buildHook-1272 running tools: vite
10:03:42.364 info buildHook-1272 installing fs interceptor
10:03:42.374 info buildHook-1272 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
10:03:42.374 info buildHook-1272 running tools: vite
10:03:42.910 info buildHook-1272 file processed (stat): 0 log points, error handler: true
10:03:42.967 info buildHook-1272 file processed (stat): 0 log points, error handler: false
10:03:43.017 info buildHook-1272 file processed (stat): 1 log points, error handler: false
10:03:43.060 info buildHook-1272 file processed (stat): 0 log points, error handler: false
10:03:43.083 info buildHook-1272 file processed (stat): 2 log points, error handler: false
10:03:43.111 info buildHook-1272 file processed (stat): 0 log points, error handler: false
10:03:43.125 info buildHook-1272 file processed (stat): 1 log points, error handler: false
10:03:43.142 info buildHook-1272 file processed (stat): 4 log points, error handler: false
10:03:43.159 info buildHook-1272 file processed (stat): 0 log points, error handler: false
10:03:43.188 info buildHook-1272 file processed (stat): 2 log points, error handler: false
10:03:43.219 info buildHook-1272 file processed (stat): 0 log points, error handler: false
10:03:43.290 info buildHook-1272 file processed (stat): 0 log points, error handler: false
10:03:43.310 info buildHook-1272 file processed (stat): 1 log points, error handler: false
10:03:43.332 info buildHook-1272 file processed (stat): 2 log points, error handler: false
10:03:43.341 info buildHook-1272 file processed (stat): 1 log points, error handler: false
10:03:43.350 info buildHook-1272 file processed (stat): 1 log points, error handler: false
10:03:43.384 info buildHook-1272 file processed (stat): 0 log points, error handler: false
10:03:43.411 info buildHook-1272 file processed (stat): 1 log points, error handler: false
10:03:43.430 info buildHook-1272 file processed (stat): 0 log points, error handler: false
10:03:43.505 info buildHook-1272 file processed (stat): 1 log points, error handler: false
10:03:44.270 info host client connected: runtimeHook { address: '::', family: 'IPv6', port: 52532 }
10:03:52.205 info extension stopping host
10:03:52.262 info extension client disconnected: 1006 
10:03:52.441 info buildHook-1272 client disconnected: 1006 
10:03:52.441 info buildHook-1272 disconnected from host: 52532
10:03:52.441 info buildHook-1272 disconnected from all hosts
10:03:52.686 info extension host process output: port:[52532]
NikGovorov commented 1 year ago

Where is onClickCount function called from?

thapqui22 commented 1 year ago

Where is onClickCount function called from? i use login button for test console.log and it call from in that page.I write function and use it in one page.Thank for reading. image image

thapqui22 commented 1 year ago

Everything work but console ninja dont work.

NikGovorov commented 1 year ago

Does Console Ninja work in other files of the project?

thapqui22 commented 1 year ago

This's a first time i use it

Does Console Ninja work in other files of the project?

NikGovorov commented 1 year ago

Does Console Ninja show log messages in App.jsx file for example within the same project?

NikGovorov commented 1 year ago

Also, could you please share the full content of the LoginPage.jsx file?

thapqui22 commented 1 year ago

This's a first time i use it,and i run it in App,jsx but it dont work I create a button to test log and console ninje still dont work.It run one time for warning me abount "hideNewPassword is not defined"(at picture three and four) when i use useState but i dont declare.

Does Console Ninja show log messages in App.jsx file for example within the same project? image image image image

mburnell commented 1 year ago

We noticed your project was public, so we took a look and found the issue. Your index.html file is specifying a Content-Security-Policy that is incompatible with Console Ninja. You'll need to remove this restriction in your development environment. We're adding a check to Console Ninja to warn users when such policies are found. Some more detail about the cause can be found in https://github.com/wallabyjs/console-ninja/issues/77.

thapqui22 commented 1 year ago

We noticed your project was public, so we took a look and found the issue. Your index.html file is specifying a Content-Security-Policy that is incompatible with Console Ninja. You'll need to remove this restriction in your development environment. We're adding a check to Console Ninja to warn users when such policies are found. Some more detail about the cause can be found in #77.

thanks for helping me fix it, now i can use it