Skip to content

Crash with Vercel AI SDK when spotlight is enabled #16137

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

Open
3 tasks done
Jaakkonen opened this issue Apr 25, 2025 · 0 comments
Open
3 tasks done

Crash with Vercel AI SDK when spotlight is enabled #16137

Jaakkonen opened this issue Apr 25, 2025 · 0 comments

Comments

@Jaakkonen
Copy link

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.14.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

https://github.com/Jaakkonen/sentry-spotlight-vercel-ai-bug

Steps to Reproduce

  1. Create a new Node.js project
  2. Install the required dependencies:
    npm install @sentry/node ai
    
  3. Create the following files:
// index.js
import * as Sentry from '@sentry/node'

Sentry.init({
  tracesSampler: (ctx) => {
    return 0.01
  },
  spotlight: true,
})

await import("./otherfile.js")
// otherfile.js
import { generateText } from "ai";

console.log(generateText)
  1. Run the application with:
    $ node index.js
    

Expected Result

Code to not crash. With spotlight disabled the code runs fine

[AsyncFunction: generateText]

Actual Result

❯ node index.js
TypeError: setters.get(...)[name] is not a function
    at Object.set (/home/jaakko/Code/opentelemetryairepro/node_modules/.pnpm/[email protected]/node_modules/import-in-the-middle/lib/register.js:13:37)
    at callHookFn (/home/jaakko/Code/opentelemetryairepro/node_modules/.pnpm/[email protected]/node_modules/import-in-the-middle/index.js:31:23)
    at Hook._iitmHook (/home/jaakko/Code/opentelemetryairepro/node_modules/.pnpm/[email protected]/node_modules/import-in-the-middle/index.js:150:11)
    at /home/jaakko/Code/opentelemetryairepro/node_modules/.pnpm/[email protected]/node_modules/import-in-the-middle/lib/register.js:42:31
    at Array.forEach (<anonymous>)
    at register (/home/jaakko/Code/opentelemetryairepro/node_modules/.pnpm/[email protected]/node_modules/import-in-the-middle/lib/register.js:42:15)
    at file:///home/jaakko/Code/opentelemetryairepro/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/ai/dist/index.mjs?iitm=true:1075:1
    at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:578:26)
    at async file:///home/jaakko/Code/opentelemetryairepro/index.js:10:1
@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Apr 25, 2025
@linear linear bot added the Bug label Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Development

No branches or pull requests

1 participant