react native expo:Bugsnag.getPlugin('react') returns undefined
See original GitHub issueI have exactly followed the guidelines about installingbugsnag
with a react native expo application. Now I would like to wrap my application inside (I cannot reproduce here the whole code due to complexity):
import Bugsnag from '@bugsnag/expo';
...
const ErrorBoundary = Bugsnag.getPlugin('react');
export const Application = () => (
<ErrorBoundary>
{"rest of my application"}
</ErrorBoundary>
)
But when I run the app in debug mode, it crashes with ErrorBoundary
not being a valid component:
.
I looked at a this similar issue. But it is about web react
.
Thank you for your advice.
Specs:
package.json
"@bugsnag/expo": "^7.1.1",
"expo": "~37.0.3",
"react": "~16.9.0",
"react-dom": "~16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
node version: v12.14.0
ios, physical device xr 10
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Bugsnag can't read notify of undefined react native
I have tried to follow all the react native setup from bugsnags docs, but obviously I am missing something. All help is appreciated....
Read more >React Native integration guide - Bugsnag docs
The easiest way to add Bugsnag to your React Native project is to use our CLI (macOS and Linux only). Alternatively you can...
Read more >bugsnag/plugin-react-native-unhandled-rejection - Yarn
This plugin hooks in to React Native's promise rejection tracking to provide unhandled exception reporting for Promises. It is included in the Expo...
Read more >Text - React Native
Specifies the largest possible scale a font can reach when allowFontScaling is enabled. Possible values: null/undefined : inherit from the ...
Read more >Strict Mode - React
StrictMode is a tool for highlighting potential problems in an application. Like Fragment , StrictMode does not render any visible UI.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue. I solved it by moving the getPlugin call within the component:
Any luck on this issue raised by @mariasierraloynaz ? I have followed your guide here, and I get the below error.
https://docs.bugsnag.com/platforms/react-native/expo/
TypeError: undefined is not an object (evaluating ‘_expo.default.getPlugin(‘react’).createErrorBoundary’)