Builds locally but fails on EAS due to plugins in app.json

See original GitHub issue

Summary

When adding plugins to app.json it builds fine locally but fails when running eas build.

We have this as a plugin in app.json: "plugins": ["./android-manifest.plugin.js"] This is a simple file where we edit the android-manifest (which is not the problem). Then we prebuild locally to test and everything works fine. But when we run: expo build --platform android it fails with this error: ENOENT: no such file or directory, open '/home/expo/workingdir/build/apps/expo/android/gradlew'

We didn’t know why it failed but before we tried to upgrade to SDK 46 and for that we needed to specify the kotlin version in plugins. Whenever we remove the plugins out of app.json it works like a charm but with plugins it fails.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

Android

SDK Version (managed workflow only)

45

Environment

expo-env-info 1.0.5 environment info: System: OS: macOS 12.4 Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.16.0 - /usr/local/bin/node Yarn: 1.22.17 - /opt/homebrew/bin/yarn npm: 8.11.0 - /usr/local/bin/npm Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 30, 31, 32 Build Tools: 30.0.2, 30.0.3, 31.0.0, 32.0.0 System Images: android-32 | Google APIs ARM 64 v8a IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8092744 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild npmGlobalPackages: expo-cli: 5.5.1 Expo Workflow: bare

Reproducible demo

  1. Make an expo project
  2. Add plugins to your app.json:
 "plugins": [
      [
        "expo-build-properties",
        {
          "android": {
            "kotlinVersion": "1.6.10"
          }
        }
   ]
]
  1. Run expo prebuild
  2. Run expo build --platform android

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Kudocommented, Jul 25, 2022

could you provide a repository with minimal reproducible example? i just tested a sdk 45 managed app with expo-build-properties plugin and it works for me.

1reaction
brentvatnecommented, Jul 23, 2022

can you share a link to the build?

probably you are accidentally uploading your android directory and it’s not running prebuild there, and you have some gitignore rules set to ignore gradlew

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting build errors and crashes - Expo Documentation
A reference for troubleshooting build errors and crashes when using EAS Build. ... a JavaScript error, this is likely due to a config...
Read more >
Recently Active 'eas' Questions - Stack Overflow
I'm trying to build an Expo react-native app, in android the build succeed but in iOS is failing! It's failing in Run fastline...
Read more >
eas-cli - npm
Learn more: https://docs.expo.dev/build-reference/eas-json/ ... submit app binary to App Store and/or Play Store ALIASES $ eas build:submit ...
Read more >
Doing More with Expo: Using Custom Native Code - SitePen
Builds can also be submitted to app stores through EAS, further simplifying ... but this structure works well for a project-local plugin.
Read more >
expo failed to resolve plugin for module - You.com | The AI ...
expo install react-native-fbsdk-next react-native-fbads eas build --profile development ... This is my app.json where I configured the plugins array:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found