Sentry or bugsnag when imported causing the App to stay on splash screen

Please provide the following:

  1. SDK Version: 40
  2. Platforms(Android/iOS/web/all): Android
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Hi guys, when using latest SDK: 40 and trying to use Sentry or Bugsnag for crash/error reporting, the application doesn’t load and stays on splash screen

import Bugsnag from ‘@bugsnag/expo’
or
import * as Sentry from ‘sentry-expo’;

I am trying to build and test using Expo Go (android)

If I remove the above statements the application loads. We are using Push Notifications, AsyncStorage just as an FYI

Any pointers on what I am doing wrong?




“expo”: “~40.0.0”,
“expo-app-loading”: “^1.0.1”,
“expo-asset”: “^8.2.1”,
“expo-font”: “~8.4.0”,
“expo-image-picker”: “~9.2.0”,
“expo-notifications”: “~0.8.2”,
“expo-status-bar”: “~1.0.3”,
“formik”: “^2.2.6”,
“hex-to-rgba”: “^2.0.1”,
“prop-types”: “^15.7.2”,
“react”: “16.13.1”,
“react-dom”: “16.13.1”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz”,
“react-native-animated-loader”: “0.0.9”,
“react-native-elements”: “^3.1.0”,
“react-native-fontawesome-pro”: “^2.1.0”,
“react-native-gesture-handler”: “~1.8.0”,
“react-native-modal”: “^11.6.1”,
“react-native-popup-menu”: “^0.15.10”,
“react-native-reanimated”: “~1.13.0”,
“react-native-screens”: “~2.15.0”,
“react-native-toast-message”: “^1.4.3”,
“react-native-web”: “~0.13.12”,
“react-native-webview”: “11.0.0”,
“rn-sliding-up-panel”: “^2.4.5”,



App.jsx

import React from “react”;
import {
Roboto_400Regular,
Roboto_500Medium,
Roboto_700Bold
} from “@expo-google-fonts/roboto”;
import AppLoading from “expo-app-loading”;
import * as Font from “expo-font”;
import Toast from “react-native-toast-message”;
import { MenuProvider } from “react-native-popup-menu”;
import { configureFontAwesomePro } from “react-native-fontawesome-pro”;

//Application Imports
import { UserContextProvider } from “contexts/UserContext”;
import Application from “components/Application”;

// Icon Import(s)
configureFontAwesomePro();

export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
fontsLoaded: false
};
}

_loadResourcesAsync = async () => {
return Promise.all([
Font.loadAsync({
Roboto_400Regular,
Roboto_500Medium,
Roboto_700Bold
})
]);
};

_handleLoadingError = (error) => {
console.warn(error);
};

_handleFinishLoading = () => {
this.setState({ fontsLoaded: true });
};

render() {
if (this.state.fontsLoaded) {
return (



<Toast ref={(ref) => Toast.setRef(ref)} />


);
} else {
return (

);
}
}
}

Thanks

Hey @rohit_mel, could you provide a minimal, reproducible and publicly accessible repo that demonstrates this behavior. (No unnecessary dependencies, external assets, etc) Being able to test on our end is extremely helpful in debugging issues.

Cheers,
Adam

Hey Adam, actually we have the whole code in a private repo. I have pasted a very minimalistic code of App.jsx and package.json for you. Even this is not working and stalling on Splash Screen

import React from “react”;
import {
Roboto_400Regular,
Roboto_500Medium,
Roboto_700Bold
} from “@expo-google-fonts/roboto”;
import AppLoading from “expo-app-loading”;
import * as Font from “expo-font”;
import { configureFontAwesomePro } from “react-native-fontawesome-pro”;
import { View, Text } from “react-native”;

import Bugsnag from “@bugsnag/expo”;
Bugsnag.start();

// Icon Import(s)
configureFontAwesomePro();

export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
fontsLoaded: false
};
}

_loadResourcesAsync = async () => {
return Promise.all([
Font.loadAsync({
Roboto_400Regular,
Roboto_500Medium,
Roboto_700Bold
})
]);
};

_handleLoadingError = (error) => {
console.warn(error);
};

_handleFinishLoading = () => {
this.setState({ fontsLoaded: true });
};

render() {
if (this.state.fontsLoaded) {
return (
< View>
< Text>This is a test</ Text>
</ View>
);
} else {
return (
< AppLoading
startAsync={this._loadResourcesAsync}
onFinish={this._handleFinishLoading}
onError={this._handleLoadingError}
/>
);
}
}
}

package.json

{
“main”: “node_modules/expo/AppEntry.js”,
“scripts”: {
“start”: “expo start”,
“android”: “expo start --android”,
“ios”: “expo start --ios”,
“web”: “expo start --web”,
“eject”: “expo eject”,
“lint”: “eslint --ext .jsx --ext .js src/”,
“format”: “prettier --check ./src”
},
“dependencies”: {
“@ bugsnag/expo”: “^7.6.0”,
“@ expo-google-fonts/inter”: “^0.1.0”,
“@ expo-google-fonts/roboto”: “^0.1.0”,
“@ expo-google-fonts/roboto-condensed”: “^0.1.0”,
“@ expo/metro-config”: “^0.1.49”,
“@ fortawesome/free-brands-svg-icons”: “^5.15.2”,
“@ fortawesome/pro-light-svg-icons”: “^5.15.2”,
“@ fortawesome/pro-regular-svg-icons”: “^5.15.2”,
“@ fortawesome/pro-solid-svg-icons”: “^5.15.2”,
“@ react-native-async-storage/async-storage”: “^1.13.3”,
“@ react-native-community/masked-view”: “0.1.10”,
“@ react-navigation/bottom-tabs”: “^5.11.3”,
“@ react-navigation/native”: “^5.9.0”,
@react-navigation/stack”: “^5.13.0”,
“axios”: “^0.21.1”,
“babel-plugin-inline-dotenv”: “^1.6.0”,
“expo”: “~40.0.0”,
“expo-app-loading”: “^1.0.1”,
“expo-asset”: “^8.2.1”,
“expo-font”: “~8.4.0”,
“expo-image-picker”: “~9.2.0”,
“expo-notifications”: “~0.8.2”,
“expo-status-bar”: “~1.0.3”,
“formik”: “^2.2.6”,
“hex-to-rgba”: “^2.0.1”,
“prop-types”: “^15.7.2”,
“react”: “16.13.1”,
“react-dom”: “16.13.1”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz”,
“react-native-animated-loader”: “0.0.9”,
“react-native-elements”: “^3.1.0”,
“react-native-fontawesome-pro”: “^2.1.0”,
“react-native-gesture-handler”: “~1.8.0”,
“react-native-modal”: “^11.6.1”,
“react-native-popup-menu”: “^0.15.10”,
“react-native-reanimated”: “~1.13.0”,
“react-native-screens”: “~2.15.0”,
“react-native-toast-message”: “^1.4.3”,
“react-native-web”: “~0.13.12”,
“react-native-webview”: “11.0.0”,
“rn-sliding-up-panel”: “^2.4.5”,
“yup”: “^0.32.8”
},
“devDependencies”: {
@babel/core”: “~7.9.0”,
“babel-eslint”: “^10.1.0”,
“babel-plugin-module-resolver”: “^3.2.0”,
“eslint”: “^7.18.0”,
“eslint-config-prettier”: “^7.1.0”,
“eslint-plugin-prettier”: “^3.3.1”,
“eslint-plugin-react”: “^7.22.0”,
“eslint-plugin-react-native”: “^3.10.0”,
“prettier”: “^2.2.1”,
“react-native-svg”: “^12.1.0”,
“react-native-svg-transformer”: “^0.14.3”
},
“private”: true
}

hey @adamjnav did you get a chance to review this issue? thanks in advance.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.