bubblewrap icon indicating copy to clipboard operation
bubblewrap copied to clipboard

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

Open NicoHood opened this issue 3 years ago • 2 comments

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.<init>(FileInputStream.java:157)
	at java.base/java.io.FileInputStream.<init>(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:

  "signingKey": {
    "path": "android.keystore",
    "alias": "nicohood"
  },

NicoHood avatar Mar 26 '22 20:03 NicoHood

Sounds like a fair request, and a good first issue. I don't think this will be a priority for now, but happy to guide anyone looking into implementing.

andreban avatar Apr 23 '22 08:04 andreban

Any chance this has been done, like in a different PR? I think it'll be necessary to let multiple devs share the same twa-manifest.json and keystore files.

dpkirchner avatar Jan 31 '23 17:01 dpkirchner