Provide environment information
trigger v4.4.1 but also happens with previous versions
Describe the bug
When triggering a task from a Supabase Edge Function using tasks.trigger() (or task.trigger()), the runtime throws:
TypeError: Cannot read properties of undefined (reading 'toString')
at @bugsnag/cuid (fingerprint.mjs).
This only occurs when the SDK is used to trigger; it does not occur when triggering via the REST API (POST to https://api.trigger.dev/api/v1/tasks/<taskId>/trigger).
Expected: Task triggers successfully from the Edge Function using the SDK.
Actual: Runtime error from a dependency that expects Node-style APIs not available in the Supabase Edge (Deno) runtime. Treating as environment compatibility issue; workaround is to use the Tasks API with fetch instead of the SDK (documented in the Supabase Edge Functions guide).
Reproduction repo
n/a
To reproduce
- Follow Triggering tasks from Supabase edge functions.
- In the edge function, use
tasks.trigger() (or task.trigger()) with the SDK, e.g. import { tasks } from "@trigger.dev/sdk/v3".
- Deploy the edge function and invoke it (e.g. hit the function URL or trigger via a DB webhook).
- Observe runtime error:
TypeError: Cannot read properties of undefined (reading 'toString') at @bugsnag/cuid fingerprint.mjs.
Workaround: trigger via the Tasks API with fetch instead of the SDK.
Additional information
No response
Provide environment information
trigger v4.4.1 but also happens with previous versions
Describe the bug
When triggering a task from a Supabase Edge Function using
tasks.trigger()(ortask.trigger()), the runtime throws:TypeError: Cannot read properties of undefined (reading 'toString')at
@bugsnag/cuid(fingerprint.mjs).This only occurs when the SDK is used to trigger; it does not occur when triggering via the REST API (POST to
https://api.trigger.dev/api/v1/tasks/<taskId>/trigger).Expected: Task triggers successfully from the Edge Function using the SDK.
Actual: Runtime error from a dependency that expects Node-style APIs not available in the Supabase Edge (Deno) runtime. Treating as environment compatibility issue; workaround is to use the Tasks API with
fetchinstead of the SDK (documented in the Supabase Edge Functions guide).Reproduction repo
n/a
To reproduce
tasks.trigger()(ortask.trigger()) with the SDK, e.g.import { tasks } from "@trigger.dev/sdk/v3".TypeError: Cannot read properties of undefined (reading 'toString')at@bugsnag/cuidfingerprint.mjs.Workaround: trigger via the Tasks API with
fetchinstead of the SDK.Additional information
No response