Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path argument must be string #48

Open
xcarlitos opened this issue Jul 21, 2021 · 5 comments
Open

Path argument must be string #48

xcarlitos opened this issue Jul 21, 2021 · 5 comments

Comments

@xcarlitos
Copy link

xcarlitos commented Jul 21, 2021

When I try to run this GitHub-Action I get following Error/Logs:

Run r0adkll/sign-android-release@v1
Preparing to sign key @ app/build/outputs/apk/release with signing key
Error: The "path" argument must be of type string. Received type undefined

What is the point here?
My workflow is configured like that:

- name: Checkout Repo
         uses: actions/checkout@v2
         with:
           fetch-depth: 0
- name: Generate Release APK
         run: ./gradlew assembleRelease
- name: Sign APK
         uses: r0adkll/sign-android-release@v1
         # ID used to access action output
         id: sign_app
         with:
           releaseDirectory: app/build/outputs/apk/release
           signingKeyBase64: ${{ secrets.SIGNING_KEY }}
           alias: ${{ secrets.SIGNING_ALIAS }}
           keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
           keyPassword: ${{ secrets.KEY_PASSWORD }}
@MY23
Copy link

MY23 commented Sep 9, 2021

Hey guys,
i have the same problem but i only encounter this issue when I try to run the workflow on a self-hosted node.
can anyone help ?

@rafal1137
Copy link

I having same issue with it but I am not using self-hosted node.

@cirion
Copy link

cirion commented Oct 13, 2021

I ran into this too. My action was working fine, then I moved to another self-hosted runner without any code changes and started seeing the following error:

Run r0adkll/sign-android-release@v1
Preparing to sign key @ app/build/outputs/apk/release with signing key
Found 1 release files.
Error: The "path" argument must be of type string. Received type undefined

After some digging, the problem turned out to be that I didn't have the environment variable ANDROID_HOME globally defined on my new runner. I then defined it in my .yml file and set it to the right path (in my case /usr/local/share/android-sdk) and it started working again.

@MY23
Copy link

MY23 commented Oct 25, 2021

Hey guys, I have the same problem but i only encounter this issue when I try to run the workflow on a self-hosted node. can anyone help?

I fixed my problem using env variables adding ANDROID_HOME like this :

 - name: Sign APK with keystore
        uses: r0adkll/sign-android-release@v1
        id: sign_app
        with:
          releaseDirectory: app/build/outputs/apk/dev/release
          signingKeyBase64: ${{ secrets.SIGNING_KEY_BASE64 }}
          alias: ${{ secrets.ALIAS }}
          keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
          keyPassword: ${{ secrets.KEY_PASSWORD }}
        env:
          ANDROID_HOME: $HOME/Android/Sdk

@filippoLeporati93
Copy link

Hi @MY23 @cirion @rafal1137 @xcarlitos I have created a new repo trying to maintain the project, based on this solution.

My solution is based on Node.js 20.9 and I solved also this issue. Now it raises an error if ANDROID_HOME is missing, I remove the non-null assertion operator and checking if null.

https://github.com/filippoLeporati93/android-release-signer

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

No branches or pull requests

5 participants