Expo : com.segment.analytics.android:analytics error while submitting my app to Google Play Console
Asked Answered
C

2

7

I tried to upload the latest version of my app but I couldn't able to do the same because of the segment SDK version policy changes, etc. Even though the expo team says that this issue is fixed I'm facing the same error, kindly guide me if I'm doing something wrong. Error Screenshot

I tried the following actions

  • Downgrading the app
  • Upgrading the app
  • Including a few new packages
  • doing expo build
  • doing eas build
  • changing the CLI version

even removed all the packages except the basic packages and removed all the screens, just kept one blank green screen, and published the app in internal testing still got the same error.

package.json

{
  "version": "1.1.50",
  "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"
  },
  "dependencies": {
    "@expo/ngrok": "^4.1.0",
    "expo": "^45.0.6",
    "expo-status-bar": "~1.3.0",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-reanimated": "~2.8.0",
    "react-native-web": "0.17.7",
    "standard-version": "^9.5.0",
    "standard-version-expo": "^1.0.3"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

App.js

import React from "react";
import { StyleSheet, View} from "react-native";

export default function App() {
  return (
    <View style={styles.container}>
      
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor:"lime"
  },
});

please let me know what needs to be changed, Thanks

Cytolysis answered 30/6, 2022 at 3:42 Comment(0)
W
4

Looking at the rejection message, it clearly says that your app does not meet the new data policy as the version of the SDK 4.9.4 (com.segment.analytics.android:analytics) that you are using has an issue and it is better to upgrade to SDK version 4.10.1. Don't worry this is an automated review process rejecting your app so upgrading the SDK should help you fix the issue.

So I did some reading and looks like expo by default uses this segment library and there is no way to remove it currently as per https://github.com/expo/expo/issues/1320

Sadly this is a problem you hit with free and open-source tools.

The Expo documentation says that Segment is getting removed from SDK 46 but again SDK 46 is not released yet.

enter image description here

Things you can do at this point:

  1. Use React Native CLI instead of Expo.
  2. Upvote the feature request for removing Segment from Expo.
  3. Wait for expo 46
Willing answered 30/6, 2022 at 4:46 Comment(0)
D
3

You should run

expo install expo-analytics-segment

which upgrades the segment package to the newest version. Then you will be able to submit the app.

As seen in: https://github.com/expo/expo/issues/17845

Demiurge answered 9/7, 2022 at 14:55 Comment(1)
I have the exact same issue and I tried this method, it still didn't work for me sadlySpeos

© 2022 - 2024 — McMap. All rights reserved.