wallabyjs / console-ninja

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

[Bug]: After update version 1.0.288, console-ninja don't show log in Nestjs #274

Closed tuan-zigvy closed 8 months ago

tuan-zigvy commented 9 months ago

What happened?

Console ninja not show logs in Nodejs, if use version 1.0.287 it working normally,

Version

last

Steps to reproduce (or sample repo)

image

Log output

18:16:29.399 info host ------------ starting ------------
18:16:29.495 info extension host process output: port:[43585]
18:16:29.495 info extension 
18:16:29.616 info host client connected: extension { address: '::', family: 'IPv6', port: 43585 }
18:16:29.621 info host worker Starting Host Worker...
18:16:29.666 info host starting host: {"extensionFolder":"/home/tuan-dd/.vscode-server/extensions/wallabyjs.console-ninja-1.0.289","runtimeHookFile":"/home/tuan-dd/.vscode-server/extensions/wallabyjs.console-ninja-1.0.289/out/runtimeHook/tracer.js","globalErrorHandlerFile":"/home/tuan-dd/.vscode-server/extensions/wallabyjs.console-ninja-1.0.289/out/runtimeHook/errorHandler.js","filesToInstrument":[{"path":"/home/tuan-dd/repos/booking-api/lambdaFunctions/customMessage/handler.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/lambdaFunctions/preTokenGeneration/handler.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/email-templates/mailgun/list-templates.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/email-templates/mailgun/mailgun.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/main.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/common/utils.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/shared/services/mailgun.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/discount/discount.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/discount/discount.resolver.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/guards/roles.guard.ts","autoLogPoints":[{"range":{"startLine":338,"endLine":338,"startColumn":20,"endColumn":20}}],"reason":"autoLogPoints"},{"path":"/home/tuan-dd/repos/booking-api/src/filters/gpl-exception.filter.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/vendor-withdraw-policy/vendor-withdraw-policy.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/invoice/invoice.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/base/base.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/user/user.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/vendor-service/vendor-service.resolver.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/vendor-service/vendor-rate-request.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/notification/notification.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/airport/airport.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/flight-stats/flight-stats.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/flight-stats/flight-stats.controller.ts","autoLogPoints":[{"range":{"startLine":116,"endLine":116,"startColumn":39,"endColumn":39}}],"reason":"autoLogPoints"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/auth/auth.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/booking/request-items.service.ts","autoLogPoints":[{"range":{"startLine":114,"endLine":114,"startColumn":32,"endColumn":32}},{"range":{"startLine":394,"endLine":394,"startColumn":25,"endColumn":25}}],"reason":"autoLogPoints"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/booking/booking.service.ts","autoLogPoints":[{"range":{"startLine":574,"endLine":574,"startColumn":14,"endColumn":14}},{"range":{"startLine":1114,"endLine":1114,"startColumn":25,"endColumn":25}}],"reason":"autoLogPoints"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/booking/holiday.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/booking/consumer/payment-method-SBA.consumer.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/booking/consumer/request-item.consumer.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/booking/booking.utils.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/booking/consumer/payment-method-hold-funds.consumer.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/booking/flight.service.ts","autoLogPoints":[{"range":{"startLine":739,"endLine":739,"startColumn":14,"endColumn":14}}],"reason":"autoLogPoints"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/withdraw-request/withdraw-request.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/stripe/stripe.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/stripe/stripe.resolver.ts","autoLogPoints":[{"range":{"startLine":132,"endLine":132,"startColumn":23,"endColumn":23}},{"range":{"startLine":134,"endLine":134,"startColumn":36,"endColumn":36}},{"range":{"startLine":139,"endLine":139,"startColumn":34,"endColumn":34}}],"reason":"autoLogPoints"},{"path":"/home/tuan-dd/repos/booking-api/src/interceptors/auth-user-interceptor.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/interceptors/typeorm-logger-interceptor.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/cars/cars.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/assign-agent-request/assign-agent-request.service.ts","reason":"search"},{"path":"/home/tuan-dd/repos/booking-api/src/guards/auth.guard.ts","autoLogPoints":[{"range":{"startLine":96,"endLine":96,"startColumn":48,"endColumn":48}}],"reason":"autoLogPoints"},{"path":"/home/tuan-dd/repos/booking-api/src/configuration.ts","autoLogPoints":[{"range":{"startLine":260,"endLine":260,"startColumn":28,"endColumn":28}}],"reason":"autoLogPoints"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/event-log/event-log.service.ts","autoLogPoints":[{"range":{"startLine":138,"endLine":138,"startColumn":25,"endColumn":25}}],"reason":"autoLogPoints"},{"path":"/home/tuan-dd/repos/booking-api/src/app.module.ts","reason":"open"},{"path":"/home/tuan-dd/repos/booking-api/src/modules/vendor/vendor.module.ts","reason":"open"}],"debug":false,"config":{"dateTimeFormat":"HH:mm:ss.SSS","dateTimeDisplayMode":"Relative To Oldest","installBinToPath":true,"openLinksInEditor":true,"maxLogViewerEntries":40000,"fontSize":12,"autoClearLogViewerOnFileChanges":true,"outputMode":"In View","captureFunctions":false,"searchUrl":"https://www.google.com/search?q={query}","enableProFeatures":true,"toolsToAutoPatch":["vite","angular","jest","webpack","next.js","nest.js","http-server","serve","live-server","nuxt","remix","qwik","hydrogen","serverless","astro"],"showErrors":true,"showLogsOnlyFromOpenedFiles":true,"showLogsFromLogPointsOnly":false,"showLogsFromMultipleRunningToolsTogether":true,"predictiveLoggingEnabled":false,"allowConsoleLogToTriggerPredictions":true},"allowedHosts":["localhost","127.0.0.1","example.cypress.io","Tuan-dd","172.17.21.154"],"host":"localhost"}
18:16:29.734 info host starting tools discovery and integration
18:16:29.748 info host looking for tools to patch
18:16:30.233 ERR! host could not get files because of the following error: EACCES: permission denied, scandir '/home/tuan-dd/repos/booking-api/db/postgresql/data'
18:16:30.233 info host found 0 tool file(s) to patch
18:16:30.236 info host completed tools discovery and integration
18:16:31.175 info buildHook-351233 allowed tools: vite, angular, jest, webpack, next.js, nest.js, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, node
18:16:31.175 info buildHook-351233 running tools: node
18:16:31.180 info host client connected: buildHook { address: '::', family: 'IPv6', port: 43585 }
18:16:31.212 info buildHook-351233 file processed (stat): 0 log points, error handler: false
18:16:31.223 info buildHook-351233 file processed (stat): 0 log points, error handler: false
18:16:31.224 info buildHook-351233 allowed tools: vite, angular, jest, webpack, next.js, nest.js, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, node
18:16:31.224 info buildHook-351233 running tools: node
18:16:31.233 info buildHook-351255 allowed tools: vite, angular, jest, webpack, next.js, nest.js, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, node
18:16:31.233 info buildHook-351255 running tools: node
18:16:31.236 info host client connected: buildHook { address: '::', family: 'IPv6', port: 43585 }
18:16:31.282 info buildHook-351255 file processed (stat): 0 log points, error handler: false
18:16:31.296 info buildHook-351255 file processed (stat): 0 log points, error handler: false
18:16:31.297 info buildHook-351255 allowed tools: vite, angular, jest, webpack, next.js, nest.js, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, node
18:16:31.297 info buildHook-351255 running tools: node
smcenlly commented 9 months ago

Are you using v1.0.287 on the same project and machine? Can you please provide us with the trace.log for v1.0.287?

The log shows an error in Console Ninja's mechanism that scans for your dev time tools:

EACCES: permission denied, scandir '/home/tuan-dd/repos/booking-api/db/postgresql/data' found 0 tool file(s) to patch

If v1.0.289 (the version specified in your trace file) is encountering a permission denied issue, we expect the same problem will exist with v1.0.287.

tuan-zigvy commented 9 months ago

Hi, Db folder which is mounted by docker, Mabe have option or config to Console Ninja not scan it

smcenlly commented 9 months ago

@tuan-zigvy - you didn't mention (or provide your trace.log file), but I'm assuming that you had the same problem on the earlier versions of Console Ninja.

We've added some retry logic to attempt to fix your problem in the latest version of Console Ninja, v1.0.290. Can you please update to this version and let us know if it fixes your issue?