Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

##[error]Error saving asset #29

Open
Trogious opened this issue Feb 16, 2020 · 5 comments
Open

##[error]Error saving asset #29

Trogious opened this issue Feb 16, 2020 · 5 comments

Comments

@Trogious
Copy link

I'm getting the following error while executing this actions (tried with both v1 and v1.0.1, today):

##[error]Error saving asset
##[error]Node run failed with exit code 1

I did run this multiple times and always I'm getting the same issue.

My build file:

name: Build App

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build with Gradle
      env:
        RTR_WSS_PORT: 8765
        RTR_APKSIGN_PASS: ${{secrets.RTR_APKSIGN_PASS}}
      run: |
        ./gradlew build bundleRelease
        du -shc `find . -regex '.+\.\(apk\|aab\)$'`
    - name: Prepare Release
      id: prepare_release
      if: contains(github.ref, 'tags/')
      run: |
        TAG_NAME=`echo $GITHUB_REF | cut -d / -f3`
        echo ::set-output name=tag_name::$TAG_NAME

        APK_PATH=`find . -name '*.apk' | grep release`
        echo ::set-output name=apk_path::$APK_PATH
        APK_NAME=`basename $APK_PATH`
        echo ::set-output name=apk_name::$APK_NAME

        BUNDLE_PATH=`find . -name '*.aab' | grep release | grep -v intermediates`
        echo ::set-output name=bundle_path::$BUNDLE_PATH
        BUNDLE_NAME=`basename $BUNDLE_PATH`
        echo ::set-output name=bundle_name::$BUNDLE_NAME

        PACKAGE_NAME=`./tools/aapt2 dump packagename $APK_PATH`
        echo ::set-output name=package_name::$PACKAGE_NAME
    - name: Create Release
      id: create_release
      if: steps.prepare_release.outputs.tag_name
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
      with:
        tag_name: ${{steps.prepare_release.outputs.tag_name}}
        release_name: Release ${{steps.prepare_release.outputs.tag_name}}
        draft: false
        prerelease: false
    - name: Upload APK Asset
      if: steps.create_release.outputs.upload_url && steps.prepare_release.outputs.apk_path && steps.prepare_release.outputs.apk_name
      uses: actions/upload-release-asset@v1
      env:
        GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
      with:
        upload_url: ${{steps.create_release.outputs.upload_url}}
        asset_path: ${{steps.prepare_release.outputs.apk_path}}
        asset_name: ${{steps.prepare_release.outputs.apk_name}}
        asset_content_type: application/vnd.android.package-archive
    - name: Upload Bundle Asset
      if: steps.create_release.outputs.upload_url && steps.prepare_release.outputs.bundle_path && steps.prepare_release.outputs.bundle_name
      uses: actions/upload-release-asset@v1
      env:
        GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
      with:
        upload_url: ${{steps.create_release.outputs.upload_url}}
        asset_path: ${{steps.prepare_release.outputs.bundle_path}}
        asset_name: ${{steps.prepare_release.outputs.bundle_name}}
        asset_content_type: application/octet-stream

The workflow always fails at the Upload APK Asset step, with the message I posted on top. The previous one executes correctly (and I can see a release created on github website).

PS: this has been working for me previously. It correctly uploaded an earlier release of mine on Feb 4th.

@Trogious
Copy link
Author

Funny thing. Just re-run it and it works. Might be an issue on the upload endpoint side.

@EverlastingBugstopper
Copy link

Just ran into this - thanks for filing the issue @Trogious

@rhyst
Copy link

rhyst commented Feb 18, 2020

I switched to https://github.com/marvinpinto/action-automatic-releases which seems to work consistently.

@phact
Copy link

phact commented Feb 25, 2020

Hitting this too with v1

@id77
Copy link

id77 commented Mar 1, 2020

me too,But I use this svenstaro/upload-release-action#9

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants