expo / eas-cli

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

Integrity hash mismatches when downloading sharp-libvips package in expo/eas deployment pipeline #1853

Open ladyshaitan opened 1 year ago

ladyshaitan commented 1 year ago

Build/Submit details page URL

https://expo.dev/accounts/rithmm/projects/rithmm-mobile/builds/83841b26-0738-4c10-832b-4956d99e831e

Summary

I'm consistently getting this integrity mismatch error when attempting to deploy an android build in the expo / eas development managed workflow.

Screenshot 2023-05-20 at 11 35 22 AM

Output of npm why sharp

sharp@0.32.1 dev
node_modules/appium-uiautomator2-driver/node_modules/sharp
  sharp@"^0.x" from appium-android-driver@5.12.1
  node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver
    appium-android-driver@"^5.12.1" from appium-uiautomator2-driver@2.24.1
    node_modules/appium-uiautomator2-driver
      dev appium-uiautomator2-driver@"^2.12.7" from the root project

sharp@0.32.1 extraneous
node_modules/appium-xcuitest-driver/node_modules/sharp

sharp@0.32.1 dev
node_modules/sharp
  sharp@"0.32.1" from @appium/support@4.0.1
  node_modules/@appium/support
    @appium/support@"^4.0.1" from @appium/base-driver@9.3.10
    node_modules/@appium/base-driver
      @appium/base-driver@"^9.3.10" from @appium/base-plugin@2.2.10
      node_modules/@appium/base-plugin
        @appium/base-plugin@"^2.2.10" from appium@2.0.0-beta.71
        node_modules/appium
          dev appium@"^2.0.0-beta.57" from the root project
          peer appium@"^2.0.0-beta.48" from @appium/typedoc-plugin-appium@0.6.4
          node_modules/@appium/typedoc-plugin-appium
            @appium/typedoc-plugin-appium@"^0.6.4" from @appium/docutils@0.3.13
            node_modules/@appium/docutils
              @appium/docutils@"^0.3.13" from appium@2.0.0-beta.71
          peer appium@"^2.0.0-beta.40" from appium-uiautomator2-driver@2.24.1
          node_modules/appium-uiautomator2-driver
            dev appium-uiautomator2-driver@"^2.12.7" from the root project
          peer appium@"^2.0.0-beta.48" from @appium/typedoc-plugin-appium@0.6.3
          node_modules/appium-uiautomator2-driver/node_modules/@appium/typedoc-plugin-appium
            @appium/typedoc-plugin-appium@"^0.6.3" from @appium/docutils@0.3.9
            node_modules/appium-uiautomator2-driver/node_modules/@appium/docutils
          peer appium@"^2.0.0-beta.40" from appium-android-driver@5.12.1
          node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver
            appium-android-driver@"^5.12.1" from appium-uiautomator2-driver@2.24.1
            node_modules/appium-uiautomator2-driver
              dev appium-uiautomator2-driver@"^2.12.7" from the root project
      @appium/base-driver@"^9.3.10" from appium@2.0.0-beta.71
      node_modules/appium
        dev appium@"^2.0.0-beta.57" from the root project
        peer appium@"^2.0.0-beta.48" from @appium/typedoc-plugin-appium@0.6.4
        node_modules/@appium/typedoc-plugin-appium
          @appium/typedoc-plugin-appium@"^0.6.4" from @appium/docutils@0.3.13
          node_modules/@appium/docutils
            @appium/docutils@"^0.3.13" from appium@2.0.0-beta.71
        peer appium@"^2.0.0-beta.40" from appium-uiautomator2-driver@2.24.1
        node_modules/appium-uiautomator2-driver
          dev appium-uiautomator2-driver@"^2.12.7" from the root project
        peer appium@"^2.0.0-beta.48" from @appium/typedoc-plugin-appium@0.6.3
        node_modules/appium-uiautomator2-driver/node_modules/@appium/typedoc-plugin-appium
          @appium/typedoc-plugin-appium@"^0.6.3" from @appium/docutils@0.3.9
          node_modules/appium-uiautomator2-driver/node_modules/@appium/docutils
        peer appium@"^2.0.0-beta.40" from appium-android-driver@5.12.1
        node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver
          appium-android-driver@"^5.12.1" from appium-uiautomator2-driver@2.24.1
          node_modules/appium-uiautomator2-driver
            dev appium-uiautomator2-driver@"^2.12.7" from the root project
    @appium/support@"^4.0.1" from @appium/base-plugin@2.2.10
    node_modules/@appium/base-plugin
      @appium/base-plugin@"^2.2.10" from appium@2.0.0-beta.71
      node_modules/appium
        dev appium@"^2.0.0-beta.57" from the root project
        peer appium@"^2.0.0-beta.48" from @appium/typedoc-plugin-appium@0.6.4
        node_modules/@appium/typedoc-plugin-appium
          @appium/typedoc-plugin-appium@"^0.6.4" from @appium/docutils@0.3.13
          node_modules/@appium/docutils
            @appium/docutils@"^0.3.13" from appium@2.0.0-beta.71
        peer appium@"^2.0.0-beta.40" from appium-uiautomator2-driver@2.24.1
        node_modules/appium-uiautomator2-driver
          dev appium-uiautomator2-driver@"^2.12.7" from the root project
        peer appium@"^2.0.0-beta.48" from @appium/typedoc-plugin-appium@0.6.3
        node_modules/appium-uiautomator2-driver/node_modules/@appium/typedoc-plugin-appium
          @appium/typedoc-plugin-appium@"^0.6.3" from @appium/docutils@0.3.9
          node_modules/appium-uiautomator2-driver/node_modules/@appium/docutils
        peer appium@"^2.0.0-beta.40" from appium-android-driver@5.12.1
        node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver
          appium-android-driver@"^5.12.1" from appium-uiautomator2-driver@2.24.1
          node_modules/appium-uiautomator2-driver
            dev appium-uiautomator2-driver@"^2.12.7" from the root project
    @appium/support@"^4.0.1" from @appium/docutils@0.3.13
    node_modules/@appium/docutils
      @appium/docutils@"^0.3.13" from appium@2.0.0-beta.71
    @appium/support@"^4.0.1" from appium@2.0.0-beta.71
    node_modules/appium
      dev appium@"^2.0.0-beta.57" from the root project
      peer appium@"^2.0.0-beta.48" from @appium/typedoc-plugin-appium@0.6.4
      node_modules/@appium/typedoc-plugin-appium
        @appium/typedoc-plugin-appium@"^0.6.4" from @appium/docutils@0.3.13
        node_modules/@appium/docutils
          @appium/docutils@"^0.3.13" from appium@2.0.0-beta.71
      peer appium@"^2.0.0-beta.40" from appium-uiautomator2-driver@2.24.1
      node_modules/appium-uiautomator2-driver
        dev appium-uiautomator2-driver@"^2.12.7" from the root project
      peer appium@"^2.0.0-beta.48" from @appium/typedoc-plugin-appium@0.6.3
      node_modules/appium-uiautomator2-driver/node_modules/@appium/typedoc-plugin-appium
        @appium/typedoc-plugin-appium@"^0.6.3" from @appium/docutils@0.3.9
        node_modules/appium-uiautomator2-driver/node_modules/@appium/docutils
      peer appium@"^2.0.0-beta.40" from appium-android-driver@5.12.1
      node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver
        appium-android-driver@"^5.12.1" from appium-uiautomator2-driver@2.24.1
        node_modules/appium-uiautomator2-driver
          dev appium-uiautomator2-driver@"^2.12.7" from the root project

Output of npm why sharp-libvips:

Screenshot 2023-05-20 at 11 52 21 AM

Why would this error consistently occur in my android build but not my ios build? Do I have control over whether the checksums match? I contacted the authors of sharp-libvips and just said it had to be some kind of connection issue, but that the sha512 hash returned means zero file length, so that's a clue.

https://github.com/lovell/sharp-libvips/issues/183#issuecomment-1555984111 https://github.com/lovell/sharp-libvips/issues/183#issuecomment-1556148423

What I've tried:

Managed or bare?

bare

Environment

expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.3.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
      Yarn: 1.22.19 - /opt/homebrew/bin/yarn
      npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
      Watchman: 2023.01.30.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.2 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
      Android SDK:
        API Levels: 28, 31, 33
        Build Tools: 30.0.3, 33.0.0
        System Images: android-33 | Google APIs ARM 64 v8a, android-UpsideDownCake-ext5 | Google Play ARM 64 v8a
    IDEs:
      Android Studio: 2022.1 AI-221.6008.13.2211.9619390
      Xcode: 14.3/14E222b - /usr/bin/xcodebuild
    npmPackages:
      @expo/metro-config: ^0.3.22 => 0.3.22
      expo: ~48.0.15 => 48.0.17
      react: 18.2.0 => 18.2.0
      react-dom: 18.2.0 => 18.2.0
      react-native: 0.71.8 => 0.71.8
      react-native-web: ~0.18.7 => 0.18.12
    npmGlobalPackages:
      eas-cli: 3.9.0
    Expo Workflow: bare

Error output

[stderr] 
npm ERR! path /home/expo/workingdir/build/node_modules/sharp
[stderr] 
npm ERR! command failed
[stderr] 
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
[stderr] 
npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.2/libvips-8.14.2-linux-x64.tar.br
[stderr] 
npm ERR! sharp: Integrity expected: sha512-wjCKmWfBb0uz1UB7rPDLvO0s+VWuoAY/Vv/YGCRFEQUkdSLQUgHExrOMMbOM3FleuYfQqznDYCXXphkl7X44+w==
[stderr] 
npm ERR! sharp: Integrity received: sha512-tGlsuQf/hwneexwpCLWr93OYIWh6b4cyVZ4sQuuuKE7qJ6SdLbU+ryJUYW0O8rtDeW7h/V2dBxrSsguWbgaNfA==
[stderr] 
npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
[stderr] 
npm ERR! sharp: Installation error: Integrity check failed for linux-x64
[stderr] 
npm ERR! A complete log of this run can be found in:
[stderr] 
npm ERR!
[stderr] 
/home/expo/.npm/_logs/2023-05-22T17_20_34_291Z-debug-0.log

Reproducible demo or steps to reproduce from a blank project

n/a

jbreemhaar commented 1 year ago

Same problem here, weird part here is that it's not happening every Android build but more times than it being coincidentally. It does not happen on iOS builds.

MarcK98 commented 2 months ago

getting this error, were you able to solve it?