ReVanced / revanced-cli

💻 Command-line application to use ReVanced
https://revanced.app
GNU General Public License v3.0
1.07k stars 168 forks source link

bug: IOException #170

Closed aegires closed 1 year ago

aegires commented 1 year ago

Type

Error at runtime

Bug description

I run cli and on signing process get exception: org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$BCKeyStoreException: java.io.IOException: Error initialising store of key store: java.lang.SecurityException: JCE cannot authenticate the provider BC at org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi.engineSetKeyEntry(Unknown Source) at java.base/java.security.KeyStore.setKeyEntry(KeyStore.java:1195) at app.revanced.utils.signing.Signer.newKeystore(Signer.kt:29) at app.revanced.utils.signing.Signer.signApk(Signer.kt:58) at app.revanced.cli.signing.Signing.sign(Signing.kt:10) at app.revanced.cli.command.MainCommand.run(MainCommand.kt:168) at picocli.CommandLine.executeUserObject(CommandLine.java:2026) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) at picocli.CommandLine.execute(CommandLine.java:2170) at app.revanced.cli.main.MainKt.main(Main.kt:7) Caused by: java.io.IOException: Error initialising store of key store: java.lang.SecurityException: JCE cannot authenticate the provider BC at org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi.makePBECipher(Unknown Source) at org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$StoreEntry.(Unknown Source) ... 15 more

Steps to reproduce

Run command java -jar revanced-cli.jar -a youtube.apk -c -o revancedYoutube.apk -b patches.jar -m integrations.apk -i client-spoof -i custom-video-buffer -i custom-video-speed -i disable-startup-shorts-player -i downloads -i general-ads -i hide-watermark -i microg-support -i minimized-playback -i premium-heading -i remember-video-quality -i old-quality-layout -i return-youtube-dislike -i settings -i sponsorblock -i tablet-mini-player -i video-ads -i custom-branding

Relevant log output

PS C:\dev\revanced> java -jar .\revanced-cli.jar -a youtube.apk -c -o revancedYoutube.apk -b patches.jar -m integrations.apk -i client-spoof -i custom-video-buffer -i custom-video-speed -i disable-startup-shorts-player -i downloads -i general-ads -i hide-watermark -i microg-support -i minimized-playback -i premium-heading -i remember-video-quality -i old-quality-layout -i return-youtube-dislike -i settings -i sponsorblock -i tablet-mini-player -i video-ads -i custom-branding
INFO: Reading dex files
INFO: Decoding AndroidManifest.xml only, because resources are not needed
INFO: Merging integrations.apk
INFO: Skipping sim-spoof, reason: excluded by default
INFO: Skipping compact-header, reason: excluded by default
INFO: Skipping debug-mode, reason: excluded by default
INFO: Skipping theme, reason: excluded by default
WARNING: Skipping predictive-back-gesture, reason: Missing compatibility annotation. Continuing.
INFO: Deleting existing resource cache directory
SEVERE: Failed to delete existing resource cache directory
INFO: Decoding resources
INFO: hide-captions-button succeeded
INFO: hide-watermark succeeded
INFO: return-youtube-dislike succeeded
INFO: hide-endscreen-cards succeeded
INFO: disable-startup-shorts-player succeeded
INFO: hide-create-button succeeded
INFO: hide-shorts-button succeeded
INFO: hide-email-address succeeded
INFO: tablet-mini-player succeeded
INFO: sponsorblock succeeded
INFO: hide-artist-card succeeded
INFO: comments succeeded
INFO: hide-info-cards succeeded
INFO: hide-autoplay-button succeeded
INFO: disable-fullscreen-panels succeeded
INFO: remove-player-button-background succeeded
INFO: hide-my-mix succeeded
INFO: hide-watch-in-vr succeeded
INFO: old-quality-layout succeeded
INFO: disable-auto-captions succeeded
INFO: hide-album-cards succeeded
INFO: hide-video-buttons succeeded
INFO: hide-time-and-seekbar succeeded
INFO: disable-auto-player-popup-panels succeeded
INFO: hide-cast-button succeeded
INFO: enable-wide-searchbar succeeded
INFO: custom-branding succeeded
INFO: premium-heading succeeded
INFO: hide-crowdfunding-box succeeded
INFO: seekbar-tapping succeeded
INFO: swipe-controls succeeded
INFO: downloads succeeded
INFO: general-ads succeeded
INFO: video-ads succeeded
INFO: remember-video-quality succeeded
INFO: custom-video-speed succeeded
INFO: settings succeeded
INFO: always-autorepeat succeeded
INFO: minimized-playback succeeded
INFO: microg-support succeeded
INFO: client-spoof succeeded
INFO: open-links-directly succeeded
INFO: disable-zoom-haptics succeeded
INFO: debugging succeeded
INFO: custom-video-buffer succeeded
INFO: hdr-auto-brightness succeeded
INFO: predictive-back-gesture succeeded
INFO: Compiling resources
INFO: Writing modified dex files
INFO: Writing dex file classes2.dex
INFO: Writing dex file classes3.dex
INFO: Writing dex file classes.dex
INFO: Writing dex file classes4.dex
INFO: Writing dex file classes6.dex
INFO: Writing dex file classes8.dex
INFO: Writing dex file classes5.dex
INFO: Writing dex file classes7.dex
INFO: Writing resources...
INFO: Aligning revancedYoutube_raw.apk to revancedYoutube_aligned.apk
INFO: Signing revancedYoutube_aligned.apk to revancedYoutube_signed.apk
org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$BCKeyStoreException: java.io.IOException: Error initialising store of key store: java.lang.SecurityException: JCE cannot authenticate the provider BC
        at org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi.engineSetKeyEntry(Unknown Source)
        at java.base/java.security.KeyStore.setKeyEntry(KeyStore.java:1195)
        at app.revanced.utils.signing.Signer.newKeystore(Signer.kt:29)
        at app.revanced.utils.signing.Signer.signApk(Signer.kt:58)
        at app.revanced.cli.signing.Signing.sign(Signing.kt:10)
        at app.revanced.cli.command.MainCommand.run(MainCommand.kt:168)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
        at picocli.CommandLine.execute(CommandLine.java:2170)
        at app.revanced.cli.main.MainKt.main(Main.kt:7)
Caused by: java.io.IOException: Error initialising store of key store: java.lang.SecurityException: JCE cannot authenticate the provider BC
        at org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi.makePBECipher(Unknown Source)
        at org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$StoreEntry.<init>(Unknown Source)
        ... 15 more

Screenshots or videos

image

Solution

No response

Additional context

I use Windows 11 21H2 home for one language.

Acknowledgements

ghost commented 1 year ago

Please use OpenJDK 17, not Oracle Java 17.

aegires commented 1 year ago

Please use OpenJDK 17, not Oracle Java 17.

Ok i try it Thank you!