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

ReactNativeTracing integration breaking #1422

Closed
osamaarefm opened this issue Mar 22, 2021 · 7 comments
Closed

ReactNativeTracing integration breaking #1422

osamaarefm opened this issue Mar 22, 2021 · 7 comments
Labels
Expo Issues related to Sentry React Native Expo support Type: Support Issue

Comments

@osamaarefm
Copy link

How do you use Sentry? sentry.io, using expo (sentry-expo module)
Which SDK and version? sentry-expo: 3.1.3. It uses sentry.javascript.react-native, version 2.3.0
Environment: Android Emulator (Expo managed workflow)

I'm initializing Sentry like this:

Sentry.init({
    dsn: Constants.manifest.extra.sentryDsn,
    environment: releaseEnvironment,
    enableInExpoDevelopment: true,
    debug: false,
    tracesSampleRate: 1,
    integrations: [
      new Sentry.Native.ReactNativeTracing({
        tracingOrigins: ['dor.vps.dvtalent.com', /^\//, /^https:\/\//]
      })
    ]
  });

If I remove "integrations" key, sentry works fine and events are received on the dashboard. Once I add "integrations" key then I receive this error:

TypeError: undefined is not a function (near '...(0, _tracing.registerRequestInstrumentation)...')

This error is located at:
    in App (created by ExpoRoot)
    in ExpoRoot (at renderApplication.js:45)
    in RCTView (at View.js:34)
    in View (at AppContainer.js:106)
    in RCTView (at View.js:34)
    in View (at AppContainer.js:132)
    in AppContainer (at renderApplication.js:39)
- node_modules/react-native/Libraries/LogBox/LogBox.js:148:8 in registerError
- node_modules/react-native/Libraries/LogBox/LogBox.js:59:8 in errorImpl
- node_modules/react-native/Libraries/LogBox/LogBox.js:33:4 in console.error
- node_modules/expo/build/environment/react-native-logs.fx.js:27:4 in error
- node_modules/@sentry/react/node_modules/@sentry/utils/dist/instrument.js:110:42 in <anonymous>
- node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
- node_modules/react-native/Libraries/Core/ExceptionsManager.js:171:19 in handleException
- node_modules/react-native/Libraries/Core/ReactFiberErrorDialog.js:43:2 in showErrorDialog
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:15257:32 in logCapturedError
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:15361:20 in logError
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:16597:12 in update.callback
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:7106:2 in callCallback
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:7127:20 in commitUpdateQueue
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:15801:25 in commitLifeCycles
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18744:22 in commitLayoutEffects
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:265:4 in invokeGuardedCallbackImpl
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:476:2 in invokeGuardedCallback
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18483:29 in commitRootImpl
* [native code]:null in commitRootImpl
- node_modules/scheduler/cjs/scheduler.development.js:653:23 in unstable_runWithPriority
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18317:17 in commitRoot
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:17697:12 in performSyncWorkOnRoot
* [native code]:null in performSyncWorkOnRoot
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5321:31 in runWithPriority$argument_1
- node_modules/scheduler/cjs/scheduler.development.js:653:23 in unstable_runWithPriority
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5316:21 in flushSyncCallbackQueueImpl
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5304:28 in flushSyncCallbackQueue
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:17125:30 in scheduleUpdateOnFiber
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:20527:14 in updateContainer
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:21068:17 in render
- node_modules/react-native/Libraries/ReactNative/renderApplication.js:54:4 in renderApplication
- node_modules/react-native/Libraries/ReactNative/AppRegistry.js:117:25 in runnables.appKey.run
- node_modules/react-native/Libraries/ReactNative/AppRegistry.js:213:4 in runApplication
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:416:4 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:109:6 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:364:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:108:4 in callFunctionReturnFlushedQueue
* [native code]:null in callFunctionReturnFlushedQueue

Any idea how to get performance monitoring working?

Thanks!

@jennmueng
Copy link
Member

@osamaarefm Try deleting your node_modules and run a fresh install. Looks like a dependency is missing on your end.

@osamaarefm
Copy link
Author

Still facing the same issue. Is there any other dependency I should manually include? I'm not sure how to move forward with this.

@jennmueng
Copy link
Member

@osamaarefm Can I see the lock file entry for @sentry/tracing?

@osamaarefm
Copy link
Author

osamaarefm commented Mar 23, 2021

Actually I had to install @sentry/tracing manually. Once I did that the above error was gone. However I'm facing another issue when I do API requests:

TypeError: undefined is not an object (evaluating 'types_1.TransactionSamplingMethod.Rate')
- node_modules/react-native/Libraries/LogBox/LogBox.js:148:8 in registerError
- node_modules/react-native/Libraries/LogBox/LogBox.js:59:8 in errorImpl
- node_modules/react-native/Libraries/LogBox/LogBox.js:33:4 in console.error
- node_modules/expo/build/environment/react-native-logs.fx.js:27:4 in error
- node_modules/@sentry/react/node_modules/@sentry/utils/dist/instrument.js:110:42 in <anonymous>
- node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
- node_modules/react-native/Libraries/Core/ExceptionsManager.js:171:19 in handleException
- node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
- node_modules/expo-error-recovery/build/ErrorRecovery.fx.js:9:32 in ErrorUtils.setGlobalHandler$argument_0
- node_modules/regenerator-runtime/runtime.js:63:36 in tryCatch
- node_modules/regenerator-runtime/runtime.js:293:29 in invoke
- node_modules/regenerator-runtime/runtime.js:63:36 in tryCatch
- node_modules/regenerator-runtime/runtime.js:154:27 in invoke
- node_modules/regenerator-runtime/runtime.js:164:18 in PromiseImpl.resolve.then$argument_0
- node_modules/react-native/node_modules/promise/setimmediate/core.js:37:13 in tryCallOne
- node_modules/react-native/node_modules/promise/setimmediate/core.js:123:24 in setImmediate$argument_0
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:130:14 in _callTimer
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:181:14 in _callImmediatesPass
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:441:30 in callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:387:6 in __callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:135:6 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:364:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:134:4 in flushedQueue
* [native code]:null in flushedQueue
* [native code]:null in invokeCallbackAndReturnFlushedQueue

So it does seem like sentry-expo is missing some dependencies.

The lock entry for @sentry/tracing:

    "@sentry/tracing": {
          "version": "6.2.1",
          "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-6.2.1.tgz",
          "integrity": "sha512-bvStY1SnL08wkSeVK3j9K5rivQQJdKFCPR2VYRFOCaUoleZ6ChPUnBvxQ/E2LXc0hk/y/wo1q4r5B0dfCCY+bQ==",
          "requires": {
            "@sentry/hub": "6.2.1",
            "@sentry/minimal": "6.2.1",
            "@sentry/types": "6.2.1",
            "@sentry/utils": "6.2.1",
            "tslib": "^1.9.3"
          }
        },

Now I can't guess what dependency is missing.

@jennmueng
Copy link
Member

@osamaarefm It's now missing @sentry/types. I don't see how it could be missing as it works fine for everyone else, and you should have @sentry/types right there.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2021

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@marandaneto
Copy link
Contributor

since the issue with ReactNativeTracing is fixed, closing it

@kahest kahest added the Expo Issues related to Sentry React Native Expo support label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expo Issues related to Sentry React Native Expo support Type: Support Issue
Projects
None yet
Development

No branches or pull requests

4 participants