app version includes SDK com.segment.analytics.android:analytics, 4.9.4 or an SDK that one of your libraries depends on, which collects personal or sensitive data that includes but may not be limited to Advertising ID, Android ID identifiers.

Please provide the following:

  1. SDK Version: 43
  2. Platforms(Android/iOS/web/all): android

“our app version includes SDK com.segment.analytics.android:analytics, 4.9.4 or an SDK that one of your libraries depends on, which collects personal or sensitive data that includes but may not be limited to Advertising ID, Android ID identifiers. Persistent device identifiers may not be linked to other personal and sensitive user data or resettable device identifiers as described in the User Data policy.”

i didnt know why i have these inbox in my google play console, i also dont have com.segment.analytics.android:analytics installed on my device? what does this means?

Hi @womfinance

How did you build the app?

I suspect you used expo build:android
If so, your app will include some code (e.g. the Facebook SDK) even if your app doesn’t use it.

If you build with eas build -p android instead, the apk/aab will only include what your app actually uses.

Hi @wodin I received the message too, do I have to do anything to clear it. Does this effect the released app or the next releases?
BTW I don’t want to use eas yet, althought expo build is still in use, why does this happen?

Hi @hakanpuente

As far as I know, if you are not using something like Segment, AdMob, Facebook Ads etc. in your app then the best solution at the moment is to move to EAS Build. That way the offending code will not be included in the APK.

Of course, if you are using things like Segment, AdMob, Facebook Ads etc. then you will need to make sure you comply with Google’s requirements related to Ad IDs etc. (I am not 100% sure of what’s required here, but if you search for things like “android advertising ID” there are various blog posts etc. about this.)

I hear that the Expo team is planning to look this week at what might be a good workaround for people using expo build, but if anyone is in a rush, the quick (and actually most sustainable) path is move over to EAS Build.

Thanks @wodin , but the point is I don’t understand clearly, what problem do our apps have now? I think the released apps will not effected, right, but can’t we release new versions because of that error?

The problem in the error is about Segment which, like everything else included in the Expo SDK, is built into all apps built with expo build.

As far as I understand it, Segment is able to track users by recording certain user- or device-specific IDs and Google requires that if you do that you need to create a privacy policy etc. But even if your app is not actually using this functionality, the APK still includes the Segment code, so Google is still complaining about it.

If the app is not using this services, to set the permission to [] in the app.json can be the solution?
expo permissions

Unfortunately not. Google seems to be complaining based on the fact that the Segment code exists in the APK. Not based on the permissions.

1 Like

i understand that google have new policy going on that requires / targeted android api level 31, which is in new expo sdk 45. does upgrading to this sdk will also remove the “segment” requirement thing?

I Found this section in my google console, does this related to segment? as of now this option is left uncheck cuz we felt like we dont share ids. anyway if i check this that means iam comply with googles policy on this matter?

No, they are completely separate requirements.

No, as far as I know you would also need to create a privacy policy to say how you use that information. Since you are not using that information it seems better to use EAS Build which would remove the code from your app.

yea i tried to use EAS but i always got this when trying to install eas-cli

error @expo/eas-json@0.53.1: The engine "node" is incompatible with this module. Expected version ">=14.0.0". Got "12.19.0"
error Found incompatible module.

sorry correction, we do use deviceId from expo-constants. is that the same thing as what is asked in the previous picture?

Looks like you’re running nodejs version 12. Upgrade to 16.

yes i did upgraded it, and now showing this error when the EAS is building :frowning: do you know why?

[stderr] 
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
[stderr] 
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
[stderr] 
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
[stderr] 
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
[stderr] 
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
[stderr] 
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
[stderr] 
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
[stderr] 
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
[stderr] 
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
[stderr] 
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
> Configure project :react-native-firebase_app
:react-native-firebase_app package.json found at /home/expo/workingdir/build/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_app:firebase.bom using default value: 29.1.0
:react-native-firebase_app:play.play-services-auth using default value: 20.1.0
:react-native-firebase_app package.json found at /home/expo/workingdir/build/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_app:version set from package.json: 14.5.0 (14,5,0 - 14005000)
:react-native-firebase_app:android.compileSdk using custom value: 30
:react-native-firebase_app:android.targetSdk using custom value: 30
:react-native-firebase_app:android.minSdk using custom value: 21
:react-native-firebase_app:reactNativeAndroidDir /home/expo/workingdir/build/node_modules/react-native/android
> Configure project :react-native-firebase_crashlytics
:react-native-firebase_crashlytics package.json found at /home/expo/workingdir/build/node_modules/@react-native-firebase/crashlytics/package.json
:react-native-firebase_app package.json found at /home/expo/workingdir/build/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_crashlytics:firebase.bom using default value: 29.1.0
:react-native-firebase_crashlytics package.json found at /home/expo/workingdir/build/node_modules/@react-native-firebase/crashlytics/package.json
:react-native-firebase_crashlytics:version set from package.json: 14.5.0 (14,5,0 - 14005000)
:react-native-firebase_crashlytics:android.compileSdk using custom value: 30
:react-native-firebase_crashlytics:android.targetSdk using custom value: 30
:react-native-firebase_crashlytics:android.minSdk using custom value: 21
:react-native-firebase_crashlytics:reactNativeAndroidDir /home/expo/workingdir/build/node_modules/react-native/android
> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Welcome to Metro!
Fast - Scalable - Integrated
[stderr] 
error index.js: Transformer.transform is not a function.
TypeError: Transformer.transform is not a function
    at Object.<anonymous> (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/metro/src/DeltaBundler/Worker.js:80:38)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/metro/src/DeltaBundler/Worker.js:14:24)
    at _next (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/metro/src/DeltaBundler/Worker.js:36:9)
    at /home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/metro/src/DeltaBundler/Worker.js:43:7
    at new Promise (<anonymous>)
    at Object.<anonymous> (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/metro/src/DeltaBundler/Worker.js:32:12)
    at Object._transform (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/metro/src/DeltaBundler/Worker.js:98:21)
    at Object.transform (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/metro/src/DeltaBundler/Worker.js:55:21)
info Run CLI with --verbose flag for more details.
> Task :app:bundleReleaseJsAndAssets FAILED
[stderr] 
FAILURE: Build failed with an exception.
[stderr] 
* What went wrong:
[stderr] 
Execution failed for task ':app:bundleReleaseJsAndAssets'.
[stderr] 
> Process 'command 'node'' finished with non-zero exit value 1
[stderr] 
* Try:
[stderr] 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] 
* Get more help at https://help.gradle.org
[stderr] 
BUILD FAILED in 1m 58s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
1 actionable task: 1 executed
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

What does the code look like exactly? I don’t see a Constants.deviceId in the docs.

Not sure off hand why the build is failing. What are your dependencies?

import Constants from “expo-constants”;
const deviceId = Constants.deviceId !== undefined ? Constants.deviceId : Constants.installationId;

its just basically like this. it returns a device spesific id in form of UUID. we used this as a unique identifier for each user that downloaded the app. but i think its deprececated in SDK 44,45. you wont see it in the docs but when you console.log(Constants) it returns it.

iam using sdk 43.