Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Build:android gradle dependency failure trying to export .apk package #142

Closed
Cawllec opened this issue Sep 24, 2019 · 6 comments
Closed
Assignees
Labels
bug Something isn't working needs more info To be used when awaiting reporter response

Comments

@Cawllec
Copy link

Cawllec commented Sep 24, 2019

Issue Description

When attempting to output a .apk package for the expo app locally using turtle, the build fails with a gradle error relating to failing to acquire a crashlytics package.

We've previously pinned the turtle version to 0.11.1, which has been stable in the past.

Command executed
EXPO_ANDROID_KEYSTORE_PASSWORD=*** \
EXPO_ANDROID_KEY_PASSWORD=*** \
node_modules/.bin/turtle build:android \
--keystore-path ***.jks \
--keystore-alias *** \
--output /app/test/expo/features/fixtures/build/output.apk \
--release-channel $EXPO_RELEASE_CHANNEL \
--type apk
Complete output when running turtle, including the stack trace and command used
 
Sep 24 09:39:22 turtle[6] INFO:  > Task :app:preReleaseBuild FAILED
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stdout"
  | Sep 24 09:39:22 turtle[6] INFO:  FAILURE: Build failed with an exception.
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:  * What went wrong:
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:  Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:  > Could not resolve com.crashlytics.sdk.android:beta:1.1.4.
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:    Required by:
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:        project :app > host.exp.exponent:expoview:34.0.0 > com.crashlytics.sdk.android:crashlytics:2.5.5
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:     > Could not resolve com.crashlytics.sdk.android:beta:1.1.4.
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:        > Could not get resource 'https://jitpack.io/com/crashlytics/sdk/android/beta/1.1.4/beta-1.1.4.pom'.
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:           > Could not GET 'https://jitpack.io/com/crashlytics/sdk/android/beta/1.1.4/beta-1.1.4.pom'. Received status code 522 from server: Origin Connection Time-out
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:  * Try:
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:  * Get more help at https://help.gradle.org
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
  | Sep 24 09:39:22 turtle[6] INFO:  BUILD FAILED in 2m 52s
  | platform: "android"
  | buildPhase: "running gradle"
  | source: "stderr"
 

Environment

I'm unable to build our expo environment outside of our CI due to the issue mentioned here: #139 . This issue is also referenced by the OP in that post.

@Cawllec Cawllec added the bug Something isn't working label Sep 24, 2019
@kavofa
Copy link

kavofa commented Sep 25, 2019

Any updates?

@empleh
Copy link

empleh commented Oct 2, 2019

We are running our builds in Azure DevOps. We were seeing this error when running on a Mac build server, but when we switched our build server over to Linux it worked without this error.

@kavofa
Copy link

kavofa commented Oct 2, 2019

@empleh could you share your yaml for Azure DevOps Pipelines? I just can’t get it to work on my CI.

@empleh
Copy link

empleh commented Oct 2, 2019

@empleh could you share your yaml for Azure DevOps Pipelines? I just can’t get it to work on my CI.

Hopefully this helps:

Job 1 runs on Mac OSX 10.14 and publishes expo and build iOS
Then Job 2 runs on Linux Ubuntu 16.04 and does the android build

pool:
name: Azure Pipelines
demands:

  • yarn
  • npm
  • xcode
    variables:
    source.path: ''
    steps:
  • task: NodeTool@0
    displayName: 'Use Node 12.11.x'
    inputs:
    versionSpec: 12.11.x
  • task: Npm@1
    displayName: 'Npm global install expo-cli'
    inputs:
    command: custom
    workingDir: '$(source.path)'
    verbose: false
    customCommand: 'i -g expo-cli@$(ExpoCliVersion)'
  • task: Npm@1
    displayName: 'npm install'
    inputs:
    workingDir: '$(source.path)'
    verbose: false
  • bash: |
    expo login -u $(EXPO_USERNAME) -p $(EXPO_PASSWORD)
    workingDirectory: '$(source.path)'
    displayName: 'Login to Expo'
    env:
    EXPO_DEBUG: true
  • task: Npm@1
    displayName: 'Npm global install turtle-cli'
    inputs:
    command: custom
    workingDir: '$(source.path)'
    verbose: false
    customCommand: 'i -g turtle-cli@$(TurtleCliVersion)'
  • bash: |
    turtle setup:ios
    displayName: 'Verify turtle-cli setup'
  • bash: |
    #!/bin/bash
    sudo chown -R $(whoami):staff ~/Library/LaunchAgents
    displayName: 'Edit permissions on LaunchAgents'
  • bash: |
    echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
    sysctl --system
    expo publish --release-channel $(RELEASE_CHANNEL) --non-interactive
    workingDirectory: '$(source.path)'
    displayName: 'Expo publish'
    timeoutInMinutes: 15
  • bash: |
    expo fetch:ios:certs
    turtle build:ios -u $(EXPO_USERNAME) -p $(EXPO_PASSWORD) --team-id $(APPLE_TEAM_ID) --dist-p12-path $(P12_PATH) --provisioning-profile-path $(PROVISIONING_PATH) --release-channel $(RELEASE_CHANNEL)
    workingDirectory: '$(source.path)'
    displayName: 'Turtle build ios'
    timeoutInMinutes: 10
    env:
    APPSTORE_USERNAME: $(APPSTORE_USERNAME)
    EXPO_APPLE_PASSWORD: $(APPSTORE_PASSWORD)
    EXPO_IOS_DIST_P12_PASSWORD: $(EXPO_IOS_DIST_P12_PASSWORD)
  • task: ms-vsclient.app-store.app-store-release.AppStoreRelease@1
    displayName: 'Publish to the App Store TestFlight track'
    inputs:
    serviceEndpoint: 'Apple App'
    appIdentifier: $(APP_IDENTIFIER)
    ipaPath: '$(source.path)/Users/vsts/expo-apps/**/*.ipa'
    releaseNotes: README.md
    shouldSkipWaitingForProcessing: true

dependsOn: Job_1
pool:
name: Azure Pipelines
demands:

  • yarn
  • npm
    variables:
    source.path: ''
    steps:
  • task: NodeTool@0
    displayName: 'Use Node 12.11.x'
    inputs:
    versionSpec: 12.11.x
  • task: Npm@1
    displayName: 'Npm global install expo-cli'
    inputs:
    command: custom
    workingDir: '$(source.path)'
    verbose: false
    customCommand: 'i -g expo-cli@$(ExpoCliVersion)'
  • task: Npm@1
    displayName: 'npm install'
    inputs:
    workingDir: '$(source.path)'
    verbose: false
  • bash: |
    expo login -u $(EXPO_USERNAME) -p $(EXPO_PASSWORD)
    workingDirectory: '$(source.path)'
    displayName: 'Login to Expo'
    env:
    EXPO_DEBUG: true
  • task: Npm@1
    displayName: 'Npm global install turtle-cli'
    inputs:
    command: custom
    workingDir: '$(source.path)'
    verbose: false
    customCommand: 'i -g turtle-cli@$(TurtleCliVersion)'
  • bash: |
    turtle setup:android
    displayName: 'Verify turtle-cli setup'
  • bash: |
    expo fetch:android:keystore
    turtle build:android -t apk -u $(EXPO_USERNAME) -p $(EXPO_PASSWORD) --keystore-path $(KEY_PATH) --keystore-alias $(ANDROID_KEY_ALIAS) --release-channel $(RELEASE_CHANNEL)
    workingDirectory: '$(source.path)'
    displayName: 'Turtle build android'
    env:
    EXPO_ANDROID_KEYSTORE_PASSWORD: $(ANDROID_KEYSTORE_PASSWORD)
    EXPO_ANDROID_KEY_PASSWORD: $(ANDROID_KEY_PASSWORD)
  • task: DownloadSecureFile@1
    displayName: 'Download Google Play Store api auth'
    inputs:
    secureFile: $(API_AUTH_FILE)
  • task: ms-vsclient.google-play.google-play-release.GooglePlayRelease@3
    displayName: 'Release Android to internal'
    inputs:
    authType: JsonFile
    serviceAccountKey: '$(PLAY_STORE_API.secureFilePath)'
    apkFile: '$(source.path)/home/vsts/expo-apps/**/*.apk'

@dsokal
Copy link
Contributor

dsokal commented Oct 25, 2019

It looks like a transient error to me.
@Cawllec are you still experiencing this issue?

@dsokal dsokal added the needs more info To be used when awaiting reporter response label Oct 25, 2019
@dsokal dsokal self-assigned this Oct 25, 2019
@Cawllec
Copy link
Author

Cawllec commented Oct 25, 2019

It appears to be working correctly now, and similar Jitpack issues have been resolved elsewhere.

@Cawllec Cawllec closed this as completed Oct 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working needs more info To be used when awaiting reporter response
Projects
None yet
Development

No branches or pull requests

4 participants