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

Stuck on splash screen with TestFlight #51

Closed
dynamiccarrots opened this issue Jan 24, 2022 · 6 comments
Closed

Stuck on splash screen with TestFlight #51

dynamiccarrots opened this issue Jan 24, 2022 · 6 comments

Comments

@dynamiccarrots
Copy link

dynamiccarrots commented Jan 24, 2022

I am in the process of testing One Signal with Expo so I have a fresh Expo install that runs fine when deployed to an iPhone using TestFlight. I used the expo init command to create this and complied the app using Expos servers.

However, as soon as I add this plugin and compile the app in the same way, TestFlight just hangs on the splash screen, I have even installed Sentry to see if I can get any errors from it but it's not even getting to that point.

Here are all the files from my app that I have changed when adding this plugin, any help would be much appreciated here.

app.json

  "expo": {
    "name": "notificationtest",
    "slug": "notificationtest",
    "version": "1.0.8",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.dynamiccarrots.testapp",
      "buildNumber": "1.0.8"
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      }
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "hooks": {
      "postPublish": [
        {
          "file": "sentry-expo/upload-sourcemaps",
          "config": {
            "url": "{REMOVED FOR HERE}",
            "organization": "appdev",
            "project": "notificationtest",
            "authToken": "{REMOVED FOR HERE}"
          }
        }
      ]
    },
    "extra": {
      "oneSignalAppId": "c21f7175-4c13-4a79-8f48-67cf2736e174" // not the real ID for here
    },
    "plugins": [
      [
        "onesignal-expo-plugin",
        {
          "mode": "development",
          "devTeam": "{REMOVED FOR HERE}"
        }
      ]
    ]
  }
}

App.js

import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import OneSignal from 'react-native-onesignal';
import Constants from "expo-constants";

Sentry.init({
  dsn: 'https://[email protected]/36',
  enableInExpoDevelopment: true,
  debug: true, // If `true`, Sentry will try to print out useful debugging information if something goes wrong with sending the event. Set it to `false` in production
});

OneSignal.setAppId(Constants.manifest.extra.oneSignalAppId);



export default function App() {
  return (
    <View style={styles.container}>
      <Text>Open up App.js to start working on your app!</Text>
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

package.json

{
  "scripts": {
    "start": "react-native start",
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@sentry/react-native": "^3.2.13",
    "expo": "~44.0.0",
    "expo-application": "^4.0.1",
    "expo-constants": "^13.0.1",
    "expo-device": "^4.1.0",
    "expo-splash-screen": "~0.14.1",
    "expo-status-bar": "~1.2.0",
    "expo-updates": "^0.11.5",
    "onesignal-expo-plugin": "^1.0.0-beta9",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-onesignal": "^4.3.5",
    "react-native-web": "0.17.1",
    "sentry-expo": "^4.0.3"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true,
  "name": "app",
  "version": "1.0.0"
}
@knilf-i-am
Copy link

Can you check the device logs in Xcode? Windows > Devices and simulators > Your device > Open console > Start. Just start your app and pause the console capture. Sort by process to find your app and you should find the error message that's causing your app to hang.

@dynamiccarrots
Copy link
Author

I seem to have found this in the console

Invariant Violation: Native module cannot be null.

Very confused as I do not have this issue in the simulator :/

@rgomezp
Copy link
Contributor

rgomezp commented Jan 26, 2022

Closing since this is addressed in duplicate discussion

@rgomezp rgomezp closed this as completed Jan 26, 2022
@frossetto
Copy link

Sorry to revive this issue, but @dynamiccarrots issue states that this is the final build (I'm having the exact same issue) and not using Expo GO (the issue from the linked issue) . The build server through App Connect is hanging on the splashscreen.

@rgomezp
Copy link
Contributor

rgomezp commented Feb 2, 2022

@frossetto ,
Not a problem. If you remove the OneSignal integration altogether, does the issue occur?

@rgomezp
Copy link
Contributor

rgomezp commented Feb 14, 2022

Closing due to no response.

@rgomezp rgomezp closed this as completed Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants