Skip to content

building @sentry-internal/node-native-stacktrace against the latest stable electron (v38.3.0) fails #1250

@nikitakot

Description

@nikitakot

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Electron SDK Version

7.2.0

Electron Version

38.3.0

What platform are you using?

Windows

Link to Sentry event

No response

Steps to Reproduce

Trying to setup Event Loop Block Detection for my electron app.

Environment: Windows 11, Powershell 7.5.3, node v22.21.0

Isolated repro:

  1. clone the gist https://gist.github.com/nikitakot/b0dcb5c921916c84e5085ba7f9c37916
  2. $ npm i
  3. npx electron-rebuild

Rebuilding the module fails with:

$ npx electron-rebuild
⠋ Building module: @sentry-internal/node-native-stacktrace, Completed: 0

  module.cc
  win_delay_load_hook.cc
     Creating library C:\Users\playground\eventLoopBlockIntegration\node_modules\@sentry-internal\node-native-stacktrace\build\Release\stack-trace.lib and object C:\Users\playground\eventLoopBlockIntegration\node_modules\@sentry-internal\node-native-stacktrace\build\Release\stack-trace.exp
module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class v8::MaybeLocal<class v8::Value> __cdecl v8::JSON::Parse(class v8::Local<class v8::Context>,class v8::Local<class v8::String>,class std::optional<class v8::ScriptOrigin>)" (__imp_?Parse@JSON@v8@@SA?AV?$MaybeLocal@VValue@v8@@@2@V?$Local@VContext@v8@@@2@V?$Local@VString@v8@@@2@V?$optional@VScriptOrigin@v8@@@std@@@Z) [C:\Users\playground\eventLoopBlockIntegration\node_modules\@sentry-internal\node-native-stacktrace\build\stack-trace.vcxproj]
C:\Users\playground\eventLoopBlockIntegration\node_modules\@sentry-internal\node-native-stacktrace\build\Release\stack-trace.node : fatal error LNK1120: 1 unresolved externals [C:\Users\playground\eventLoopBlockIntegration\node_modules\@sentry-internal\node-native-stacktrace\build\stack-trace.vcxproj]
Error: `C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
    at ChildProcess.<anonymous> (C:\Users\playground\eventLoopBlockIntegration\node_modules\node-gyp\lib\build.js:219:23)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess._handle.onexit (node:internal/child_process:293:12)

✖ Rebuild Failed

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'C:\Users\playground\eventLoopBlockIntegration\node_modules\@sentry-internal\node-native-stacktrace'

Error: node-gyp failed to rebuild 'C:\Users\playground\eventLoopBlockIntegration\node_modules\@sentry-internal\node-native-stacktrace'
    at ChildProcess.<anonymous> (file:///C:/Users/playground/eventLoopBlockIntegration/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js:114:24)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess._handle.onexit (node:internal/child_process:293:12)

Expected Result

Modules are built successfully and app launches.

Actual Result

Modules built fails and app fails to launch.

Metadata

Metadata

Assignees

Labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions