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

Crash on unhandled Promise rejection (TypeError: undefined is not a function (evaluating 'i.Sentry.withScope') #575

Closed
2 of 4 tasks
denissb opened this issue May 1, 2019 · 1 comment

Comments

@denissb
Copy link

denissb commented May 1, 2019

OS:

  • Windows
  • MacOS
  • [] Linux

Platform:

  • iOS
  • Android
node v11.7.0
npm 6.5.0
react-native-sentry: 0.42
react-native: 0.55.4

Config:

Sentry.config('https://...').install();

I have following issue:

When I face an unhandled Promise rejection in my Android app it causes a crash

2019-05-01 13:02:52.104 13680-13704/? E/ReactNativeJS: 'Unhandled promise rejection', { [TypeError: undefined is not a function (evaluating 'i.Sentry.withScope')] line: 323, column: 1709, sourceURL: 'index.android.bundle' }
2019-05-01 13:02:52.108 13680-13705/? E/unknown:ReactNative: console.error: "Unhandled promise rejection", {"line":323,"column":1709,"sourceURL":"index.android.bundle"}, stack:
    value@401:882
    value@401:1018
    error@401:1499
    <unknown>@317:425
    <unknown>@1650:1252
    exports@1656:66
    <unknown>@1650:1123
    <unknown>@31:1787
    x@31:643
    k@31:1007
    callImmediates@31:3188
    value@26:3183
    <unknown>@26:1516
    value@26:3009
    value@26:1486
    value@26:1094
2019-05-01 13:03:00.008 1638-1651/? E/memtrack: Couldn't load memtrack module

Steps to reproduce:

  • Produce an unhandled Promise rejection

Actual result:

  • App crashes with TypeError: undefined is not a function (evaluating 'i.Sentry.withScope')

Expected result:

  • Error is handled by react-native-sentry
@denissb denissb changed the title Crash on unhandled Promise rejection Crash on unhandled Promise rejection (TypeError: undefined is not a function (evaluating 'i.Sentry.withScope') May 1, 2019
@HazAT
Copy link
Member

HazAT commented Jul 5, 2019

We released a new version of the SDK @sentry/react-native which supports the unified API and there error should be gone.
See for more info: #612

@HazAT HazAT closed this as completed Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants