question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors on iOS are not sent to sentry.io when using with @sentry/vue

See original GitHub issue

Environment

How do you use Sentry? Sentry SaaS (sentry.io)

Which SDK and version? @sentry/capacitor@0.4.0 @sentry/vue@6.11.0 @sentry/tracing@6.11.0 @capacitor/core@3.2.4 @capacitor/cli@3.2.4 @capacitor/ios@3.2.4

Steps to Reproduce

I am using the following code to initialize sentry. This works on android and web:

import Vue from 'vue';
import { Integrations } from '@sentry/tracing';
import * as Sentry from '@sentry/capacitor';
import * as SentryVue from "@sentry/vue";

console.warn('BEFORE INIT');

Sentry.init({
  enabled: true,
  Vue,
  dsn: "myDsn",
  environment: "environment",
  release: "release",
  ignoreErrors: ["CANCEL"],
  integrations: [new Integrations.BrowserTracing()],
  tracesSampleRate: 0.1
  }, SentryVue.init);

console.warn('AFTER INIT');

Expected Result

Errors should be sent to sentry.io

Actual Result

No error is sent to sentry.io on iOS.

I think the native sentry plugin is not initialized correctly. SentryCapacitor.initNativeSdk never resolves and a DataCloneError gets thrown at some point. When trying to send something to sentry.io SentryCapacitor.fetchNativeSdkInfo rejects with Called fetchSdkInfo without initializing cocoa SDK..

Bildschirmfoto 2021-10-05 um 13 09 14

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
WIStudentcommented, Oct 6, 2021

@jennmueng Yes, it works again when I remove the Vue option. Here is a workaround:

import Vue from 'vue';
import { Integrations } from '@sentry/tracing';
import * as Sentry from '@sentry/capacitor';
import * as SentryVue from "@sentry/vue";

type VueOptions = Omit<NonNullable<Parameters<typeof SentryVue.init>[0]>, 'Vue'>
const initSentryVue = (options?: VueOptions) => SentryVue.init({...options, Vue});

entry.init({
  enabled: true,
  dsn: "myDsn",
  environment: "environment",
  release: "release",
  ignoreErrors: ["CANCEL"],
  integrations: [new Integrations.BrowserTracing()],
  tracesSampleRate: 0.1
  }, initSentryVue);
1reaction
sawaca96commented, May 11, 2022

@lucas-zimerman Thanks for reply !

before create new issue, I will try at new release 0.6.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS | Sentry Documentation
Sentry's SDKs report an error automatically whenever a thrown error or exception goes uncaught in your application, causing the application to crash.
Read more >
Sentry in Vue app causes freeze / 100% CPU usage ... - GitHub
Description. We have a Vue application and we encountered an issue when we added sentry. We can reproduce the situation in ...
Read more >
sentry Changelog - PyUp.io
feat(perf_issues): Only send error issues to digests system (40050) by ... Prepare future support for iOS and macOS obfuscated app symbolication using dSYM ......
Read more >
Highest scored 'sentry' questions - Page 9 - Stack Overflow
I'm using @sentry/vue and I'm trying to catch only the errors that come from ... Sentry works fine for me but when I...
Read more >
@sentry/vue - npm
Official Sentry SDK for Vue.js. Latest version: 7.28.1, last published: 4 days ago. Start using @sentry/vue in your project by running `npm ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found