TeamAmaze / TeamAmaze/AmazeFileManager
`NumberFormatException` on `NetCopyClientConnectionPool()`
Open
Nobody has claimed this yet.
From-Email
Issue-Bug
- Dominant language
- Kotlin
- Stars
- 6.4k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
Issue explanation (write below this line)
SFTP
Optional path=~
Exception
- App Name: Amaze File Manager
- Package: com.amaze.filemanager
- Version: 3.8.2
- User Action: UI Error
- Request: Application crash
- OS: Linux Android 12 - 31
- Device: a33x
- Model: SM-A336M
- Product: a33xub
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:381)
at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
at java.util.concurrent.FutureTask.run(FutureTask.java:269)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.NumberFormatException: For input string: "22~"
at java.lang.Integer.parseInt(Integer.java:747)
at java.lang.Integer.parseInt(Integer.java:865)
at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool$ConnectionInfo.<init>(NetCopyClientConnectionPool.kt:416)
at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool.createSshClient(NetCopyClientConnectionPool.kt:252)
at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool.access$createSshClient(NetCopyClientConnectionPool.kt:48)
at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool$createNetCopyClient$1.invoke(NetCopyClientConnectionPool.kt:175)
at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool$createNetCopyClient$1.invoke(NetCopyClientConnectionPool.kt:173)
at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool.getConnection(NetCopyClientConnectionPool.kt:88)
at com.amaze.filemanager.filesystem.ftp.NetCopyClientUtils.execute(NetCopyClientUtils.kt:83)
at com.amaze.filemanager.filesystem.HybridFile.forEachChildrenFile(HybridFile.java:914)
at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:181)
at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:78)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 3 more
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 in NetCopyClientConnectionPool.kt at ConnectionInfo line 416, following the SFTP path through createSshClient at line 252 and createNetCopyClient at line 175. Reproduce an SFTP connection with optional path=~ and inspect how the port is parsed; done means this input no longer crashes with NumberFormatException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile, networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100