TeamAmaze / TeamAmaze/AmazeFileManager

amaze crashes when sharing a file with target save as

Open
#1,623 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-FileOperations Issue-Bug
Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
1

Description

steps to reproduce:

  • open FDroid, select an app
  • share the apk file, with target "save as" from Amaze
  • in Amaze, push the blue button on the lower right to confirm where to put it

expected behavior

  • the app's apk file should be copied to the selected directory

observer behavior

  • crash

versions:
Amaze 3.3.2 FDroid
FRdoid client 1.5.1 Fdroid
LineageOS 15.1-20190410-microG-mido

logcat:

java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:353)
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:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NullPointerException: uri
at com.android.internal.util.Preconditions.checkNotNull(Preconditions.java:128)
at android.content.ContentResolver.openInputStream(ContentResolver.java:950)
at com.amaze.filemanager.filesystem.FileUtil$1.doInBackground(FileUtil.java:209)
at com.amaze.filemanager.filesystem.FileUtil$1.doInBackground(FileUtil.java:198)
at com.amaze.filemanager.utils.application.AppConfig$1.doInBackground(AppConfig.java:122)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at com.amaze.filemanager.filesystem.FileUtil.java around lines 198-209, where the logcat shows ContentResolver.openInputStream failing during the background copy. Reproduce the F-Droid sharing flow and inspect how the URI reaches FileUtil. Done means the APK is copied to the selected directory without a crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.