Skip to content

@sentry/node assert.default is not a function #11002

Closed
@brianYuDesign

Description

@brianYuDesign

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

7.160.0

Framework Version

No response

Link to Sentry event

No response

SDK Setup

Sentry.init({
   dsn: 'https://d63cc5d3abd141a18ad741ccd49765c3@sentry.5198755.com/32',
   environment: process.env.APP_ENV,
   tracesSampleRate: 1.0,
   release: version,
   transportOptions: {
     proxy: process.env.HTTPS_PROXY,
   },
   integrations: (integrations) => {
     return integrations.map((integration) => {
       if (integration.name === 'OnUncaughtException') {
         // override `OnUncaughtException` integration to not exit.
         return new Sentry.Integrations.OnUncaughtException({
           // do not exit if other uncaught exception handlers are registered.
           exitEvenIfOtherHandlersAreRegistered: false,
         });
       } else {
         return integration;
       }
     });
   },
 });

Steps to Reproduce

I am currently utilizing a Sentry proxy in my setup. However, this week, I've encountered instability with my proxy network, leading to the issue: assert.default is not a function.

After this error , the process is terminated.

Expected Result

here is souce code: https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/proxy/index.ts

  import * as assert from 'assert';

Actual Result

截圖 2024-03-11 上午10 40 59

Metadata

Metadata

Assignees

Labels

Package: nodeIssues related to the Sentry Node SDK

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions