Type 'BrowserTracing' is not assignable to type 'Integration' :: Vue 3 w/ Capactor 3
See original GitHub issueEnvironment
"@capacitor/core": "^3.5.1",
"@sentry/capacitor": "^0.10.0",
"@sentry/vue": "^7.13.0,
"vue": "^3.1.5"
import * as Sentry from "@sentry/capacitor";
import * as SentryVue from "@sentry/vue";
import { BrowserTracing } from "@sentry/tracing";
Sentry.init({
app,
dsn: "***",
integrations: [
new BrowserTracing({
routingInstrumentation: SentryVue.vueRouterInstrumentation(router),
tracingOrigins: ["localhost", "***", "***", /^\//],
}),
],
environment: process.env.VUE_APP_SH_ENV,
tracesSampleRate: 1.0,
}, SentryVue.init);
Steps to Reproduce
- Use above package versions & set up in
main.ts
for a Vue3 project - Attempt to build project
Expected Result
The project would build successfully.
Actual Result
See #197 for my original comment. I took NilsFrkl’s advice and removed the direct reference to @sentry/tracing
which still produces the error:
TS2322: Type 'BrowserTracing' is not assignable to type 'Integration'.
Types of property 'setupOnce' are incompatible.
Type '(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub) => void' is not assignable to type '(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub) => void'.
Types of parameters '_' and 'addGlobalEventProcessor' are incompatible.
Types of parameters 'callback' and 'callback' are incompatible.
Type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/types/types/eventprocessor").EventProcessor' is not assignable to type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/vue/node_modules/@sentry/types/types/eventprocessor").EventProcessor'.
Types of parameters 'event' and 'event' are incompatible.
Type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/vue/node_modules/@sentry/types/types/event").Event' is not assignable to type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/types/types/event").Event'.
Types of property 'spans' are incompatible.
Type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/vue/node_modules/@sentry/types/types/span").Span[] | undefined' is not assignable to type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/types/types/span").Span[] | undefined'.
Type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/vue/node_modules/@sentry/types/types/span").Span[]' is not assignable to type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/types/types/span").Span[]'.
Type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/vue/node_modules/@sentry/types/types/span").Span' is not assignable to type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/types/types/span").Span'.
Types of property 'transaction' are incompatible.
Type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/vue/node_modules/@sentry/types/types/transaction").Transaction | undefined' is not assignable to type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/types/types/transaction").Transaction | undefined'.
Property 'getBaggage' is missing in type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/vue/node_modules/@sentry/types/types/transaction").Transaction' but required in type 'import("/Users/vanpyrzericj/Development/abcd/app-web/node_modules/@sentry/types/types/transaction").Transaction'.
Issue Analytics
- State:
- Created a year ago
- Comments:9
Top Results From Across the Web
Ionic 6 Capacitor 3 - import { BrowserTracing } from '@sentry ...
Steps to Reproduce. import { BrowserTracing } from '@sentry/tracing'; on Ionic Capacitor fails with error. [ng] Error: node_modules/@sentry/ ...
Read more >Vue 3 Typescript not assignable to type '[]' - Stack Overflow
In TypeScript, the type [] explicitly mean empty array/tuple. type A = []; const a: A = ['a']; // Error -> Type '[string]'...
Read more >Vue - Sentry Documentation
On this page, we get you up and running with Sentry's SDK, so that it will automatically report errors and exceptions in your...
Read more >URL Query Parameters with JavaScript, Vue 2 and Vue 3
Learn to read and write URL Query Parameters in JavaScript and VueJS to make dynamic, deep links within your application.
Read more >Not assignable errors with Vue 3, Typescript, Composition API
I've built some components using Vue 3, TypeScript, and the Composition API, ... is not assignable to parameter of type 'VNodeTypes | ClassComponent'....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is blocking us from using Replays as an integration, will an update be released to support 7.25.0 soon?
Soon, but even so, replay isn’t currently working with Capacitor (with the updated SDK), I opened a different issue to see what’s going on with Replay https://github.com/getsentry/sentry-capacitor/issues/279