expo / eas-cli

Fastest way to build, submit, and update iOS and Android apps
https://docs.expo.dev/eas/
MIT License
826 stars 84 forks source link

[Android] EAS during build is not using transitive dependency to @react-native-picker/picker #1626

Closed drnow4u closed 1 year ago

drnow4u commented 1 year ago

Build/Submit details page URL

https://expo.dev/accounts/techmetria/projects/TeCaSer/builds/f9297a85-4035-44ce-8c90-55d99aec59ca

Summary

In package.json is dependencies to "native-base": "^2.15.2" and Native Base depends on @react-native-picker/picker.

The build was successful and the application was deployed to Google Play. After installation, when the page containing @react-native-picker/picker component is presented application crashes immediately. Expo CLI was able to build and link @react-native-picker/picker in the application correctly. With EAS build crash is observed.

Working in build https://expo.dev/accounts/techmetria/projects/TeCaSer/builds/cf44de47-7ddc-489e-8c90-121b2673ab4c and in the logs of Run gradlew is:

> Task :react-native-picker_picker:preBuild UP-TO-DATE
> Task :react-native-picker_picker:preReleaseBuild UP-TO-DATE
...
> Task :react-native-picker_picker:mergeReleaseShaders
> Task :react-native-picker_picker:compileReleaseShaders NO-SOURCE
> Task :react-native-picker_picker:generateReleaseAssets UP-TO-DATE
...
> Task :react-native-picker_picker:packageReleaseAssets
...
> Task :react-native-picker_picker:packageReleaseRenderscript NO-SOURCE
...
> Task :react-native-picker_picker:compileReleaseRenderscript NO-SOURCE
...
> Task :react-native-picker_picker:generateReleaseResValues
> Task :react-native-picker_picker:generateReleaseResources

and package.json contains explicit:

  "dependencies": {
    "@react-native-picker/picker": "^2.4.8",

I made experiments and overridden in package.json dependency to a different version of @react-native-picker/picker without success:

"overrides": {
    "native-base": {
      "@react-native-picker/picker": "^2.4.8"
    }
  },

Managed or bare?

Managed

Environment

Running "expo doctor"

Error output

No error during build process

Reproducible demo or steps to reproduce from a blank project

{
  "name": "myApp",
  "version": "0.13.6",
  "private": true,
  "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": {
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/datetimepicker": "3.5.2",
    "@react-native-community/slider": "4.2.1",
    "@react-navigation/native": "^6.0.10",
    "@react-navigation/native-stack": "^6.6.2",
    "axios": "^0.21.1",
    "base-64": "^1.0.0",
    "crypto-js": "3.1.9-1",
    "date-time-format-timezone": "^1.0.22",
    "expo": "^45.0.8",
    "expo-app-loading": "~2.0.0",
    "expo-camera": "~12.2.0",
    "expo-cli": "^4.3.2",
    "expo-file-system": "~14.0.0",
    "expo-font": "~10.1.0",
    "expo-image-picker": "~13.1.1",
    "expo-linking": "~3.1.0",
    "expo-secure-store": "~11.2.0",
    "expo-status-bar": "~1.3.0",
    "expo-web-browser": "~10.2.1",
    "i18next": "^21.4.0",
    "intl": "^1.2.5",
    "luxon": "^1.26.0",
    "native-base": "^2.15.2",
    "query-string": "^6.13.7",
    "react": "17.0.2",
    "react-devtools": "^4.10.1",
    "react-dom": "17.0.2",
    "react-i18next": "^11.13.0",
    "react-native": "0.68.2",
    "react-native-image-pan-zoom": "^2.1.12",
    "react-native-safe-area-context": "4.2.4",
    "react-native-screens": "~3.11.1",
    "react-native-swipe-list-view": "^3.2.9",
    "react-native-url-polyfill": "^1.3.0",
    "react-native-vector-icons": "^7.1.0",
    "react-native-webview": "11.18.1",
    "react-router-native": "^5.3.1",
    "uuid": "^3.4.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/luxon": "^1.25.1",
    "@types/react": "~17.0.21",
    "@types/react-dom": "~17.0.11",
    "@types/react-native": "~0.67.6",
    "@types/react-router-native": "^5.1.0",
    "babel-plugin-transform-inline-environment-variables": "^0.4.3",
    "husky": "^5.1.3",
    "prettier": "2.2.1",
    "pretty-quick": "^3.1.0",
    "typescript": "~4.3.5"
  },
  "overrides": {
    "native-base": {
      "@react-native-picker/picker": "^2.4.8"
    }
  }
}
dsokal commented 1 year ago

This is not an issue with EAS Build.

Things you can try to debug the problem:

EAS Build executes the same exact steps. This means if you get the same errors with an app built locally, there's no chance that EAS Build will build something else.

ewein commented 1 year ago

I'm having the same issue. Do you find a fix for this?

drnow4u commented 1 year ago

@ewein Yes, when the explicit dependency to @react-native-picker/picker was added to the project's package.json file, it solved the issue for me.