expo / turtle

Standalone app builder service
MIT License
385 stars 29 forks source link

Failed to build standalone app for android with SDK43 #364

Closed JimVanEeden closed 2 years ago

JimVanEeden commented 2 years ago

New Issue Checklist

Issue Description

Turtle fails to build app since expo SDK43 on Android. IOS build works fine. Older versions of the expo SDK also work fine.

Command executed
turtle build:android -d "./builds/1.8.0/android" --keystore-path "/path/to/keystore" --keystore-alias "/path/to/keystore-alias"
Complete output when running turtle, including the stack trace and command used
Dec 6 12:58:44 turtle[9312] INFO:  Starting build process
  platform: "android"
  buildPhase: "starting builder"
Dec 6 12:58:44 turtle[9312] INFO:  ImageUtils: setting image functions to alternative sharp implementations
  platform: "android"
  buildPhase: "icons setup"
Dec 6 12:58:44 turtle[9312] INFO:  Resolving universal modules dependencies
  platform: "android"
  buildPhase: "resolve native modules"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-ads-admob:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-modules-core:0.4.7
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-ads-facebook:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-analytics-amplitude:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-analytics-segment:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-app-auth:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-apple-authentication:4.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-application:4.0.0
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-av:10.1.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-background-fetch:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-task-manager:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding unimodules-app-loader:3.0.0
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding unimodules-task-manager-interface:7.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-barcode-scanner:11.1.2
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-image-loader:3.0.0
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-battery:6.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-blur:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-brightness:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-calendar:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-camera:12.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-cellular:4.0.0
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-clipboard:2.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-constants:12.1.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-contacts:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-crypto:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-device:4.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-document-picker:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-error-recovery:3.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-face-detector:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-facebook:12.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-file-system:13.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-firebase-analytics:5.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-firebase-core:4.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-font:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-gl:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-gl-cpp:11.0.1
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-google-sign-in:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-haptics:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-image-manipulator:10.1.2
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-image-picker:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-in-app-purchases:12.0.0
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-intent-launcher:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-json-utils:0.2.0
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-keep-awake:10.0.0
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-linear-gradient:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-local-authentication:12.0.1
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-localization:11.0.0
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-location:13.0.4
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-mail-composer:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-manifests:0.2.2
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-media-library:13.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-module-template:10.0.0
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-network:4.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-notifications:0.13.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-permissions:13.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-print:11.0.4
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-screen-capture:4.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-screen-orientation:4.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-secure-store:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-sensors:11.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-sharing:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-sms:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-speech:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-splash-screen:0.13.5
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-sqlite:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-store-review:5.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-structured-headers:2.0.0
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-tracking-transparency:2.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-updates:0.10.14
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-updates-interface:0.4.0
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-video-thumbnails:6.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Adding expo-web-browser:10.0.3
  platform: "android"
Dec 6 12:58:44 turtle[9312] INFO:  Using manifest: {"ios":{"icon":"./assets/images/fridge-mobile-app-icon-ios.png","iconUrl":"https://d1wp6m56sqw74a.cloudfront.net/~assets/25e8908ecd39b8ccac8af23733024572","infoPlist":{"NSCameraUsageDescription":"Description"},"supportsTablet":true,"bundleIdentifier":"nl.condimentqueens.mobile","associatedDomains":["applinks:home.intelligentfridges.com"]},"icon":"./assets/images/fridge-mobile-app-icon-ios.png","name":"Condiment Queens","slug":"condiment-queens-fridge-app","scheme":"hif","splash":{"image":"./assets/images/fridge-mobile-app-splash.png","imageUrl":"https://d1wp6m56sqw74a.cloudfront.net/~assets/70461b9820218f76f845bc003e9d95b8","resizeMode":"contain","backgroundColor":"#8E9F44"},"android":{"icon":"./assets/images/fridge-mobile-app-icon-android.png","iconUrl":"https://d1wp6m56sqw74a.cloudfront.net/~assets/b19b2db89e37658b880846cc32ab273b","package":"nl.condimentqueens.mobile","permissions":["CAMERA"],"versionCode":25,"adaptiveIcon":{"backgroundColor":"#8E9F44","foregroundImage":"./assets/images/fridge-mobile-app-icon-foreground.png","foregroundImageUrl":"https://d1wp6m56sqw74a.cloudfront.net/~assets/fe75bdccba4f9eb585378a249a9cb9d2"},"intentFilters":[{"data":{"host":"home.intelligentfridges.com","scheme":"https","pathPrefix":"/api/appforward"},"action":"VIEW","category":["BROWSABLE","DEFAULT"],"autoVerify":true}]},"iconUrl":"https://d1wp6m56sqw74a.cloudfront.net/~assets/25e8908ecd39b8ccac8af23733024572","locales":{},"privacy":"unlisted","updates":{"fallbackToCacheTimeout":0},"version":"1.8.0","platforms":["ios","android"],"sdkVersion":"43.0.0","description":"App to use in combination with the Husky Intelligent Fridge. Open the fridge, set payment options, and manage your purchases.","orientation":"portrait","dependencies":["@expo/vector-icons","@react-native-async-storage/async-storage","@react-native-masked-view/masked-view","@react-navigation/bottom-tabs","@react-navigation/material-bottom-tabs","@react-navigation/native","@react-navigation/native-stack","dayjs","deep-object-diff","expo","expo-app-loading","expo-barcode-scanner","expo-camera","expo-constants","expo-font","expo-linking","expo-permissions","expo-screen-orientation","expo-sharing","global","intl","lodash","promise.allsettled","prop-types","react","react-dom","react-hook-form","react-localize-redux","react-native","react-native-dropdownalert","react-native-easy-markdown","react-native-gesture-handler","react-native-paper","react-native-picker-select","react-native-reanimated","react-native-safe-area-context","react-native-screens","react-native-snap-carousel","react-native-svg","react-native-vector-icons","react-native-view-shot","react-native-web","react-native-webview","react-redux","redux","redux-thunk","styled-components","tinycolor2","validator"],"primaryColor":"#8E9F44","bundledAssets":[],"currentFullName":"xxxx","originalFullName":"xxxxx","id":"xxxxx","projectId":"10316f07-c9b8-4a02-be70-5a878d9c3500","scopeKey":"xxxxx","releaseId":"xxxx","revisionId":"1.8.0-r.AEKtsa3OV","publishedTime":"2021-12-06T11:58:38.822Z","commitTime":"2021-12-06T11:58:38.858Z","bundleUrl":"https://d1wp6m56sqw74a.cloudfront.net/%40aijim%2Fcondiment-queens-fridge-app%2F1.8.0%2F0e21d72c9c264f921c10cc87bd128f16-43.0.0-android.js","bundleKey":"0e21d72c9c264f921c10cc87bd128f16","releaseChannel":"default","hostUri":"exp.host/xxxxx"}
  platform: "android"
  buildPhase: "reading manifest"
Dec 6 12:58:48 turtle[9312] ERROR: Error: ENOENT: no such file or directory, open '/Users/xxxx/.turtle/workingdir/android/sdk43/android-shell-app/expoview/src/main/java/host/exp/exponent/experience/MultipleVersionReactNativeActivity.java'
  platform: "android"
Dec 6 12:58:48 turtle[9312] ERROR: Failed to build standalone app
  err: Error: ENOENT: no such file or directory, open '/Users/xxxx/.turtle/workingdir/android/sdk43/android-shell-app/expoview/src/main/java/host/exp/exponent/experience/MultipleVersionReactNativeActivity.java'
  platform: "android"
✨  Done in 37.56s.

Environment

  Expo CLI 4.13.0 environment info:
    System:
      OS: macOS 11.6
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
      Yarn: 1.22.11 - /usr/local/bin/yarn
      npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
      Watchman: 2021.10.04.00 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.9.3 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
      Android SDK:
        API Levels: 26, 27, 28, 29, 30
        Build Tools: 27.0.3, 28.0.3, 29.0.2
        System Images: android-25 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64
    IDEs:
      Android Studio: 4.1 AI-201.8743.12.41.7199119
      Xcode: 12.4/12D4e - /usr/bin/xcodebuild
    npmPackages:
      expo: ^43.0.0 => 43.0.3 
      react: 17.0.1 => 17.0.1 
      react-dom: 17.0.1 => 17.0.1 
      react-native: 0.64.3 => 0.64.3 
      react-native-web: 0.17.1 => 0.17.1 
    npmGlobalPackages:
      expo-cli: 4.13.0
    Expo Workflow: managed

wkozyra95 commented 2 years ago

does the file from error message exists ? /Users/xxxx/.turtle/workingdir/android/sdk43/android-shell-app/expoview/src/main/java/host/exp/exponent/experience/MultipleVersionReactNativeActivity.java

also check if /Users/xxxx/.turtle/workingdir/android/sdk43/android/expoview/src/main/java/host/exp/exponent/experience/MultipleVersionReactNativeActivity.java exists

Most likely there was some issue during download and some of the files are missing, delete entire .turtle directory and try again

JimVanEeden commented 2 years ago

Thank you for your help. Here's what's in the folders:

➜  ~ ls .turtle/workingdir/android/sdk43/android-shell-app/expoview/src/main/java/host/exp/exponent/experience/
BaseExperienceActivity.kt            DevBundleDownloadProgressListener.kt ErrorFragment.kt                     HomeActivity.kt                      loading
DetachActivity.kt                    ErrorActivity.kt                     ErrorQueueAdapter.kt                 ReactNativeActivity.kt               splashscreen
DetachedModuleRegistryAdapter.kt     ErrorConsoleFragment.kt              ExperienceActivity.kt                TvActivity.kt
➜  ~ ls .turtle/workingdir/android/sdk43/android/expoview/src/main/java/host/exp/exponent/experience
BaseExperienceActivity.kt            DevBundleDownloadProgressListener.kt ErrorFragment.kt                     HomeActivity.kt                      loading
DetachActivity.kt                    ErrorActivity.kt                     ErrorQueueAdapter.kt                 ReactNativeActivity.kt               splashscreen
DetachedModuleRegistryAdapter.kt     ErrorConsoleFragment.kt              ExperienceActivity.kt                TvActivity.kt

I've deleted the ~/.turtle folder twice and tried to reinstall both with turtle setup:android --sdk-version 43.0.0 and turtle build:android, but the same result unfortunately. File is still missing.

JimVanEeden commented 2 years ago

It seems turtle is trying to call some file that doesn't exist (anymore) in SDK43. This is what's in the expo repo as well:

https://github.com/expo/expo/tree/master/android/expoview/src/main/java/host/exp/exponent/experience

wkozyra95 commented 2 years ago

I can't reproduce that, few things you might check:

JimVanEeden commented 2 years ago

I just updated turtle-cli to 0.23.6 (released yesterday), from 0.23.5. Now everything seems to work again. Unsure what the problem was in the end, but closing the issue. Thank you for your help.