Skip to content

Preload is unable to load due to failed attempt to import ../common/ipc.js #1242

@achou11

Description

@achou11

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Electron SDK Version

7.1.0

Electron Version

37.5.1

What platform are you using?

MacOS

Link to Sentry event

No response

Steps to Reproduce

  1. Install @sentry/[email protected] and set up as documented. I'm using @sentry/[email protected] and @sentry/[email protected] as well, but not sure if those are relevant to this issue.

  2. Start the application using contextIsolation: true and nodeIntegration: false for the BrowserWindows that are created (Electron's defaults)

Expected Result

There shouldn't be an error logged. I don't run into this with v7.0.0

Actual Result

I see the following logs in the devtools console (in this order):

Unable to load preload script: <redacted>/node_modules/@sentry/electron/preload/index.js
VM4 sandbox_bundle:2 Error: module not found: ../common/ipc.js
    at preloadRequire (VM4 sandbox_bundle:2:143993)
    at <anonymous>:3:13
    at runPreloadScript (VM4 sandbox_bundle:2:144262)
    at executeSandboxedPreloadScripts (VM4 sandbox_bundle:2:143535)
    at VM4 sandbox_bundle:2:153933
    at VM4 sandbox_bundle:2:154135
    at ___electron_webpack_init__ (VM4 sandbox_bundle:2:154139)
    at VM4 sandbox_bundle:2:154262
executeSandboxedPreloadScripts	@	VM4 sandbox_bundle:2

Screenshot:

Image

Metadata

Metadata

Assignees

Labels

Projects

Status

Waiting for: Product Owner

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions