Android Failure for Managed Workflows due to npm

Managed workflow
SDK: 44.0.0
Only Android is failing.
iOS works fine on EAS.
Development on Android using expo works fine.

Ninja EDIT for future readers: All of the below issues are caused by using npm instead of using yarn. Updates are in later posts. Updating the title to match. The TL;DR below is wrong.

TLDR - Kotlin is busted for some expo packages: [RN 0.66][SDK 44][Android] `expo` package no longer compatible with RN 0.66 (`expo-file-system` issue) · Issue #15632 · expo/expo · GitHub

Is this solvable for those of us on managed workflows?


Summary of other potential discoveries I’m investigating for my own project:

  • expo-sentry not compatible with commonjs or something, see below. removed it and build moved forward.
  • expo-splash-screen needs chalk? installed chalk as a dependency and build moved forward.
  • expo-google-app-auth deprecation happened and now it’s broken. Removed it and build moved forward.
  • expo-file-system breaks kotlin? downgraded. Still fails. Upgraded. Still fails.

Here is what I did to try and solve my own issues…

Logs from EAS build

This is where I started

Running './gradlew :app:bundleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-6.9-all.zip
Unzipping /home/expo/.gradle/wrapper/dists/gradle-6.9-all/dooywd8nv05k16orzxge2b1bs/gradle-6.9-all.zip to /home/expo/.gradle/wrapper/dists/gradle-6.9-all/dooywd8nv05k16orzxge2b1bs
Set executable permissions for: /home/expo/.gradle/wrapper/dists/gradle-6.9-all/dooywd8nv05k16orzxge2b1bs/gradle-6.9/bin/gradle
Welcome to Gradle 6.9!

Here are the highlights of this release:

- This is a small backport release.

- Java 16 can be used to compile when used with Java toolchains

- Dynamic versions can be used within plugin declarations

- Native support for Apple Silicon processors

For more details see https://docs.gradle.org/6.9/release-notes.html

To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.9/userguide/gradle_daemon.html#sec:disabling_the_daemon.

Daemon will be stopped at the end of the build

[stderr] FAILURE: Build completed with 2 failures.

[stderr] 1: Task failed with an exception.

[stderr] -----------

[stderr] * Where:

[stderr] Build file '/home/expo/workingdir/build/android/app/build.gradle' line: 88

[stderr] * What went wrong:

[stderr] A problem occurred evaluating project ':app'.

[stderr] > String index out of range: 0

[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] ==============================================================================

[stderr] 2: Task failed with an exception.

[stderr] -----------

[stderr] * What went wrong:

[stderr] A problem occurred configuring project ':app'.

[stderr] > compileSdkVersion is not specified. Please add it to build.gradle

[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] ==============================================================================

[stderr] * Get more help at https://help.gradle.org

[stderr] BUILD FAILED in 1m 1s

Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

Debugging Steps:


git checkout master

git clean -fdx

npm install

expo run:android --variant release

Interestingly expo decides to use yarn to install packages… not sure why.

And we get our first failure:


» android: androidNavigationBar.visible: Property is deprecated in Android 11 (API 30) and will be removed from Expo SDK. https://expo.fyi/android-navigation-bar-visible-deprecated

(node:6384) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/adamgross/dev/dealer_ui/node_modules/formik/node_modules/tslib/package.json.

Update this package.json to use a subpath pattern like "./*".

(Use `node --trace-deprecation ...` to show where the warning was created)

(node:6384) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/node_modules/tslib/package.json.

Update this package.json to use a subpath pattern like "./*".

(node:6384) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/adamgross/dev/dealer_ui/node_modules/@sentry/integrations/node_modules/tslib/package.json.

Update this package.json to use a subpath pattern like "./*".

(node:6384) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/adamgross/dev/dealer_ui/node_modules/@sentry/react/node_modules/tslib/package.json.

Update this package.json to use a subpath pattern like "./*".

(node:6384) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/adamgross/dev/dealer_ui/node_modules/@sentry/tracing/node_modules/tslib/package.json.

Update this package.json to use a subpath pattern like "./*".

Using node to generate images. This is much slower than using native packages.

› Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.

✖ Config sync failed

[android.dangerous]: withAndroidDangerousBaseMod: Cannot find module 'chalk'

Require stack:

- /Users/adamgross/dev/dealer_ui/node_modules/@expo/image-utils/build/Image.js

- /Users/adamgross/dev/dealer_ui/node_modules/@expo/image-utils/build/index.js

- /Users/adamgross/dev/dealer_ui/node_modules/expo-splash-screen/node_modules/@expo/prebuild-config/build/plugins/unversioned/expo-splash-screen/withAndroidSplashImages.js

- /Users/adamgross/dev/dealer_ui/node_modules/expo-splash-screen/node_modules/@expo/prebuild-config/build/plugins/unversioned/expo-splash-screen/withAndroidSplashScreen.js

- /Users/adamgross/dev/dealer_ui/node_modules/expo-splash-screen/plugin/build/withSplashScreen.js

- /Users/adamgross/dev/dealer_ui/node_modules/expo-splash-screen/app.plugin.js

- /Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js

- /Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js

- /Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/plugins/withPlugins.js

- /Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/index.js

- /Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config/build/plugins/withConfigPlugins.js

- /Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config/build/Config.js

- /Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config/build/index.js

- /Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/metro-config/build/ExpoMetroConfig.js

- /Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/build/exp.js

- /Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/bin/expo.js

So something with expo-splash-screen breaks from the chalk package? I do have "expo-splash-screen": "~0.14.1", listed as a dependency in my package.json. So maybe a transient dependency problem?

If I re-run the exact same command after taking no action, it goes farther:


❯ expo run:android --variant release

› Building app...

⚠️ Cannot resolve the path to "babel-loader" package.

Configuration on demand is an incubating feature.

> Configure project :expo-file-system

WARNING: Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.

It will be removed in version 5.0 of the Android Gradle plugin.

For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.

> Configure project :expo-structured-headers

Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.

> Configure project :expo

Using expo modules

- expo-app-auth (11.1.1)

- expo-application (4.0.2)

- expo-constants (13.0.2)

- expo-crypto (10.1.2)

- expo-device (4.1.1)

- expo-facebook (12.1.1)

- expo-file-system (13.1.4)

- expo-font (10.1.0)

- expo-haptics (11.1.1)

- expo-json-utils (0.2.1)

- expo-keep-awake (10.0.2)

- expo-linear-gradient (11.0.3)

- expo-localization (12.0.1)

- expo-manifests (0.2.4)

- expo-modules-core (0.6.5)

- expo-notifications (0.14.1)

- expo-screen-orientation (4.1.2)

- expo-splash-screen (0.14.2)

- expo-structured-headers (2.1.1)

- expo-updates (0.11.7)

- react-native-reanimated (2.3.3)

FAILURE: Build failed with an exception.

* What went wrong:

Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.

> Cannot query the value of this provider because it has no value available.

So now I backtrack to the chalk problem:


❯ expo install chalk

Installing 1 other package using Yarn.

> yarn add chalk

yarn add v1.22.17

warning ../../package.json: No license field

warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.

[1/4] 🔍 Resolving packages...

[2/4] 🚚 Fetching packages...

[3/4] 🔗 Linking dependencies...

[4/4] 🔨 Building fresh packages...

success Saved lockfile.

success Saved 1 new dependency.

info Direct dependencies

└─ chalk@5.0.1

info All dependencies

└─ chalk@5.0.1

✨ Done in 4.44s.

Looks like I got converted to yarn :laughing:


❯ expo run:android --variant release

require() of ES Module /Users/adamgross/dev/dealer_ui/node_modules/chalk/source/index.js from /Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/node_modules/@expo/config-plugins/build/plugins/withMod.js not supported.

Instead change the require of index.js in /Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/node_modules/@expo/config-plugins/build/plugins/withMod.js to a dynamic import() which is available in all CommonJS modules.

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/adamgross/dev/dealer_ui/node_modules/chalk/source/index.js from /Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/node_modules/@expo/config-plugins/build/plugins/withMod.js not supported.

Instead change the require of index.js in /Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/node_modules/@expo/config-plugins/build/plugins/withMod.js to a dynamic import() which is available in all CommonJS modules.

at Object.<anonymous> (/Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/node_modules/@expo/config-plugins/build/plugins/withMod.js:7:33)

at Object.<anonymous> (/Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/node_modules/@expo/config-plugins/build/plugins/android-plugins.js:4:19)

at Object.<anonymous> (/Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/node_modules/@expo/config-plugins/build/android/AllowBackup.js:4:27)

at Object.<anonymous> (/Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/node_modules/@expo/config-plugins/build/android/index.js:23:34)

at Object.<anonymous> (/Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/node_modules/@expo/config-plugins/build/index.js:29:36)

at Object.<anonymous> (/Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/plugin/build/withSentry.js:4:26)

at Object.<anonymous> (/Users/adamgross/dev/dealer_ui/node_modules/sentry-expo/app.plugin.js:1:18)

at requirePluginFile (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js:258:12)

at resolveConfigPluginFunctionWithInfo (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js:192:14)

at resolveConfigPluginFunction (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js:179:7)

at withStaticPlugin (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js:108:70)

at /Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/plugins/withPlugins.js:38:84

at Array.reduce (<anonymous>)

at withPlugins (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/plugins/withPlugins.js:38:18)

at withConfigPlugins (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config/build/plugins/withConfigPlugins.js:45:47)

at fillAndReturnConfig (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config/build/Config.js:315:78)

at getConfig (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/config/build/Config.js:378:12)

at actionAsync (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/build/commands/run/android/runAndroid.js:300:31)

So now maybe something with sentry-expo? Sentry source-maps aren’t uploading right on this project, so maybe the two are related. For now, I’ll remove sentry-expo and see if this gets farther.

I removed the hooks and plugins list from my app.config.ts (both specific only to sentry-expo on my project), removed it from package.json, and removed usages of it from my codebase.


❯ expo run:android --variant release

› Building app...

⚠️ Cannot resolve the path to "babel-loader" package.

Configuration on demand is an incubating feature.

> Configure project :expo-file-system

WARNING: Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.

It will be removed in version 5.0 of the Android Gradle plugin.

For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.

> Configure project :expo-structured-headers

Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.

> Configure project :expo

Using expo modules

- expo-app-auth (11.1.1)

- expo-application (4.0.2)

- expo-constants (13.0.2)

- expo-crypto (10.1.2)

- expo-device (4.1.1)

- expo-facebook (12.1.1)

- expo-file-system (13.1.4)

- expo-font (10.1.0)

- expo-haptics (11.1.1)

- expo-json-utils (0.2.1)

- expo-keep-awake (10.0.2)

- expo-linear-gradient (11.0.3)

- expo-localization (12.0.1)

- expo-manifests (0.2.4)

- expo-modules-core (0.6.5)

- expo-notifications (0.14.1)

- expo-screen-orientation (4.1.2)

- expo-splash-screen (0.14.2)

- expo-structured-headers (2.1.1)

- expo-updates (0.11.7)

- react-native-reanimated (2.3.3)

FAILURE: Build failed with an exception.

* What went wrong:

Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.

> Cannot query the value of this provider because it has no value available.

* Try:

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.

* Get more help at https://help.gradle.org

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

BUILD FAILED in 9s

/Users/adamgross/dev/dealer_ui/android/gradlew exited with non-zero code: 1

Error: /Users/adamgross/dev/dealer_ui/android/gradlew exited with non-zero code: 1

at ChildProcess.completionListener (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13)

at Object.onceWrapper (node:events:510:26)

at ChildProcess.emit (node:events:390:28)

at maybeClose (node:internal/child_process:1064:16)

at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)

...

at spawnAsync (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)

at spawnGradleAsync (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/src/commands/run/android/spawnGradleAsync.ts:83:18)

at assembleAsync (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/src/commands/run/android/spawnGradleAsync.ts:57:16)

at actionAsync (/Users/adamgross/.asdf/installs/nodejs/16.13.0/.npm/lib/node_modules/expo-cli/src/commands/run/android/runAndroid.ts:143:9)

Off to google I go. Was missing an env var:


export ANDROID_HOME=/Users/adamgross/Library/Android/sdk

export PATH=$PATH:$ANDROID_HOME/emulator

export PATH=$PATH:$ANDROID_HOME/platform-tools

export PATH=$PATH:$ANDROID_HOME/tools

export PATH=$PATH:$ANDROID_HOME/tools/bin

❯ expo run:android --variant release

#....

#....

#....

> Task :app:processReleaseMainManifest FAILED

[:react-native-reanimated] /Users/adamgross/dev/dealer_ui/node_modules/react-native-reanimated/android/build/intermediates/library_manifest/release/AndroidManifest.xml Warning:

Package name 'com.swmansion.reanimated' used in: :react-native-reanimated, react-native-reanimated-64-jsc.aar.

/Users/adamgross/dev/dealer_ui/android/app/src/main/AndroidManifest.xml Error:

Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <appAuthRedirectScheme> is provided.

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':app:processReleaseMainManifest'.

Ok, been doing all the things… let’s clean gradle and try again.


❯ cd android

❯ ./gradlew clean

❯ expo run:android --variant release

#....

#....

#....

> Task :app:processReleaseMainManifest FAILED

[:react-native-reanimated] /Users/adamgross/dev/dealer_ui/node_modules/react-native-reanimated/android/build/intermediates/library_manifest/release/AndroidManifest.xml Warning:

Package name 'com.swmansion.reanimated' used in: :react-native-reanimated, react-native-reanimated-64-jsc.aar.

/Users/adamgross/dev/dealer_ui/android/app/src/main/AndroidManifest.xml Error:

Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <appAuthRedirectScheme> is provided.

I do have a scheme in my app.config.ts file. Apparently this is because of expo-app-auth which is from expo-google-app-auth which is deprecated…

So I’ll remove the usage of expo-google-app-auth and it’s package.json entry.

And we get farther:


> Task :expo:compileReleaseKotlin FAILED

e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors

e: /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

e: /Users/adamgross/.gradle/caches/transforms-3/d6fde65cea0702b678e59c113b631c89/transformed/jetified-kotlin-stdlib-common-1.6.10.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

e: /Users/adamgross/dev/dealer_ui/node_modules/expo-font/android/build/intermediates/compile_library_classes_jar/release/classes.jar!/META-INF/expo-font_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ApplicationLifecycleDispatcher.kt: (14, 8): Unresolved reference: flatMap

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ApplicationLifecycleDispatcher.kt: (14, 18): Unresolved reference: it

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ApplicationLifecycleDispatcher.kt: (15, 15): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ApplicationLifecycleDispatcher.kt: (15, 27): Unresolved reference: it

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ApplicationLifecycleDispatcher.kt: (18, 4): Class 'kotlin.jvm.JvmStatic' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/jvm/JvmStatic.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ApplicationLifecycleDispatcher.kt: (20, 37): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ApplicationLifecycleDispatcher.kt: (20, 50): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ApplicationLifecycleDispatcher.kt: (23, 4): Class 'kotlin.jvm.JvmStatic' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/jvm/JvmStatic.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ApplicationLifecycleDispatcher.kt: (25, 37): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ApplicationLifecycleDispatcher.kt: (25, 50): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ExpoModulesPackage.kt: (20, 6): Class 'kotlin.Suppress' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Suppress.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ExpoModulesPackage.kt: (21, 39): Unresolved reference: lazy

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ExpoModulesPackage.kt: (26, 12): Unresolved reference: sortedByDescending

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ExpoModulesPackage.kt: (26, 54): Unresolved reference: it

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ExpoModulesPackage.kt: (29, 9): Unresolved reference: emptyList

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (24, 6): Unresolved reference: flatMap

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (24, 16): Unresolved reference: it

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (26, 6): Unresolved reference: flatMap

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (26, 16): Unresolved reference: it

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (37, 21): Unresolved reference: it

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (54, 12): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (54, 66): Unresolved reference: java

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (69, 55): Unresolved reference: java

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (70, 20): Variable expected

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (73, 7): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (82, 5): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (82, 26): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (92, 12): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (99, 12): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (103, 14): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (128, 14): Unresolved reference: it

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (135, 14): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (139, 14): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (143, 14): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (158, 4): Class 'kotlin.Suppress' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Suppress.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (162, 45): Unresolved reference: java

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (163, 14): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (164, 16): Unresolved reference: methodMap[name]

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (164, 16): No set method providing array access

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (169, 4): Class 'kotlin.Suppress' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Suppress.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (177, 45): Unresolved reference: java

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (178, 14): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (179, 16): Unresolved reference: methodMap[name]

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (179, 16): No set method providing array access

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (22, 6): Unresolved reference: flatMap

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (22, 16): Unresolved reference: it

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (32, 21): Unresolved reference: it

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (50, 4): Class 'kotlin.Suppress' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Suppress.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (66, 21): Unresolved reference: it

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (72, 21): Unresolved reference: it

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (98, 14): Unresolved reference: emptyList

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (102, 4): Class 'kotlin.Suppress' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Suppress.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (106, 39): Unresolved reference: java

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (107, 14): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

The class is loaded from /Users/adamgross/.gradle/caches/transforms-3/9a8c596b7e1788d5bad7c80991eefff1/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (108, 16): Unresolved reference: methodMap[name]

e: /Users/adamgross/dev/dealer_ui/node_modules/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt: (108, 16): No set method providing array access

w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':expo:compileReleaseKotlin'.

> Compilation error. See log for more details

* Try:

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.

* Get more help at https://help.gradle.org

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

BUILD FAILED in 1m 46s

503 actionable tasks: 271 executed, 232 up-to-date

/Users/adamgross/dev/dealer_ui/android/gradlew exited with non-zero code: 1

Apparently I need a different version of Kotlin… Googling this maybe it’s related to expo-file-system [EAS][SDK 44] Build breaking on Android "Task :expo:compileDebugKotlin FAILED" · Issue #15989 · expo/expo · GitHub. Dropping that to "expo-file-system": "13.1.1", and re-running.


git clean -fdx

npm install

expo run:android --variant release

# same error :(

[RN 0.66][SDK 44][Android] `expo` package no longer compatible with RN 0.66 (`expo-file-system` issue) · Issue #15632 · expo/expo · GitHub Ouch… apparently I’m not alone in the Kotlin suffering…

Trying 13.2.1 for expo-file-system. However, I’m nervous since I also use other expo packages mentioned in that thread…


git clean -fdx

npm install

expo run:android --variant release

# same error :(

And now I’m stuck. I’m not sure how I can use any of the recommended fixes on a manned workflow. Any ideas or is Android broken for managed workflows?

so there’s a lot going on here, but just to address one quick point - it looks like your project has both a yarn.lock and a package-lock.json, and if that’s the case then we guess that you are using yarn. delete one of them.

TLDR - Kotlin is busted for some expo packages: [RN 0.66][SDK 44][Android] expo package no longer compatible with RN 0.66 (expo-file-system issue) · Issue #15632 · expo/expo · GitHub

are you trying to use react-native 0.66 with sdk 44? we only expliitly support 0.64 with sdk 44. you should use sdk 45 instead if you want to use a newer version.

  • expo-sentry not compatible with commonjs or something, see below. removed it and build moved forward.

what version were you using? happy to investigate if you can help us repro. this is the first report of such an error that i have seen which leads me to believe there is something particular about your project config.

  • expo-splash-screen needs chalk ? installed chalk as a dependency and build moved forward.

chalk is a dependency of @expo/config-plugins. expo-splash-screen uses a config plugin, and config plugins use chalk.

  • expo-google-app-auth deprecation happened and now it’s broken. Removed it and build moved forward.

can you explain what is broken and how?

  • expo-file-system breaks kotlin? downgraded. Still fails. Upgraded. Still fails.

what version of expo-splash-screen? what do you mean it breaks kotlin?

fwiw there are thousands of builds on eas build on sdk 44 each day and so there is certainly something unique going on in your project! happy to help you get to the bottom of it

Thank you!

yarn.lock is created when I run expo run:android --variant release

My complete list of deps attached below.

So thankfully using React Native 64 and sdk 44 together.

Expo sentry version attached. Sentry error listed above, it’s a wall of text and errors so I get it. Look right above So now maybe something with sentry-expo?

I had to explicitly add chalk as a dependency or I got the error mentioned. [android.dangerous]: withAndroidDangerousBaseMod: Cannot find module 'chalk'

For google-app-auth I got the error containing Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <appAuthRedirectScheme> is provided.

expo-file-system and expo-splash-screen version attached. I ran into this issue with expo-file-system and despite changing versions cannot get past it [RN 0.66][SDK 44][Android] `expo` package no longer compatible with RN 0.66 (`expo-file-system` issue) · Issue #15632 · expo/expo · GitHub

    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/masked-view": "0.1.11",
    "@react-native-community/slider": "4.1.12",
    "@react-navigation/bottom-tabs": "^6.0.4",
    "@react-navigation/drawer": "^6.1.8",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/native-stack": "^6.2.5",
    "@react-navigation/stack": "^6.0.6",
    "chalk": "^5.0.1",
    "dayjs": "^1.10.7",
    "detox-expo-helpers": "github:fschoenfeldt/detox-expo-helpers",
    "dotenv": "^15.0.0",
    "expo": "^44.0.0",
    "expo-app-loading": "~1.3.0",
    "expo-apple-authentication": "~4.1.0",
    "expo-application": "~4.0.1",
    "expo-asset": "^8.4.6",
    "expo-blur": "~11.0.0",
    "expo-constants": "~13.0.1",
    "expo-crypto": "~10.1.1",
    "expo-device": "~4.1.0",
    "expo-facebook": "~12.1.0",
    "expo-file-system": "13.2.1",
    "expo-font": "^10.0.4",
    "expo-haptics": "~11.1.0",
    "expo-linear-gradient": "~11.0.3",
    "expo-linking": "~3.0.0",
    "expo-localization": "~12.0.0",
    "expo-notifications": "~0.14.0",
    "expo-screen-orientation": "~4.1.1",
    "expo-splash-screen": "~0.14.1",
    "expo-status-bar": "~1.2.0",
    "expo-updates": "~0.11.7",
    "firebase": "9.6.5",
    "formik": "^2.1.5",
    "i18n-js": "^3.8.0",
    "iconoir-react-native": "^4.7.1",
    "jest": "^26.6.3",
    "lodash": "^4.17.20",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-firebase-hooks": "^5.0.1",
    "react-hook-form": "^7.25.0",
    "react-native": "0.64.3",
    "react-native-calendars": "^1.1276.0",
    "react-native-elements": "^3.1.0",
    "react-native-gesture-handler": "~2.1.0",
    "react-native-get-random-values": "~1.7.0",
    "react-native-gifted-chat": "^0.16.3",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-pager-view": "5.4.9",
    "react-native-reanimated": "~2.3.1",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.10.2",
    "react-native-svg": "^12.1.1",
    "react-native-web": "0.17.5",
    "react-query": "^3.34.16",
    "react-sweet-state": "^2.6.0",
    "socket.io-client": "^4.0.1",
    "uuid": "^8.3.2",
    "websocket": "^1.0.33"

you can run expo prebuild -p android --npm and then expo run:android to use npm instead. it appears that the default logic when running expo run:android defaults to using yarn if you have it installed, rather than checking for lockfile as it should

1 Like

Ok, thanks. I’ll give expo prebuild -p android --npm a try and see what happens.

  • what does expo doctor say in your project?
  • can you look in your package lock to see if you have chalk installed?

After

git clean -fdx
npm install
expo prebuild -p android --npm
expo run:android --variant release

I still get the same kotlin error. Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

However it successfully used npm and did not create yarn.lock :tada:

╰─$ expo doctor
Some dependencies are incompatible with the installed expo package version:
 - expo-asset - expected version: ~8.4.6 - actual version installed: 8.5.0
 - expo-file-system - expected version: ~13.1.4 - actual version installed: 13.2.1
 - expo-font - expected version: ~10.0.4 - actual version installed: 10.1.0
 - react-native-svg - expected version: 12.1.1 - actual version installed: 12.3.0
Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo doctor --fix-dependencies,
or install individual packages by running expo install [package-name ...]

chalk exists in many places in node_modules :open_mouth:

╰─$ find node_modules -name chalk                                                                                                                                                                                                                         1 ↵
node_modules/jest-runtime/node_modules/chalk
node_modules/jest-matcher-utils/node_modules/chalk
node_modules/expo-file-system/node_modules/chalk
node_modules/expo-modules-autolinking/node_modules/chalk
node_modules/@jest/types/node_modules/chalk
node_modules/@jest/core/node_modules/chalk
node_modules/@jest/reporters/node_modules/chalk
node_modules/@jest/transform/node_modules/chalk
node_modules/@jest/console/node_modules/chalk
node_modules/jest-cli/node_modules/chalk
node_modules/react-native/node_modules/chalk
node_modules/babel-jest/node_modules/chalk
node_modules/jest-resolve/node_modules/chalk
node_modules/jest-watcher/node_modules/chalk
node_modules/@react-native-community/cli-hermes/node_modules/chalk
node_modules/@react-native-community/cli-platform-ios/node_modules/chalk
node_modules/@react-native-community/cli-tools/node_modules/chalk
node_modules/@react-native-community/cli-platform-android/node_modules/chalk
node_modules/chalk
node_modules/metro/node_modules/chalk
node_modules/jest-runner/node_modules/chalk
node_modules/jest-util/node_modules/chalk
node_modules/@expo/image-utils/node_modules/chalk
node_modules/@expo/prebuild-config/node_modules/chalk
node_modules/@expo/config-plugins/node_modules/chalk
node_modules/@expo/metro-config/node_modules/chalk
node_modules/jest-snapshot/node_modules/chalk
node_modules/jest-message-util/node_modules/chalk
node_modules/jest-validate/node_modules/chalk
node_modules/jest-each/node_modules/chalk
node_modules/jest-jasmine2/node_modules/chalk
node_modules/jest-diff/node_modules/chalk
node_modules/jest-config/node_modules/chalk

this is when running npm install with the dependencies you provided, except for chalk which i removed from the dependencies list. it should be resolving the root node_modules/chalk

expo doctor currently complains about expo-file-system. But that’s because I was trying various versions to get around the Kotlin issue. I can change back to 13.1.4 and re-run.

I have explicitly added chalk as a dependency to work around the above issue, so it now shows in my package.lock. I will remove it as a direct dependency, re-run the build to repro the failure, and grep my package-lock to see what is listed. This will take a few minutes :wink:

In the meantime

❯ expo doctor
Some dependencies are incompatible with the installed expo package version:
 - expo-file-system - expected version: ~13.1.4 - actual version installed: 13.2.1

❯ expo install expo-file-system

❯ cat package.json | grep expo-file-system
    "expo-file-system": "~13.1.4",

❯ git clean -fdx && 
   npm install &&
   expo prebuild -p android --npm &&
   expo run:android --variant release

#  currently executing... please hold

I do not get the same list for expo doctor Very confusing!

I agree about chalk it does not make sense.

It built locally! Thank you, thank you!

I will work backwards now and try and see which changes made along the way were required.

❯ git status
Alias tip: gst
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   .gitignore
	modified:   App.tsx # I removed sentry here
	modified:   app.config.ts 
	modified:   modules/GoogleSignIn.ts # here is where I removed expo-google-app-auth
	modified:   modules/helpers/captureError.ts # here is part of where I removed sentry
	modified:   package-lock.json
	modified:   package.json

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	android/
	index.js
	metro.config.js

no changes added to commit (use "git add" and/or "git commit -a")
diff --git a/App.tsx b/App.tsx
index 094c645..2f53f92 100644
--- a/App.tsx
+++ b/App.tsx
@@ -4,7 +4,6 @@ import * as Notifications from 'expo-notifications';
 import { Notification, NotificationBehavior } from "expo-notifications";
 import * as React from "react";
 import { QueryClient, QueryClientProvider } from 'react-query';
-import * as Sentry from 'sentry-expo';
 import { ThemeProvider } from './hooks/useTheme';
 import { TranslationProvider } from './hooks/useTranslation';
 import { UserProvider } from './hooks/useUser';
@@ -16,14 +15,6 @@ import Navigation from './navigation/Screens';

 const { debug: debugOptions, universalUrl, sentry: { DSN } } = Constants.manifest.extra;

-Sentry.init({
-  dsn: DSN,
-  enableInExpoDevelopment: false,
-  debug: false, // Sentry will try to print out useful debugging information if something goes wrong with sending an event. Set this to `false` in production.
-  tracesSampleRate: 1.0,
-  maxValueLength: 99999999, // TODO: trim this
-});
-
 // Setup sentry to capture unhandled promises - https://github.com/getsentry/sentry-react-native/issues/1077
 global.Promise = require('promise')
diff --git a/app.config.ts b/app.config.ts
index 781cd39..8f203f4 100644
--- a/app.config.ts
+++ b/app.config.ts
@@ -98,21 +98,5 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
       googleIosClientId: '169786675501-r0a0ss3eu2ufrsppd4jl8tmp31bijmj0.apps.googleusercontent.com',
       googleAndroidClientId: '169786675501-dh5i6ful03v30vd1pf9clofsmshviu1j.apps.googleusercontent.com' // TODO: create this
     }
-  },
-  hooks: {
-    postPublish: [
-      {
-        file: "sentry-expo/upload-sourcemaps",
-        config: {
-          organization: "table-l5",
-          project: "react-native",
-          authToken: process.env.SENTRY_AUTH_TOKEN,
-          setCommits: true
-        }
-      }
-    ]
-  },
-  plugins: [
-    "sentry-expo"
-  ]
+  }
 });
diff --git a/modules/GoogleSignIn.ts b/modules/GoogleSignIn.ts
index e1aadd8..e17f6af 100644
--- a/modules/GoogleSignIn.ts
+++ b/modules/GoogleSignIn.ts
@@ -1,4 +1,3 @@
-import * as GoogleAuthentication from 'expo-google-app-auth';
 import { FirebaseSignInWithGoogle } from './Firebase';
 import { buildLogger } from './helpers/buildLogger';
 import { captureError } from './helpers/captureError';
@@ -9,23 +8,5 @@ const clientIds = Constants.manifest.extra.externalClientIds;
 const log = buildLogger('GoogleSignInPressHandler');

 export const GoogleSignInPressHandler = async () => {
-  try {
-    const { idToken, accessToken, type } = await GoogleAuthentication.logInAsync({
-      androidStandaloneAppClientId: clientIds.googleAndroidClientId,
-      iosStandaloneAppClientId: clientIds.googleIosClientId,
-      scopes: ['profile', 'email']
-    });
-
-    switch (type) {
-      case 'success': {
-        FirebaseSignInWithGoogle(idToken, accessToken);
-      }
-      case 'cancel': {
-        log('log in was cancelled');
-      }
-    }
-
-  } catch (error) {
-    captureError(error);
-  }
+  return null;
 }
diff --git a/modules/helpers/captureError.ts b/modules/helpers/captureError.ts
index 7904b37..1f4bad5 100644
--- a/modules/helpers/captureError.ts
+++ b/modules/helpers/captureError.ts
@@ -1,21 +1,13 @@

-import * as Sentry from 'sentry-expo';
+

 export function captureError(error: Error, extra?: Record<string, string>) {
   console.error(error);
-  if (Sentry.Browser) {
-    Sentry.Browser.captureException(error, { extra });
-  } else {
-    Sentry.Native.captureException(error, { extra });
-  }
+
 }


 export function captureMessage(message: string) {
   console.log(message);
-  if (Sentry.Browser) {
-    Sentry.Browser.captureMessage(message);
-  } else {
-    Sentry.Native.captureMessage(message);
-  }
+
 }
diff --git a/package.json b/package.json
index 06364da..c27ad26 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,8 @@
 {
-  "main": "node_modules/expo/AppEntry.js",
   "scripts": {
-    "start": "expo start",
-    "android": "expo start --android",
-    "ios": "expo start --ios",
+    "start": "expo start --dev-client",
+    "android": "expo run:android",
+    "ios": "expo run:ios",
     "web": "expo start --web",
     "eject": "expo eject",
     "predeploy": "expo build:web",
@@ -23,6 +22,7 @@
     "@react-navigation/native": "^6.0.6",
     "@react-navigation/native-stack": "^6.2.5",
     "@react-navigation/stack": "^6.0.6",
+    "chalk": "^5.0.1",
     "dayjs": "^1.10.7",
     "detox-expo-helpers": "github:fschoenfeldt/detox-expo-helpers",
     "dotenv": "^15.0.0",
@@ -38,13 +38,13 @@
     "expo-facebook": "~12.1.0",
     "expo-file-system": "~13.1.4",
     "expo-font": "^10.0.4",
-    "expo-google-app-auth": "~8.3.0",
     "expo-haptics": "~11.1.0",
     "expo-linear-gradient": "~11.0.3",
     "expo-linking": "~3.0.0",
     "expo-localization": "~12.0.0",
     "expo-notifications": "~0.14.0",
     "expo-screen-orientation": "~4.1.1",
+    "expo-splash-screen": "~0.14.1",
     "expo-status-bar": "~1.2.0",
     "expo-updates": "~0.11.7",
     "firebase": "9.6.5",
@@ -53,10 +53,11 @@
     "iconoir-react-native": "^4.7.1",
     "jest": "^26.6.3",
     "lodash": "^4.17.20",
-    "react": "^17.0.1",
+    "react": "17.0.1",
+    "react-dom": "17.0.1",
     "react-firebase-hooks": "^5.0.1",
     "react-hook-form": "^7.25.0",
-    "react-native": "^0.64.3",
+    "react-native": "0.64.3",
     "react-native-calendars": "^1.1276.0",
     "react-native-elements": "^3.1.0",
     "react-native-gesture-handler": "~2.1.0",
@@ -71,11 +72,9 @@
     "react-native-web": "0.17.5",
     "react-query": "^3.34.16",
     "react-sweet-state": "^2.6.0",
-    "sentry-expo": "^4.0.0",
     "socket.io-client": "^4.0.1",
     "uuid": "^8.3.2",
-    "websocket": "^1.0.33",
-    "expo-splash-screen": "~0.14.1"
+    "websocket": "^1.0.33"
   },
   "devDependencies": {
     "@babel/core": "^7.16.12",
@@ -108,5 +107,7 @@
     "shelljs": "^0.8.5",
     "typescript": "~4.5.5"
   },
-  "private": true
+  "private": true,
+  "name": "dealer_ui",
+  "version": "1.0.0"
git checkout package.json
git checkout package-lock.json
npm install
expo doctor # no issues found
git clean -fdx && npm install && expo prebuild -p android --npm && expo run:android --variant release

It also builds… something doesn’t make sense. Going to try without prebuild.

interesting. i found that i was able to build if i installed with yarn rather than npm. so it could be that peer dependencies in a library somewhere are causing some issues here. i’ll try to narrow it down to a minimal set of libraries

2 Likes
git checkout package.json
git checkout package-lock.json
git clean -fdx && npm install && expo run:android --variant release

Still fails, so I should be able to narrow it down some.

Same, I’ll keep investigating. I need to get the kids some dinner now. I’ll come back to this later tonight. I’m very curious.

for now can you use yarn instead of npm? i’ve looked into this for the last hour or so and found a pretty strange quirk with how android modules are resolved when the dependencies are installed with npm, but only for certain dependencies. we’re investigating that now.

1 Like