Skip to content

Fails with sentry-expo 3.0 #25

@mattrabe

Description

@mattrabe

sentry-expo 3.0 is about to be released (current is 3.0.0-rc4). That release will include a breaking change wherein exports are now namespaced. That change leads to this package failing with sentry-expo 3.0:

IMG_FE9FF7B4E3C4-1

The fix is simple... instead of:

import * as Sentry from 'sentry-expo'

...

Sentry.captureException(error)

we now need to do:

import { Native as Sentry } from 'sentry-expo'

...

Sentry.captureException(error)

Please note that this applies to all/many methods, but does not apply to init.

I discovered this while tracking down changes required in order to upgrade a project to Expo SDK 39, which includes React 0.63, and therefore includes the change from YellowBox to LogBox. It seems that sentry-expo used YellowBox pre-3.0, and soon everyone using Expo is therefore going to upgrade that package to avoid YellowBox warnings. The relevant ticket is here: expo/expo#10300

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions