file upload conflict: exception thrown when try to solve conflict
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
### ⚠️ Before posting ⚠️
- [x] This is a **bug**, not a question or an enhancement.
- [x] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [x] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Steps to reproduce
file upload conflict
exception thrown when try to solve the conflict
after retrying several times the error (exception) stoped appearing and the Upload panel (showing the conflict) showed up.
no idea what caused the error but this was not the first time it happened, I cannon find a way to reproduce it.
### Cause of error
```java
Exception in thread "main" java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nextcloud.client/com.owncloud.android.ui.activity.ConflictsResolveActivity}: java.lang.IllegalStateException: calling this from your main thread can lead to deadlock
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4035)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4201)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2438)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8663)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Caused by: Exception in thread "main" java.lang.IllegalStateException: calling this from your main thread can lead to deadlock
at android.accounts.AccountManager.ensureNotOnMainThread(AccountManager.java:2278)
at android.accounts.AccountManager.access$500(AccountManager.java:167)
at android.accounts.AccountManager$AmsTask.internalGetResult(AccountManager.java:2384)
at android.accounts.AccountManager$AmsTask.getResult(AccountManager.java:2422)
at android.accounts.AccountManager$AmsTask.getResult(AccountManager.java:2337)
at android.accounts.AccountManager.blockingGetAuthToken(AccountManager.java:1635)
at com.owncloud.android.lib.common.accounts.AccountUtils.getCredentialsForAccount(AccountUtils.java:126)
at com.owncloud.android.lib.common.OwnCloudAccount.loadCredentials(OwnCloudAccount.java:111)
at com.owncloud.android.lib.common.OwnCloudClientManager.getClientFor(OwnCloudClientManager.java:102)
at com.nextcloud.client.network.ClientFactoryImpl.create(ClientFactoryImpl.java:38)
at com.nextcloud.client.jobs.operation.FileOperationHelper.(FileOperationHelper.kt:33)
at com.nextcloud.client.di.AppModule.fileOperationHelper(AppModule.java:256)
at com.nextcloud.client.di.AppModule_FileOperationHelperFactory.fileOperationHelper(AppModule_FileOperationHelperFactory.java:56)
at com.nextcloud.client.di.DaggerAppComponent$AppComponentImpl.fileOperationHelper(DaggerAppComponent.java:6737)
at com.nextcloud.client.di.DaggerAppComponent$ConflictsResolveActivitySubcomponentImpl.injectConflictsResolveActivity(DaggerAppComponent.java:2386)
at com.nextcloud.client.di.DaggerAppComponent$ConflictsResolveActivitySubcomponentImpl.inject(DaggerAppComponent.java:2365)
at com.nextcloud.client.di.DaggerAppComponent$ConflictsResolveActivitySubcomponentImpl.inject(DaggerAppComponent.java:2347)
at dagger.android.DispatchingAndroidInjector.maybeInject(DispatchingAndroidInjector.java:113)
at dagger.android.DispatchingAndroidInjector.inject(DispatchingAndroidInjector.java:134)
at dagger.android.AndroidInjection.inject(AndroidInjection.java:181)
at dagger.android.AndroidInjection.inject(AndroidInjection.java:55)
at com.nextcloud.client.di.ActivityInjector.onActivityCreated(ActivityInjector.kt:18)
at android.app.Application.dispatchActivityCreated(Application.java:372)
at android.app.Activity.dispatchActivityCreated(Activity.java:1374)
at android.app.Activity.onCreate(Activity.java:1651)
at androidx.core.app.ComponentActivity.onCreate(ComponentActivity.kt:68)
at androidx.activity.ComponentActivity.onCreate(ComponentActivity.kt:328)
at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:216)
at com.owncloud.android.ui.activity.BaseActivity.onCreate(BaseActivity.java:73)
at com.owncloud.android.ui.activity.DrawerActivity.onCreate(DrawerActivity.java:1066)
at com.owncloud.android.ui.activity.FileActivity.onCreate(FileActivity.java:217)
at com.owncloud.android.ui.activity.ConflictsResolveActivity.onCreate(ConflictsResolveActivity.kt:72)
at android.app.Activity.performCreate(Activity.java:8290)
at android.app.Activity.performCreate(Activity.java:8270)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4009)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4201)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2438)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8663)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
```
### App information
* ID: `com.nextcloud.client`
* Version: `30320290`
* Build flavor: `gplay`
### Device information
* Brand: `samsung`
* Device: `beyond1q`
* Model: `SM-G973U1`
* Id: `SP1A.210812.016`
* Product: `beyond1qlteue`
### Firmware
* SDK: `31`
* Release: `12`
* Incremental: `G973U1UEU9IXE1`
### Expected behaviour
the Upload panel showing the conflict should appear.
### Actual behaviour
an exeption error shows up when tapping the file conflict notification.
### Android version
* SDK: `31` * Release: `12` * Incremental: `G973U1UEU9IXE1`
### Device brand and model
* Brand: `samsung` * Device: `beyond1q` * Model: `SM-G973U1` * Id: `SP1A.210812.016` * Product: `beyond1qlteue`
### Stock or custom OS?
Stock
### Nextcloud android app version
30320290
### Nextcloud server version
31.0.7
### Using a reverse proxy?
I don't know
### Android logs
_No response_
### Server error logs
```bash
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.