TeamAmaze / TeamAmaze/AmazeFileManager
HttpException: Forbidden - In case this occurs on every request, make sure that the Google Drive API is enabled
Open
Nobody has claimed this yet.
Area-Cloud
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)
While checking file properties on gdrive file
Exception
- User Action: UI Error
- Request: Application crash
- Version: 3.5.3
- OS: Linux Android 11 - 30
- Device: flame
- Model: Pixel 4
- Product: flame
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:923)
Caused by: com.cloudrail.si.exceptions.HttpException: Forbidden - In case
this occurs on every request, make sure that the Google Drive API is
enabled. Otherwise, you might hit your Google Drive rate limit and need to
make less calls per second.
at com.cloudrail.si.services.GoogleDrive.getMetadata(GoogleDrive.java:1549)
at com.amaze.filemanager.filesystem.HybridFile.length(HybridFile.java:298)
at
com.amaze.filemanager.filesystem.files.FileUtils.getSpaces(FileUtils.java:555)
at
com.amaze.filemanager.asynchronous.asynctasks.LoadFolderSpaceDataTask.doInBackground(LoadFolderSpaceDataTask.java:85)
at
com.amaze.filemanager.asynchronous.asynctasks.LoadFolderSpaceDataTask.doInBackground(LoadFolderSpaceDataTask.java:53)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 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 by tracing the crash from com.cloudrail.si.services.GoogleDrive.getMetadata through HybridFile.length, FileUtils.getSpaces, and LoadFolderSpaceDataTask.doInBackground. Reproduce the failure while checking file properties on the listed Android device context; the issue is resolved when that action no longer crashes with the reported Forbidden exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin
- Domain
- cloud, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100