Sentry.Native.captureException is undefined - react-native

Following the expo docs for sentry (https://docs.expo.dev/guides/using-sentry/) I attempted to implement sentry inside of my expo managed React-Native project. However, when I for an error I get "undefined is not an object (evaluating 'Sentry.Native.captureException').
app.js
import * as Sentry from 'sentry-expo';
Sentry.init({
dsn: "https://64b9070941574d26b94dde91be781c31#o1127557.ingest.sentry.io/4504561986830336",
enableInExpoDevelopment: true,
debug: true,
});
PortfolioScreen.js
import * as Sentry from '#sentry/react-native';
...
throw new Error('err from Portfolio');
} catch(err) {
console.log('caught error');
console.error(err);
Sentry.Native.captureException(err);
}
The error is successfully triggered and I can see the log output 'caught error' but then I get the above mentioned error in the logs and see nothing in my Sentry console.
I've tried using 'sentry-expo' import on the portfolio screen instead of #sentry/react-native as well but this gives a much longer error output.
Sentry Logger [warn]:, [SdkInfo] Native SDK Info retrieval failed...something could be wrong with your Sentry installation:
at node_modules/#sentry/utils/cjs/logger.js:66:32 in consoleSandbox$argument_0
at node_modules/#sentry/utils/cjs/logger.js:41:19 in consoleSandbox
at node_modules/#sentry/utils/cjs/logger.js:65:24 in name
at node_modules/#sentry/react-native/dist/js/integrations/sdkinfo.js:28:31 in __awaiter$argument_3
at node_modules/tslib/tslib.js:113:68 in rejected
Sentry Logger [warn]:, [SentryError: Native is disabled]
at node_modules/#sentry/utils/cjs/logger.js:66:32 in consoleSandbox$argument_0
at node_modules/#sentry/utils/cjs/logger.js:41:19 in consoleSandbox
at node_modules/#sentry/utils/cjs/logger.js:65:24 in name
at node_modules/#sentry/react-native/dist/js/integrations/sdkinfo.js:29:31 in __awaiter$argument_3
at node_modules/tslib/tslib.js:113:68 in rejected
Sentry Logger [warn]:, Event was skipped as native SDK is not enabled.
at node_modules/#sentry/utils/cjs/logger.js:66:32 in consoleSandbox$argument_0
at node_modules/#sentry/utils/cjs/logger.js:41:19 in consoleSandbox
at node_modules/#sentry/utils/cjs/logger.js:65:24 in name
at node_modules/#sentry/react-native/dist/js/wrapper.js:17:27 in __awaiter$argument_3
at node_modules/tslib/tslib.js:115:78 in <anonymous>
at node_modules/tslib/tslib.js:111:38 in __awaiter
at node_modules/#sentry/react-native/dist/js/wrapper.js:15:24 in NATIVE.sendEnvelope
at node_modules/#sentry/react-native/dist/js/transports/native.js:15:57 in _buffer.add$argument_0
at node_modules/#sentry/utils/cjs/promisebuffer.js:43:27 in add
at node_modules/#sentry/react-native/dist/js/transports/native.js:15:31 in NativeTransport#send
at node_modules/#sentry/core/cjs/baseclient.js:654:26 in BaseClient#_sendEnvelope
at node_modules/#sentry/core/cjs/baseclient.js:262:24 in BaseClient#sendEvent
at node_modules/#sentry/core/cjs/baseclient.js:612:22 in _prepareEvent.then.then$argument_0
at node_modules/#sentry/utils/cjs/syncpromise.js:75:33 in <anonymous>
at node_modules/#sentry/utils/cjs/syncpromise.js:178:26 in cachedHandlers.forEach$argument_0
at node_modules/#sentry/utils/cjs/syncpromise.js:172:26 in _executeHandlers
at node_modules/#sentry/utils/cjs/syncpromise.js:160:25 in _setResult
at node_modules/#sentry/utils/cjs/syncpromise.js:138:19 in _resolve
at node_modules/#sentry/utils/cjs/syncpromise.js:75:21 in <anonymous>
at node_modules/#sentry/utils/cjs/syncpromise.js:178:26 in cachedHandlers.forEach$argument_0
at node_modules/#sentry/utils/cjs/syncpromise.js:172:26 in _executeHandlers
at node_modules/#sentry/utils/cjs/syncpromise.js:160:25 in _setResult
at node_modules/#sentry/utils/cjs/syncpromise.js:138:19 in _resolve
at node_modules/#sentry/utils/cjs/syncpromise.js:75:21 in <anonymous>
at node_modules/#sentry/utils/cjs/syncpromise.js:178:26 in cachedHandlers.forEach$argument_0
at node_modules/#sentry/utils/cjs/syncpromise.js:172:26 in _executeHandlers
at node_modules/#sentry/utils/cjs/syncpromise.js:160:25 in _setResult
at node_modules/#sentry/utils/cjs/syncpromise.js:138:19 in _resolve
at node_modules/#sentry/utils/cjs/syncpromise.js:75:33 in <anonymous>
at node_modules/#sentry/utils/cjs/syncpromise.js:178:26 in cachedHandlers.forEach$argument_0
at node_modules/#sentry/utils/cjs/syncpromise.js:172:26 in _executeHandlers
at node_modules/#sentry/utils/cjs/syncpromise.js:160:25 in _setResult
at node_modules/#sentry/utils/cjs/syncpromise.js:138:19 in _resolve
at node_modules/#sentry/utils/cjs/syncpromise.js:75:33 in <anonymous>
at node_modules/#sentry/utils/cjs/syncpromise.js:178:26 in cachedHandlers.forEach$argument_0
at node_modules/#sentry/utils/cjs/syncpromise.js:172:26 in _executeHandlers
at node_modules/#sentry/utils/cjs/syncpromise.js:160:25 in _setResult
at node_modules/#sentry/utils/cjs/syncpromise.js:138:19 in _resolve
at node_modules/#sentry/utils/cjs/syncpromise.js:75:33 in <anonymous>
at node_modules/#sentry/utils/cjs/syncpromise.js:178:26 in cachedHandlers.forEach$argument_0
at node_modules/#sentry/utils/cjs/syncpromise.js:172:26 in _executeHandlers
at node_modules/#sentry/utils/cjs/syncpromise.js:160:25 in _setResult
at node_modules/#sentry/utils/cjs/syncpromise.js:138:19 in _resolve
at node_modules/#sentry/utils/cjs/syncpromise.js:75:33 in <anonymous>
at node_modules/#sentry/utils/cjs/syncpromise.js:178:26 in cachedHandlers.forEach$argument_0
at node_modules/#sentry/utils/cjs/syncpromise.js:172:26 in _executeHandlers
at node_modules/#sentry/utils/cjs/syncpromise.js:160:25 in _setResult
at node_modules/#sentry/utils/cjs/syncpromise.js:138:19 in _resolve
at node_modules/#sentry/utils/cjs/syncpromise.js:75:33 in <anonymous>
at node_modules/#sentry/utils/cjs/syncpromise.js:178:26 in cachedHandlers.forEach$argument_0
at node_modules/#sentry/utils/cjs/syncpromise.js:172:26 in _executeHandlers
at node_modules/#sentry/utils/cjs/syncpromise.js:160:25 in _setResult
at node_modules/#sentry/utils/cjs/syncpromise.js:138:19 in _resolve
at node_modules/#sentry/utils/cjs/syncpromise.js:75:33 in <anonymous>
at node_modules/#sentry/utils/cjs/syncpromise.js:178:26 in cachedHandlers.forEach$argument_0
at node_modules/#sentry/utils/cjs/syncpromise.js:172:26 in _executeHandlers
at node_modules/#sentry/utils/cjs/syncpromise.js:160:25 in _setResult
at node_modules/#sentry/utils/cjs/syncpromise.js:138:19 in _resolve
at node_modules/#sentry/utils/cjs/syncpromise.js:75:33 in <anonymous>
at node_modules/#sentry/utils/cjs/syncpromise.js:178:26 in cachedHandlers.forEach$argument_0
at node_modules/#sentry/utils/cjs/syncpromise.js:172:26 in _executeHandlers
at node_modules/#sentry/utils/cjs/syncpromise.js:160:25 in _setResult
I followed the config for app.json in the docs as well.
How do I successfully implement Sentry inside of a managed React-Native project?

Related

How can i over come expo error while running on a device?

am having this error after build expo app with EAS. when i run the app using expo start --dev-client i get this error
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
I tried re-building but still i am getting the same error. Any assistance?
TypeError: null is not an object (evaluating '_reactNative.NativeModules.RNCWebView.isFileUploadSupported')
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in reportException
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in handleException
at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:null in handleError
at node_modules\#react-native\polyfills\error-guard.js:null in ErrorUtils.reportFatalError
at node_modules\metro-runtime\src\polyfills\require.js:null in guardedLoadModule
at http://192.168.0.100:8081/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&app=com.futuredesigns.cityfoods&modulesOnly=false&runModule=true:null in global code
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in reportException
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in handleException
at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:null in handleError
at node_modules\#react-native\polyfills\error-guard.js:null in ErrorUtils.reportFatalError
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in __guard
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in callFunctionReturnFlushedQueue

Getting Issue in expo locaton

TypeError: undefined is not an object (evaluating '_expoModulesCore.NativeModulesProxy.ExpoLocation')
i want to use expo location but getting this issue after importing expo locaation in component
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\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:12:21 in ErrorUtils.setGlobalHandler$argument_0
node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
node_modules\regenerator-runtime\runtime.js:294:29 in invoke
node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
node_modules\regenerator-runtime\runtime.js:155:27 in invoke
node_modules\regenerator-runtime\runtime.js:165: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```

TypeError: undefined is not an object (evaluating '_expoModulesCore.NativeModulesProxy.ExpoSplashScreen')

I am getting this issue in react native. The things were working fine until I decicded to rerun the project doing yarn install
Here is complete error
TypeError: undefined is not an object (evaluating '_expoModulesCore.NativeModulesProxy.ExpoSplashScreen')
at node_modules\react-native\Libraries\LogBox\LogBox.js:148:8 in registerError
at node_modules\react-native\Libraries\LogBox\LogBox.js:59:8 in errorImpl
at node_modules\react-native\Libraries\LogBox\LogBox.js:33:4 in console.error
at node_modules\expo\build\environment\react-native-logs.fx.js:27:4 in error
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:104:6 in reportException
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:171:19 in handleException
at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:24:6 in handleError
at node_modules\expo-error-recovery\build\ErrorRecovery.fx.js:12:21 in ErrorUtils.setGlobalHandler$argument_0
at node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
at node_modules\regenerator-runtime\runtime.js:294:29 in invoke
at node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
at node_modules\regenerator-runtime\runtime.js:155:27 in invoke
at node_modules\regenerator-runtime\runtime.js:165:18 in PromiseImpl.resolve.then$argument_0
at node_modules\react-native\node_modules\promise\setimmediate\core.js:37:13 in tryCallOne
at node_modules\react-native\node_modules\promise\setimmediate\core.js:123:24 in setImmediate$argument_0
at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:130:14 in _callTimer
at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:181:14 in _callImmediatesPass
at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:441:30 in callImmediates
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:387:6 in __callImmediates
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:135:6 in __guard$argument_0
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:10 in __guard
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:134:4 in flushedQueue
I have tried with update expo-cli, expo-splash-screen and with cache clear command expo r -c
Let me know if there is anyone who can help.
You can show warnnigs of log? Because i have the same problem and resolved with.
Logs:
expo-app-loading - expected version: 1.1.2 - actual version installed: 1.3.0
react-native-screens - expected version: ~3.4.0 - actual version installed: 3.10.1
I used the versions 1.1.2 and 3.4.0 in my package:
"react-native-screens": "^3.4.0" to "react-native-screens": "3.4.0"
"expo-app-loading": "^1.1.2" to "expo-app-loading": "1.1.2"
Remove your node_modules, yarn.lock and package-lock.json
Yarn install
# or
npm install
For me resolved.
I was having issues with expo-web-browser. So, just simply clear your cache with the following command on your terminal. You will not see errors like above again:
expo r -c

Module "undefined" is missing from the asset registry

I can't find where this error is coming from ... any advices ? I am using expo sdk 41
I get this error on launching the app . I checked my icon and it is good png quality 52*52...
Module "undefined" is missing from the asset registry
at node_modules\expo-asset\build\Asset.js:53:18 in fromModule
at App.js:34:11 in images.map$argument_0
at [native code]:null in map
at App.js:30:9 in cacheImages
at App.js:46:33 in _loadResourcesAsync
at node_modules\expo-app-loading\build\AppLoading.js:17:4 in startLoadingAppResourcesAsync
at node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
at node_modules\regenerator-runtime\runtime.js:293:29 in invoke
at node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
at node_modules\regenerator-runtime\runtime.js:154:27 in invoke
at node_modules\regenerator-runtime\runtime.js:189:16 in PromiseImpl$argument_0
at node_modules\es6-promise\dist\es6-promise.js:463:6 in initializePromise
at node_modules\es6-promise\dist\es6-promise.js:875:38 in Promise
at node_modules\regenerator-runtime\runtime.js:188:15 in callInvokeWithMethodAndArg
at node_modules\regenerator-runtime\runtime.js:211:38 in enqueue
at node_modules\regenerator-runtime\runtime.js:238:8 in exports.async
at node_modules\expo-app-loading\build\AppLoading.js:17:4 in startLoadingAppResourcesAsync
at node_modules\expo-app-loading\build\AppLoading.js:9:8 in componentDidMount
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:15688:12 in commitLifeCycles
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:18744:22 in commitLayoutEffects
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:265:4 in invokeGuardedCallbackImpl
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:476:2 in invokeGuardedCallback
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:18483:29 in commitRootImpl
at [native code]:null in commitRootImpl
at node_modules\scheduler\cjs\scheduler.development.js:653:23 in unstable_runWithPriority
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:18317:17 in commitRoot
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:17697:12 in performSyncWorkOnRoot
at [native code]:null in performSyncWorkOnRoot
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:5321:31 in runWithPriority$argument_1
at node_modules\scheduler\cjs\scheduler.development.js:653:23 in unstable_runWithPriority
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:5316:21 in flushSyncCallbackQueueImpl
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:5304:28 in flushSyncCallbackQueue
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:17125:30 in scheduleUpdateOnFiber
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:20527:14 in updateContainer
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:21068:17 in render
at node_modules\react-native\Libraries\ReactNative\renderApplication.js:54:4 in renderApplication
at node_modules\react-native\Libraries\ReactNative\AppRegistry.js:117:25 in runnables.appKey.run
at node_modules\react-native\Libraries\ReactNative\AppRegistry.js:213:4 in runApplication
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:416:4 in __callFunction
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:109:6 in __guard$argument_0
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:10 in __guard
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:108:4 in callFunctionReturnFlushedQueue
at [native code]:null in callFunctionReturnFlushedQueue```

React Native - Error while updating property 'nativeBackgroundAndroid' of a view managed by: RCTView

I started getting errors after downloading "# react-navigation/drawer". I downloaded and uploaded the file again and kept getting errors.
Could you please help?
I shared error screenshots.
Stack trace:
node_modules\react-native\Libraries\LogBox\LogBox.js:173: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\prop-types\checkPropTypes.js:20:6 in printWarning
node_modules\prop-types\checkPropTypes.js:82:22 in checkPropTypes
node_modules\react\cjs\react.development.js:1714:20 in validatePropTypes
node_modules\react\cjs\react.development.js:1813:21 in createElementWithValidation
node_modules\#expo\vector-icons\build\createMultiStyleIconSet.js:70:23 in IconClass#render
node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:12478:21 in finishClassComponent
node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:12403:43 in updateClassComponent
node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:19181:22 in beginWork$1
node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:18085:22 in performUnitOfWork
node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:18013:38 in workLoopSync
node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:17977:18 in renderRootSync
node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:17674:33 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
Error's Screenshoots
Error's Screenshoots