Title: Error [ERR_INSPECTOR_NOT_AVAILABLE] in ANR module when using vercel/pkg · Issue #9146 · getsentry/sentry-javascript · GitHub
Open Graph Title: Error [ERR_INSPECTOR_NOT_AVAILABLE] in ANR module when using vercel/pkg · Issue #9146 · getsentry/sentry-javascript
X Title: Error [ERR_INSPECTOR_NOT_AVAILABLE] in ANR module when using vercel/pkg · Issue #9146 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/9146
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error [ERR_INSPECTOR_NOT_AVAILABLE] in ANR module when using vercel/pkg","articleBody":"### Is there an existing issue for this?\n\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [X] I have reviewed the documentation https://docs.sentry.io/\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/node\n\n### SDK Version\n\n7.72.0\n\n### Framework Version\n\n_No response_\n\n### Link to Sentry event\n\n_No response_\n\n### SDK Setup\n\n```typescript\r\nimport * as Sentry from \"@sentry/node\";\r\nimport { GraphQLError } from \"graphql\";\r\nif (process.env.NODE_ENV !== \"test\" && process.env.NODE_ENV !== \"development\") {\r\n Sentry.init({\r\n dsn: process.env.SENTRY_DSN,\r\n environment: process.env.NODE_ENV,\r\n beforeSend(event, hint) {\r\n const error = hint.originalException;\r\n if (error instanceof GraphQLError) {\r\n if (\r\n [\"EXAMPLE_ERROR_CODE\"].includes((error.extensions as { code?: string }).code ?? \"\")\r\n ) {\r\n return null;\r\n }\r\n }\r\n return event;\r\n },\r\n });\r\n}\r\n```\n\n### Steps to Reproduce\n\n1. Build an app with Sentry SDK using [vercel/pkg](https://github.com/vercel/pkg).\r\n2. Run app and experience crash\r\n\n\n### Expected Result\n\nApp should run correctly\n\n### Actual Result\n\nNew ANR detection imports `inspector` module, which is unavailable when using [vercel/pkg](https://github.com/vercel/pkg). This causes a following error:\r\n```\r\n Error [ERR_INSPECTOR_NOT_AVAILABLE]: Inspector is not available\r\n at new NodeError (node:internal/errors:388:5)\r\n at node:inspector:23:9\r\n at NativeModule.compileForInternalLoader (node:internal/bootstrap/loaders:329:7)\r\n at NativeModule.compileForPublicLoader (node:internal/bootstrap/loaders:269:10)\r\n at loadNativeModule (node:internal/modules/cjs/helpers:49:9)\r\n at Module._load (node:internal/modules/cjs/loader:813:15)\r\n at Module.require (node:internal/modules/cjs/loader:1012:19)\r\n at Module.require (pkg/prelude/bootstrap.js:1851:31)\r\n at require (node:internal/modules/cjs/helpers:102:18)\r\n at Object.\u003canonymous> (/snapshot/app/node_modules/@sentry/node/cjs/anr/index.js:5:19) { \r\n```\r\n\r\nI have reported the similar issue previously, so the solution should be similar: https://github.com/getsentry/sentry-javascript/issues/6769","author":{"url":"https://github.com/zolbooo","@type":"Person","name":"zolbooo"},"datePublished":"2023-09-30T08:15:23Z","url":"https://github.com/getsentry/sentry-javascript/issues/9146"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:245bd784-803f-d55a-8304-401ea30a30fb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEA0:68324:11957E:1769F3:6B04B185 |
| html-safe-nonce | 048cd9271d64c9cc8a67c6b218c1bc915dc440c1cd5fbe75bddaf622c3870271 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUEwOjY4MzI0OjExOTU3RToxNzY5RjM6NkIwNEIxODUiLCJ2aXNpdG9yX2lkIjoiMzEwMzA3NDk4NjUyMTU3MTcxNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d51c79d847e2ef2b22ead3fc6c3e4592fd5073c1cf3e21603dd476811c86c605 |
| hovercard-subject-tag | issue:1920169705 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/9146/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7c572307bb91b0334ac3aac447981d8bafd034b0743c2185cca74eeaef03aa77/getsentry/sentry-javascript/issues/9146 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7c572307bb91b0334ac3aac447981d8bafd034b0743c2185cca74eeaef03aa77/getsentry/sentry-javascript/issues/9146 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zolbooo |
| hostname | github.com |
| expected-hostname | github.com |
| None | f1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width