-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for failed logins / app crashes #638
Conversation
Codecov Report
@@ Coverage Diff @@
## master #638 +/- ##
==========================================
- Coverage 46.13% 40.71% -5.42%
==========================================
Files 164 151 -13
Lines 6347 6234 -113
Branches 833 807 -26
==========================================
- Hits 2928 2538 -390
- Misses 2981 3317 +336
+ Partials 438 379 -59
|
Can you give us some more info why this will fix the problem? |
First i took a look into the corresponding source of the owncloud android client and realized that they are using the blocking method instead of the peek... Then i merged the peace of code into my nextcloud repo and did some tests... and could not reproduce the issue ... furthermore i have added some errorhandling to be sure that the code will not try to auth with a null password which would produce the ldap lock... What the docs say: peekAuthToken: It is safe to call this method from the main thread. blockingGetAuthToken This convenience helper synchronously gets an auth token with getAuthToken(android.accounts.Account, java.lang.String, boolean, android.accounts.AccountManagerCallback, android.os.Handler). So the questions are: Why is this code called, when there is no password in cache. Maybe we have to distinguish between creating a new account (then using blockingGetAuthToken to generate token/password) |
Are there any news on the related issue(s)? @tobiasKaminsky You mentioned that you had a similar issue? Could you fix it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the right approach. As createNextcloudClient
is not called from the main thread, blockingGetAuthToken
should be a safe call.
* master: (129 commits) Reset spotbugs Bump byte-buddy from 1.11.22 to 1.12.0 analysis-wrapper: Remove extra spaces from spotbugs table Refactor spotbugs setup Revert "lint: Enable text report for CI build" workflows: Lint: upload lint results as artifacts workflows: Fix typo in lint actions lint: Enable text report for CI build lint: Remove lint.xml, disable InvalidPackage via build.gradle As lint 0 🎉 we do not need lint-up anymore, but can rely on plain lint GH action Drone: update Lint results to reflect reduced error/warning count [skip ci] Empty commit to trigger CI Suppress CustomX509TrustManager lint Drone: update Lint results to reflect reduced error/warning count [skip ci] Bump targetSdk and compileSdk to version 30 Bump annotation from 1.2.0 to 1.3.0 Do not check dependencies as we have DependAbot for this Fix code formatting via ktlintFormat Bump ktlint from 0.42.1 to 0.43.0 Bump gson from 2.8.8 to 2.8.9 ...
Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
SpotBugs (new)
SpotBugs (master)
|
/backport to stable-2.8 |
The backport to stable-2.8 failed. Please do this backport manually. |
fix nextcloud/android#8302
fix nextcloud/android#8525
fix nextcloud/android#8297
fix nextcloud/android#8370