New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error [ERR_INSPECTOR_NOT_AVAILABLE]: Inspector is not available when using vercel/pkg #6769
Comments
Hi, docs on how to remove integrations can be found here: https://docs.sentry.io/platforms/javascript/configuration/integrations/default/#removing-an-integration |
Thank you, I will try this out. Yet still, I don't think that it's an intended behavior, this could be a breaking change for environments without UPD: Should I provide a repro? |
I tried your solution, but app still crashes. It's because error is thrown when |
Got it. I see the problem. The Personally, I can't think of a way right now to solve your problem from the SDK side of things. Do you have ideas or recommendations? |
Yes, I think it's such quite a rare edge case. Also I recommend to check available builtin modules and process config, something like: require('node:module').builtinModules.includes('inspector')
process.config.variables.v8_enable_inspector // 1 when enabled, 0 otherwise I have ran some checks with following example script: console.log(require('node:module').builtinModules.includes('inspector'));
console.log(process.config.variables.v8_enable_inspector);
require('inspector'); Here is the terminal output: $ node builtin-check.js
true
1
$ pkg builtin-check.js && ./builtin-check-macos
> pkg@5.8.0
> Targets not specified. Assuming:
node16-linux-arm64, node16-macos-arm64, node16-win-arm64
true
0
pkg/prelude/bootstrap.js:1876
throw error;
^
Error [ERR_INSPECTOR_NOT_AVAILABLE]: Inspector is not available
at new NodeError (node:internal/errors:372:5)
at node:inspector:23:9
at NativeModule.compileForInternalLoader (node:internal/bootstrap/loaders:312:7)
at NativeModule.compileForPublicLoader (node:internal/bootstrap/loaders:252:10)
at loadNativeModule (node:internal/modules/cjs/helpers:49:9)
at Function.Module._load (node:internal/modules/cjs/loader:804:15)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at Module.require (pkg/prelude/bootstrap.js:1855:31)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/snapshot/test/builtin-check.js) {
code: 'ERR_INSPECTOR_NOT_AVAILABLE'
} I used https://github.com/standard-things/esm/blob/master/src/env/has-inspector.js for a reference. |
Here is the patch file for
|
@zolbooo This is fixed in the latest release - https://github.com/getsentry/sentry-javascript/releases/tag/7.31.0. Thanks for reporting the bug! |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/angular
SDK Version
7.30.0
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
The new
LocalVariables
integration (#6478) causes pkg-bundled app to crash. Is there a way to disable this integration?Expected Result
App should not crash
Actual Result
The text was updated successfully, but these errors were encountered: