When the network is bad, Sentry will prevent the program from closing properly
See original GitHub issue- Review the documentation: https://docs.sentry.io/platforms/javascript/electron/
- Search for existing issues: https://github.com/getsentry/sentry-electron/issues
- Use the latest release: https://github.com/getsentry/sentry-electron/releases
Versions + Platform
SDK version - @sentry/electron": “^3.0.4 Electron version - electron”: "17.1.2 Platform - Windows
Description
use electron forge create project and add sentry just like doc
Sentry.init({
dsn: "https://x@x.ingest.sentry.io/x",
debug: true,
beforeSend() {
console.log('beforeSend');
return null // for test
},
});
When the program is closed(click close button), the following log will be displayed and the program will not exit.
✔ Compiling Renderer Code
Sentry Logger [Log]: Integration installed: SentryMinidump
Sentry Logger [Log]: Integration installed: ElectronBreadcrumbs
Sentry Logger [Log]: Integration installed: Net
Sentry Logger [Log]: Integration installed: MainContext
Sentry Logger [Log]: Integration installed: ChildProcess
Sentry Logger [Log]: Integration installed: OnUncaughtException
Sentry Logger [Log]: Integration installed: PreloadInjection
Sentry Logger [Log]: Integration installed: AdditionalContext
Sentry Logger [Log]: Integration installed: InboundFilters
Sentry Logger [Log]: Integration installed: FunctionToString
Sentry Logger [Log]: Integration installed: Console
Sentry Logger [Log]: Integration installed: Http
Sentry Logger [Log]: Integration installed: OnUnhandledRejection
Sentry Logger [Log]: Integration installed: LinkedErrors
Sentry Logger [Log]: Integration installed: MainProcessSession
[24364:0321/150124.538:ERROR:session_preferences.cc(38)] preload script must have absolute path: ./node_modules/@sentry/electron/esm/preload/index.js
[24364:0321/150124.539:ERROR:session_preferences.cc(38)] preload script must have absolute path: ./node_modules/@sentry/electron/esm/preload/index.js
[24364:0321/150124.565:ERROR:session_preferences.cc(38)] preload script must have absolute path: ./node_modules/@sentry/electron/esm/preload/index.js
[24364:0321/150124.565:ERROR:session_preferences.cc(38)] preload script must have absolute path: ./node_modules/@sentry/electron/esm/preload/index.js
[24364:0321/150124.576:ERROR:session_preferences.cc(38)] preload script must have absolute path: ./node_modules/@sentry/electron/esm/preload/index.js
Sentry Logger [Log]: Deleted Crashpad metadata file C:\Users\Hanlin\AppData\Roaming\eletron-forge-webpack\Crashpad\metadata
Sentry Logger [Log]: Found 0 minidumps
Sentry Logger [Log]: Found previous abnormal session
Sentry Logger [Log]: Sending 'session' request
[24364:0321/150124.649:ERROR:session_preferences.cc(38)] preload script must have absolute path: ./node_modules/@sentry/electron/esm/preload/index.js
[24364:0321/150124.724:ERROR:session_preferences.cc(38)] preload script must have absolute path: ./node_modules/@sentry/electron/esm/preload/index.js
[24364:0321/150124.733:ERROR:session_preferences.cc(38)] preload script must have absolute path: ./node_modules/@sentry/electron/esm/preload/index.js
Sentry Logger [Log]: Error sending Error: net::ERR_CONNECTION_REFUSED
Sentry Logger [Log]: Queuing request
Sentry Logger [Log]: [MainProcessSession] Exit Handler
Sentry Logger [Log]: Ending session
Sentry Logger [Log]: Sending 'session' request
Sentry Logger [Log]: Error sending Error: net::ERR_CONNECTION_REFUSED
Sentry Logger [Log]: Queuing request
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: net::ERR_CONNECTION_REFUSED
at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:101:7068)
at SimpleURLLoaderWrapper.emit (node:events:390:28)
at SimpleURLLoaderWrapper.emit (node:domain:475:12)
(node:24364) UnhandledPromiseRejectionWarning: Error: net::ERR_CONNECTION_REFUSED
at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:101:7068)
at SimpleURLLoaderWrapper.emit (node:events:390:28)
at SimpleURLLoaderWrapper.emit (node:domain:475:12)
(Use `electron --trace-warnings ...` to show where the warning was created)
(node:24364) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
beforeSend
Sentry Logger [Error]: SentryError: `beforeSend` returned `null`, will not send event.
Sentry Logger [Log]: Found a request in the queue
Sentry Logger [Log]: Sending 'session' request
Sentry Logger [Log]: Error sending Error: net::ERR_CONNECTION_REFUSED
Sentry Logger [Log]: Queuing request
Sentry Logger [Log]: Found a request in the queue
Sentry Logger [Log]: Sending 'session' request
Sentry Logger [Log]: Error sending Error: net::ERR_CONNECTION_REFUSED
Sentry Logger [Log]: Queuing request
Sentry Logger [Log]: Found a request in the queue
Sentry Logger [Log]: Sending 'session' request
Sentry Logger [Log]: Error sending Error: net::ERR_CONNECTION_REFUSED
Sentry Logger [Log]: Queuing request
[19536:0321/150324.636:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is disabled, ANGLE is
Sentry Logger [Log]: Found a request in the queue
Sentry Logger [Log]: Sending 'session' request
Sentry Logger [Log]: Error sending Error: net::ERR_CONNECTION_REFUSED
Sentry Logger [Log]: Queuing request
and why Sentry keeps showing ERROR:session_preferences.cc(38)] preload script must have absolute path: ./node_modules/@sentry/electron/esm/preload/index.js
?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
[55] Failed sending data to the peer (Send failure: Broken pipe ...
when i upload-dsym by command: sentry-cli --log-level debug ... 502 is a bad gateway error, meaning that sentry isn't responding correctly.
Read more >Sessions | Sentry Developer Documentation
This saved file can be detected on application restart to close the session as abnormal . Errored sessions are determined by an errors...
Read more >Close the Loop with User Feedback | Product Blog • Sentry
The User Feedback API For creating a user feedback object, Sentry needs the eventId to associate the user feedback to the corresponding event....
Read more >Integrated error tracking compatibility with Sentry SDK - GitLab
The purpose of this issue is ensure that integrated error tracking works with all major Sentry SDK. Sentry SDK, Does it work? MR's...
Read more >Performance Sentry User Manual
The Performance Sentry. Collection Service can be used to gather information from both base Windows Server system and networking counters and extended ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem has been solved with version 3.0.5
yes, the code is bound to the main process
I’ll try the
preload script must have absolute path
issue and submit a separate issue for tracking