nextron icon indicating copy to clipboard operation
nextron copied to clipboard

How i can debug errors on production app

Open AguaPotavel opened this issue 1 year ago • 8 comments

When I run the app using "run dev," everything works fine. Additionally, when I build the app, there are no issues during the process. However, after installing the built app, errors occur when running it. Unfortunately, I'm having trouble identifying which library is causing these errors.

image

AguaPotavel avatar Feb 28 '24 22:02 AguaPotavel

Same

nitives avatar Mar 09 '24 22:03 nitives

Same

hi nitives, u using pnpm? i changed to yarn and now works fine, but really can't debug errors on production app

AguaPotavel avatar Mar 10 '24 19:03 AguaPotavel

Same

hi nitives, u using pnpm? i changed to yarn and now works fine, but really can't debug errors on production app

I just stopped attempting to use it, I was using normal npm and

nitives avatar Mar 10 '24 19:03 nitives

The only way I found I could debug is to write logs to a file and read it

Psycokwet avatar Mar 20 '24 11:03 Psycokwet

I tried using electron-log which basically write the logs to a file and it works for me right now.

Other options are:

  • 3rd party monitoring services
    • Sentry
    • New Relic
  • Setup IPC connection that sends every log from the main process to the renderer process and log them from their. This setup works if you allow devTools to true.

kentezrabetita avatar Mar 27 '24 02:03 kentezrabetita

I tried using electron-log which basically write the logs to a file and it works for me right now.

Other options are:

  • 3rd party monitoring services

    • Sentry
    • New Relic
  • Setup IPC connection that sends every log from the main process to the renderer process and log them from their. This setup works if you allow devTools to true.

I totally do the same in my current project using IPC. and It is very helpful.

bm777 avatar Apr 12 '24 18:04 bm777

Personally I use electron-unhandled which works nicely. It also lets you send git issues with a report button.

SotirisVas avatar Apr 23 '24 15:04 SotirisVas

Maybe this helps as inspiration: We're also using electron-log with some nifty helpers for error logging, which gives better insights to the error stack. We're pretty happy and it has helped a lot so far.

https://github.com/blib-la/captain/blob/4afb7d4a1b70bcce9862aa78d602838053bd9cd9/src/electron/helpers/services/logger.ts

We did consider electron-unhandled but went for electron-log instead. You could also chekout electron-debug

In the end it's really up to your preference.

pixelass avatar May 01 '24 17:05 pixelass