Skip to content
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

Astro Integration throws error after upgrade to v8.3.0 #12179

Closed
3 tasks done
felixrichardt opened this issue May 23, 2024 · 8 comments
Closed
3 tasks done

Astro Integration throws error after upgrade to v8.3.0 #12179

felixrichardt opened this issue May 23, 2024 · 8 comments
Labels
Package: astro Issues related to the Sentry Astro SDK Type: Bug

Comments

@felixrichardt
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/astro

SDK Version

8.3.0

Framework Version

No response

Link to Sentry event

No response

SDK Setup

sentry({
            environment: process.env.NODE_ENV || 'development',
            dsn: __MY_DSN__,
            sourceMapsUploadOptions: {
                project: __MY_PROJECT__,
                authToken: process.env.SENTRY_AUTH_TOKEN,
            },
        }),

Steps to Reproduce

Upgrading @sentry/astro from v7.116.0 to v8.3.0

Expected Result

Upgrade from v7.116.0 to v8.3.0 should work as expected

Actual Result

After upgrading to v8.3.0 astro build/dev throws error:

[ERROR] vite_ssr_import_1.getClient(...).setupIntegrations is not a function

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 May 23, 2024
@github-actions github-actions bot added the Package: astro Issues related to the Sentry Astro SDK label May 23, 2024
@mydea
Copy link
Member

mydea commented May 23, 2024

Hey, do you by chance have a longer error with a stack trace you could share with us?

@AbhiPrasad
Copy link
Member

also @felixrichardt - could you share you package.json dependencies with us? Are you using any other @sentry/ packages?

@felixrichardt
Copy link
Author

Hi, sry for delayed answer.

Stacktrace from astro just tells that there is a problem in generated chunk file without additional messages. Maybe I have to enable some additional options in astro config / vite build options to get more insights (?)

13:51:49 [ERROR] __vite_ssr_import_1__.getClient(...).setupIntegrations is not a function
  Stack trace:
    at /xxx/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:55058:9
    [...] See full stack trace in the browser, or rerun with --verbose.

affected line in chunk:

await initModule(context.global, ssrModule, ssrImportMeta, ssrImport, ssrDynamicImport, ssrExportAll);

package.json deps:

  "devDependencies": {
    "@astrojs/sitemap": "^3.1.5",
    "@cloudflare/workers-types": "^4.20240512.0",
    "autoprefixer": "^10.4.19",
    "cssnano": "^7.0.1",
    "postcss": "^8.4.38",
    "postcss-preset-env": "^9.5.13",
    "sass": "^1.77.2",
    "wrangler": "^3.57.1"
  },
  "dependencies": {
    "@astrojs/react": "^3.3.4",
    "@sentry/astro": "^8.3.0",
    "@spotlightjs/astro": "^1.0.20",
    "@types/react": "^18.3.2",
    "@types/react-dom": "^18.3.0",
    "astro": "^4.8.7",
    "bootstrap": "^5.3.3",
    "bootstrap-icons": "^1.11.3",
    "date-fns": "^3.6.0",
    "ical.js": "^2.0.1",
    "jquery": "^3.7.1",
    "medium-zoom": "^1.1.0",
    "react": "^18.3.1",
    "react-day-picker": "^8.10.1",
    "react-dom": "^18.3.1",
    "react-responsive": "^10.0.0"
  }

I'm just using astro package of sentry. No additional sentry packages are installed.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 May 23, 2024
@AbhiPrasad
Copy link
Member

If you remove @spotlightjs/astro does the error go away? If so, that might be the issue.

@felixrichardt
Copy link
Author

Yeah indeed, removing spotlightjs solves it.
Are there any conflicts using both of them?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 May 23, 2024
@AbhiPrasad
Copy link
Member

1.x of spotlight only supports 7.x. We need to make this more clear in the migration docs.

There's a 2.x alpha of spotlight you can use in the meantime that will work with 8.x. We'll cut a stable release of that soon!

@AbhiPrasad
Copy link
Member

Closing this in favour of tracking spotlight v8 compat in the above linked issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: astro Issues related to the Sentry Astro SDK Type: Bug
Projects
Archived in project
Development

No branches or pull requests

3 participants