GoogleChromeLabs / GoogleChromeLabs/bubblewrap

Specify Signingkey in twa-manifest.json with relative path url

Open
#666 2 comments 3 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
TypeScript
Stars
3.1k
Forks
319
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
I moved the folder with my bubblewrap project and tried to rebuild. It failed with:
```
Failed to load signer "signer #1"
java.io.FileNotFoundException: /home/user/Downloads/nicohood-pwa/android.keystore (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
at java.base/java.io.FileInputStream.(FileInputStream.java:157)
at java.base/java.io.FileInputStream.(FileInputStream.java:112)
at com.android.apksigner.SignerParams.loadKeyStoreFromFile(SignerParams.java:352)
at com.android.apksigner.SignerParams.loadPrivateKeyAndCertsFromKeyStore(SignerParams.java:239)
at com.android.apksigner.SignerParams.loadPrivateKeyAndCerts(SignerParams.java:181)
at com.android.apksigner.ApkSignerTool.getSignerConfig(ApkSignerTool.java:395)
at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:316)
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:88)
```

**Describe the solution you'd like**
Setting a relative path could solve this. Since the key is generated by the application itself into the same folder, a relative path makes more sense here.

**Describe alternatives you've considered**
Manually edit the twa-manifest.json:
```json
"signingKey": {
"path": "android.keystore",
"alias": "nicohood"
},
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.