TeamAmaze / AmazeFileManager

Material design file manager for Android
https://teamamaze.xyz
GNU General Public License v3.0
5.3k stars 1.57k forks source link

Crash after linking Onedrive #3368

Open amaze-issue-automation[bot] opened 2 years ago

amaze-issue-automation[bot] commented 2 years ago

Issue explanation (write below this line)

Attempted to link a OneDrive account under an organization.

Exception

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 android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
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: android.database.StaleDataException: Attempted to access a
cursor after it has been closed.
at
android.database.BulkCursorToCursorAdaptor.throwIfCursorIsClosed(BulkCursorToCursorAdaptor.java:63)
at
android.database.BulkCursorToCursorAdaptor.getCount(BulkCursorToCursorAdaptor.java:69)
at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:238)
at android.database.AbstractCursor.moveToNext(AbstractCursor.java:287)
at android.database.CursorWrapper.moveToNext(CursorWrapper.java:206)
at
com.amaze.filemanager.asynchronous.asynctasks.CloudLoaderAsyncTask.doInBackground(CloudLoaderAsyncTask.java:375)
at
com.amaze.filemanager.asynchronous.asynctasks.CloudLoaderAsyncTask.doInBackground(CloudLoaderAsyncTask.java:51)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 4 more


VishalNehra commented 2 years ago

@amaze-issue-automation[bot] @TranceLove will you be able to check this? is a crash on our cloud plugin part.

TranceLove commented 2 years ago

Same thing happened with personal OneDrive account too.

VishalNehra commented 2 years ago

Is this onedrive specific?

TranceLove commented 2 years ago

@VishalNehra Shall try with Dropbox later. Google drive didn't have this problem - just linked one during test.

TranceLove commented 2 years ago

I just tried again, the problem couldn't be reproduced again.

Was trying with Pixel 5 emulator running Android 12, and it's factory resetted.

The following cases went through without problem

Scenario 1:

  1. added Onedrive
  2. added Google drive after 1
  3. added Dropbox after 2

Scenario 2:

  1. Factory reset
  2. added Google drive
  3. added Onedrive after 1

Both scenarios, Amaze didn't crash but quietly returned from Amaze Cloud. Open the drawer, tap on the corresponding Cloud drive, and the file list is there.

I'm not sure if that was just some temporarily glitch with Cloud plugin's own...

VishalNehra commented 2 years ago

@TranceLove Thanks for testing.. I'll check for my end once.