Bubblewrap CLI throws "ERROR spawn jarsigner ENOENT"

204 views Asked by At

I am trying to make an initial build of a PWA (Progressive Web App) that is vanilla JS/HTML/CSS using using TWA (Trusted Web Activity) and Bubblewrap, but get the message cli ERROR spawn jarsigner ENOENT

The $ bubblewrap init --manifest=https://my-pwa.com/manifest.json step was seemingly successful.

However, when I go to build the project I get the following:

$ bubblewrap build
,-----.        ,--.  ,--.  ,--.
|  |) /_,--.,--|  |-.|  |-.|  |,---.,--.   ,--,--.--.,--,--.,---.
|  .-.  |  ||  | .-. | .-. |  | .-. |  |.'.|  |  .--' ,-.  | .-. |
|  '--' '  ''  | `-' | `-' |  \   --|   .'.   |  |  \ '-'  | '-' '
`------' `----' `---' `---'`--'`----'--'   '--`--'   `--`--|  |-'
                                                           `--'    
Please, enter passwords for the keystore /home/my-user/AndroidStudioProjects/android.keystore and alias android.

? Password for the Key Store: ***************
? Password for the Key: ***************

Building the Android App...
    - Generated Android APK at ./app-release-signed.apk


cli ERROR spawn jarsigner ENOENT

Further context:

$ bubblewrap doctor
doctor Your jdkpath and androidSdkPath are valid.

$ node -v
v19.3.0

$ printf "%s\n" $PATH
/home/my-user/.local/share/nvm/v19.3.0/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/snap/bin
/snap/bin

$cat ~/.bubblewrap/config.json
{"jdkPath":"/usr/lib/jvm/default-java/","androidSdkPath":"/home/my-user/Android/Sdk/"}

Answers or any clues on where to investigate next appreciated, thanks.

1

There are 1 answers

0
Edward Moffett On

My issue was resolved by putting a copy of OpenJDK 11 within my home directory and updating the jdkPath in /home/my-user/.bubblewrap/config.json with its location: {"jdkPath":"/home/my-user/Android/jdk-11.0.17+8","androidSdkPath":"/home/my-user/Android/Sdk/"}