Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Method addObserver must be called on the main thread #520

@lewisf

Description

@lewisf

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

RN SDK version: 1.6.3
Android SDK version: 2.2.0

react-native version: 0.62.17

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

https://sentry.io/organizations/persona-identities-inc/issues/1839866967/?project=5378601&query=is%3Aunresolved

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'https://[email protected]/...'
});

I have following issue:

I went through barebones setup steps and am getting this error. Commenting out the Sentry.init gets rid of it. Stack trace seems to indicate it's all happening within the Sentry library but I'm not sure if I'm doing something wrong.

Steps to reproduce:

  • New project on React Native 0.62.17
  • Install Sentry
  • Launch in Android Emulator using Pixel 2 API 29
  • Red screen with error

Actual result:

image

Expected result:

No error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdependenciesPull requests that update a dependency filequestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions