expo / sentry-expo

MIT License
202 stars 83 forks source link

Build error on Android with EAS and Expo SDK 46 #274

Closed outaTiME closed 2 years ago

outaTiME commented 2 years ago

Summary

I just migrated my project to Expo SDK 46 and the EAS build fails only on Android. I don't know if it will be some problem with auto-linking in react-native 0.69 as mentioned in the Sentry documentation:

https://docs.sentry.io/platforms/react-native/troubleshooting/#react-native-069-and-higher

Here I attach part of the gradlew log (collapsed):

Click to expand! ``` [stderr] warn Package @sentry/react-native contains invalid configuration: "dependency.platforms.ios.sharedLibraries" is not allowed,"dependency.hooks" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this. 1919 warning: the transform cache was reset. 1920 Welcome to Metro! 1921 Fast - Scalable - Integrated 1922 info Writing bundle output to:, /home/expo/workingdir/build/packages/client/android/app/build/generated/assets/react/release/index.android.bundle 1923 info Writing sourcemap output to:, /home/expo/workingdir/build/packages/client/android/app/build/intermediates/sourcemaps/react/release/index.android.bundle.packager.map 1924 info Done writing bundle output 1925 info Done writing sourcemap output 1926 info Copying 24 asset files 1927 info Done copying assets 1928 > Task :app:bundleReleaseJsAndAssets FAILED 1929 w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions 1930 Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. 1931 You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. 1932 See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings 1933 944 actionable tasks: 944 executed 1934 Unable to list file systems to check whether they can be watched. The whole state of the virtual file system has been discarded. Reason: Could not query file systems: could not open mount file (errno 2: No such file or directory) 1935 [stderr] FAILURE: Build failed with an exception. 1936 [stderr] * Where: 1937 [stderr] Script '/home/expo/workingdir/build/node_modules/react-native/react.gradle' line: 126 1938 [stderr] * What went wrong: 1939 [stderr] Execution failed for task ':app:bundleReleaseJsAndAssets'. 1940 [stderr] > java.lang.Exception: Couldn't determine Hermesc location. Please set `project.ext.react.hermesCommand` to the path of the hermesc binary file. node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc 1941 [stderr] * Try: 1942 [stderr] > Run with --stacktrace option to get the stack trace. 1943 [stderr] > Run with --info or --debug option to get more log output. 1944 [stderr] > Run with --scan to get full insights. 1945 [stderr] * Get more help at https://help.gradle.org 1946 [stderr] BUILD FAILED in 13m 48s 1947 Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase. ```

Additionally, the link to the compilation:

https://expo.dev/accounts/outatime/projects/ambito-dolar/builds/91126381-4912-4e6d-9a89-1f17f865dd08

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)

46

Environment

expo-env-info 1.0.5 environment info: System: OS: macOS 12.5 Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.16.0 - /private/var/folders/qv/x2xgwlnj1qb2wjnthh5bp_600000gn/T/xfs-70a020d7/node Yarn: 3.2.2 - /private/var/folders/qv/x2xgwlnj1qb2wjnthh5bp_600000gn/T/xfs-70a020d7/yarn npm: 8.15.1 - ~/.nvm/versions/node/v16.16.0/bin/npm Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8193401 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild npmGlobalPackages: eas-cli: 0.56.0 expo-cli: 6.0.1 Expo Workflow: managed

brentvatne commented 2 years ago

the actual build failure appears to come from here:

[stderr] 
Execution failed for task ':app:bundleReleaseJsAndAssets'.
1940
[stderr] 
> java.lang.Exception: Couldn't determine Hermesc location. Please set `project.ext.react.hermesCommand` to the path of the hermesc binary file. node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc
outaTiME commented 2 years ago

Thanks @brentvatne, I'll answer you on discord 🙌

AdamDiament commented 2 years ago

@outaTiME what was the issue here? I think I may have the same problem. Could you post the answer here instead of just on discord please?

brentvatne commented 2 years ago

@AdamDiament - make sure you're using the latest expo package version - expo@46.0.7

pors commented 1 year ago

I also have this error and I do have expo@46.0.7

My env:

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 12.0.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.0.0 - ~/.nvm/versions/node/v16.0.0/bin/node
      Yarn: 1.22.19 - ~/.yarn/bin/yarn
      npm: 8.2.0 - ~/.nvm/versions/node/v16.0.0/bin/npm
      Watchman: 4.9.0 - /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 85
    IDEs:
      Android Studio: 2021.1 AI-211.7628.21.2111.8193401
      Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
    npmPackages:
      @expo/webpack-config: ^0.17.2 => 0.17.2
      babel-preset-expo: ~9.2.0 => 9.2.0
      expo: ^46.0.16 => 46.0.16
      react: ~18.0.0 => 18.0.0
      react-dom: ~18.0.0 => 18.0.0
      react-native: 0.69.6 => 0.69.6
      react-native-web: ~0.18.0 => 0.18.9
    npmGlobalPackages:
      eas-cli: 2.1.0
      expo-cli: 6.0.5
    Expo Workflow: managed