TeamAmaze / TeamAmaze/AmazeFileManager
`IOException`: No valid decoder to decrypt PEM on `NetCopyClientConnectionPool#createSshClient`
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 6.4k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
Issue explanation (write below this line)
I am using SFTP with key authentication. It works but I have to enter the
Key password every time I open a folder on the host. It says "no valid
decoder to decrypt PEM". If I make a typo while entering the password my
Amaze crashes.
Exception
- App Name: Amaze Dateimanager
- Package: com.amaze.filemanager
- Version: 3.9
- User Action: UI Error
- Request: Application crash
- OS: Linux
samsung/beyond1ltexx/beyond1:12/SP1A.210812.016/G973FXXUGHVJ5:user/release-keys
12 - 31 - Device: beyond1
- Model: SM-G973F
- Product: beyond1ltexx
Crash log
java.lang.RuntimeException: An error occurred while executing
doInBackground()
at android.os.AsyncTask$4.done(AsyncTask.java:415)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
Caused by: java.lang.RuntimeException: java.io.IOException: No valid
decoder to decrypt PEM.
at
io.reactivex.internal.util.ExceptionHelper.wrapOrThrow(ExceptionHelper.java:46)
at
io.reactivex.internal.observers.BlockingBaseObserver.blockingGet(BlockingBaseObserver.java:80)
at io.reactivex.Observable.blockingFirst(Observable.java:5120)
at
com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool.createSshClient(NetCopyClientConnectionPool.kt:270)
at
com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool.access$createSshClient(NetCopyClientConnectionPool.kt:49)
at
com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool$createNetCopyClient$1.invoke(NetCopyClientConnectionPool.kt:171)
at
com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool$createNetCopyClient$1.invoke(NetCopyClientConnectionPool.kt:169)
at
com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool.getConnection(NetCopyClientConnectionPool.kt:94)
at
com.amaze.filemanager.filesystem.ftp.NetCopyClientUtils.execute(NetCopyClientUtils.kt:93)
at
com.amaze.filemanager.filesystem.ssh.SshClientUtils.execute(SshClientUtils.kt:101)
at
com.amaze.filemanager.filesystem.HybridFile.forEachChildrenFile(HybridFile.java:937)
at
com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.listSftp(LoadFilesListTask.java:639)
at
com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:159)
at
com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:87)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
Caused by: java.io.IOException: No valid decoder to decrypt PEM.
at
com.amaze.filemanager.asynchronous.asynctasks.ssh.PemToKeyPairObservable.subscribe(PemToKeyPairObservable.kt:86)
at
io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual(ObservableCreate.java:40)
at io.reactivex.Observable.subscribe(Observable.java:12267)
at
io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
at
io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at
io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
... 3 more
--
Lukas Baumann
Seestrasse 25
8810 Horgen
Tel. +41 78 795 72 27
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with asynchronous/asynctasks/ssh/PemToKeyPairObservable.kt around line 86, then follow its use from filesystem/ftp/NetCopyClientConnectionPool.kt around line 270. Reproduce SFTP key authentication with an incorrect password and trace the error through the connection and file-listing paths. Done means the invalid password case no longer crashes the application and presents an appropriate failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100