Skip to content

Sentry fails to initialize in auth0 actionΒ #15750

@makbol

Description

@makbol

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

9.5.0

Framework Version

Node 22.13.0

Link to Sentry event

No response

Reproduction Example/SDK Setup

Initiating at the beginning of auth0 action with:

const Sentry = require('@sentry/node');

Sentry.init({
  dsn: 'https://[email protected]/4508483202973696',
  environment: 'staging'
});

Image

Steps to Reproduce

Auth0 provides extensibility via actions that are similar to AWS Lambda functions, read more here: https://auth0.com/docs/customize/actions/actions-overview

It's basically a node.js running piece of code.

Cleaning up the code of action and leaving only Sentry SDK initiation code and snipped with error thrown, causes action to work as expected (no error)

Expected Result

Initiating Sentry SDK does not create an error

Actual Result

Initiating Sentry SDK causes error (included debug option logs)

09:41:31: Sentry Logger [log]: Initializing Sentry: process: 14, thread: main.
09:41:31: Sentry Logger [log]: Integration installed: InboundFilters
09:41:31: Sentry Logger [log]: Integration installed: FunctionToString
Sentry Logger [log]: Integration installed: LinkedErrors
Sentry Logger [log]: Integration installed: RequestData
09:41:31: Sentry Logger [log]: Integration installed: Console
09:41:31: Sentry Logger [log]: Integration installed: Http
09:41:31: Sentry Logger [log]: Integration installed: NodeFetch
09:41:31: Sentry Logger [log]: Integration installed: OnUncaughtException
09:41:31: Sentry Logger [log]: Integration installed: OnUnhandledRejection
09:41:31: Sentry Logger [log]: Integration installed: ContextLines
09:41:31: Sentry Logger [log]: Integration installed: LocalVariablesAsync
09:41:31: Sentry Logger [log]: Integration installed: Context
Sentry Logger [log]: Integration installed: ChildProcess
09:41:31: Sentry Logger [log]: Integration installed: ProcessSession
Sentry Logger [log]: Integration installed: Modules
09:41:31: Sentry Logger [log]: Running in CommonJS mode.
09:41:31: Sentry Logger [debug]: @opentelemetry/api: Registered a global for diag v1.9.0.
09:41:31: Sentry Logger [debug]: @opentelemetry/api: Registered a global for trace v1.9.0.
09:41:31: Sentry Logger [debug]: @opentelemetry/api: Registered a global for context v1.9.0.
09:41:31: Sentry Logger [debug]: @opentelemetry/api: Registered a global for propagation v1.9.0.
09:41:31: Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http Applying instrumentation patch for nodejs core module on require hook { module: 'http' }
09:41:31: Sentry Logger [debug]: @sentry/instrumentation-http Applying instrumentation patch for nodejs core module on require hook { module: 'http' }
09:41:31: Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http Applying instrumentation patch for nodejs core module on require hook { module: 'https' }
09:41:31: Sentry Logger [debug]: @sentry/instrumentation-http Applying instrumentation patch for nodejs core module on require hook { module: 'https' }
09:41:31: Sentry Logger [debug]: Recording is off, propagating context in a non-recording span
09:41:32: Sentry Logger [debug]: Recording is off, propagating context in a non-recording span
09:41:32: Sentry Logger [debug]: @sentry/instrumentation-http http instrumentation for outgoing requests
09:41:32: Sentry Logger [debug]: Recording is off, propagating context in a non-recording span
09:41:32: Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http https instrumentation outgoingRequest
09:41:32: Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http http.ClientRequest return request
09:41:32: Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http outgoingRequest on response()
09:41:32: Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http outgoingRequest on end()
09:41:32: Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http outgoingRequest on request close()
09:41:32: Sentry Logger [debug]: @sentry/instrumentation-http http instrumentation for outgoing requests
09:41:32: Sentry Logger [debug]: Recording is off, propagating context in a non-recording span
09:41:32: Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http https instrumentation outgoingRequest
Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http http.ClientRequest return request
09:41:32: Sentry Logger [debug]: @sentry/instrumentation-http http instrumentation for incoming request
09:41:32: Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http http instrumentation incomingRequest
Sentry Logger [debug]: Recording is off, propagating context in a non-recording span
09:41:32: Sentry Logger [log]: Dropping request body chunk because it maximum body length of 1048576b is exceeded.
09:41:32: Sentry Logger [log]: Dropping request body chunk because it maximum body length of 1048576b is exceeded.
09:41:32: Sentry Logger [log]: Dropping request body chunk because it maximum body length of 1048576b is exceeded.
09:41:32: Sentry Logger [log]: Dropping request body chunk because it maximum body length of 1048576b is exceeded.
09:41:32: Sentry Logger [log]: Dropping request body chunk because it maximum body length of 1048576b is exceeded.
09:41:32: Sentry Logger [log]: Dropping request body chunk because it maximum body length of 1048576b is exceeded.
09:41:32: Sentry Logger [log]: Dropping request body chunk because it maximum body length of 1048576b is exceeded.
09:41:33: Sentry Logger [log]: Dropping request body chunk because it maximum body length of 1048576b is exceeded.
09:41:33: <--- Last few GCs --->

[14:0x201aa000]     2562 ms: Mark-Compact (reduce) 372.7 (379.5) -> 192.7 (197.1) MB, pooled: 0 MB, 28.67 / 0.00 ms  (average mu = 0.880, current mu = 0.857) external memory pressure; GC in old space requested
[14:0x201aa000]     2873 ms: Mark-Compact 370.1 (374.5) -> 370.0 (375.5) MB, pooled: 2 MB, 46.52 / 0.00 ms  (average mu = 0.862, current mu = 0.850) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 0xe3811e node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/usr/local/n/versions/node/22.13.0/bin/node]
 2: 0x125faf0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/usr/local/n/versions/node/22.13.0/bin/node]
 3: 0x125fdc7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/usr/local/n/versions/node/22.13.0/bin/node]
 4: 0x148d805  [/usr/local/n/versions/node/22.13.0/bin/node]
 5: 0x14a7079 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/n/versions/node/22.13.0/bin/node]
 6: 0x147b748 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/n/versions/node/22.13.0/bin/node]
09:41:33: 7: 0x147c675 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/n/versions/node/22.13.0/bin/node]
 8: 0x145534e v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/local/n/versions/node/22.13.0/bin/node]
 9: 0x18b694c v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/usr/local/n/versions/node/22.13.0/bin/node]
10: 0x1e12476  [/usr/local/n/versions/node/22.13.0/bin/node]

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions