massivemadness / Squircle-CE

👨‍💻 Squircle CE is a fast and free multi-language code editor for Android
https://play.google.com/store/apps/details?id=com.blacksquircle.ui
Apache License 2.0
1.4k stars 102 forks source link

ClassNotFoundException: com.jcraft.jsch.jce.Random when using SFTP #167

Closed rsnyman closed 1 year ago

rsnyman commented 1 year ago

I tried fixing this myself, but I don't know enough about Java/Kotlin and Android.

App Version: 2023.1.1 (10015) (current master)

Affected Device(s): Google Pixel 3 XL with Android 13

Describe the bug When attempting to create an SFTP server connection, I get the following exception visible in the side panel:

An error occurred

java.lang.ClassNotFoundException: com.jcraft.jsch.jce.Random

I cloned the repo and made a debug build, loaded it on my phone, and everything worked fine. Then I created an FDroid release build, and when I loaded it on my phone, it didn't work.

I found the following issue which seems to be the problem here: https://github.com/dacr/jassh/issues/33

I messed around but was unable to figure out how to prevent JSCh from being removed by the release build process.

To Reproduce Steps to reproduce the behavior:

  1. Go to Settings -> Cloud and Servers -> Add Server
  2. Add a server name, a host name (IP address doesn't work), port 22, SFTP, username, password, initial folder
  3. Click Save
  4. Open Side panel
  5. Select your server name from the drop down list.

Expected behavior I should be able to see the files on my SFTP server.

massivemadness commented 1 year ago

Hi @rsnyman, thanks for reporting, it's probably because of the missing proguard rules. I'll fix this in the next release

rsnyman commented 1 year ago

@massivemadness Yes, that's what I gathered, but my Android-fu is too weak :-) Thanks!

massivemadness commented 1 year ago

Fixed in v2023.1.2