Describe the bug
The app crashes when first trying to connect the account. Very similar to issue #502 except the application is enabled in the server.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The app doesn't crash.
Screenshots
Smartphone (please complete the following information):
Stacktrace
App Version: 1.4.0
App Version Code: 1004000
App Flavor: fdroid
Deck Server Version: 0.6.4
Files App Version Code: 30110190
---
OS Version: 4.4.222-Suggest-Good-Name-Ploxx-Kernul+(eng.prady.20200508.120017)
OS API Level: 29
Device: jasmine_sprout
Manufacturer: Xiaomi
Model (and Product): Mi A2 (derp_jasmine_sprout)
---
java.lang.IllegalArgumentException: capabilities endpoint returned no version string at all!
at it.niedermann.nextcloud.deck.api.JsonToEntityParser.parseCapabilities(JsonToEntityParser.java:354)
at it.niedermann.nextcloud.deck.api.JsonToEntityParser.parseJsonObject(JsonToEntityParser.java:52)
at it.niedermann.nextcloud.deck.api.NextcloudDeserializer.deserialize(NextcloudDeserializer.java:30)
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
at com.google.gson.Gson.fromJson(Gson.java:932)
at com.google.gson.Gson.fromJson(Gson.java:897)
at com.nextcloud.android.sso.api.NextcloudAPI.performRequest(NextcloudAPI.java:101)
at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservable$0$NextcloudAPI(NextcloudAPI.java:86)
at com.nextcloud.android.sso.api.-$$Lambda$NextcloudAPI$yhhE-DMCe81fXF-bhjup5Tra-6o.subscribe(Unknown Source:6)
at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
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:919)
Server details (from occ config:list):
"deck": {
"enabled": "yes",
"installed_version": "1.0.1",
"types": "dav"
}
App details (occ app:check-code deck):
Analysing /var/www/nextcloud/apps/deck/lib/AppInfo/Application.php
2 errors
line 27: OC_Util - private class must not be imported with a use statement
line 177: OC_Util - Static method of private class must not be called
Analysing /var/www/nextcloud/apps/deck/lib/Service/BoardService.php
2 errors
line 516: OC_Util - Static method of private class must not be called
line 605: OC_Util - Static method of private class must not be called
Analysing /var/www/nextcloud/apps/deck/appinfo/app.php
1 errors
line 39: OC_Util - Static method of private class must not be called
App is not compliant
How technically advanced are you? Are you able to use Postman or wget to give us the output of your capabilities REST-endpoint?
If not, we will need you to create a test account to reproduce the issue (credentials and link to this issue via email to [email protected])
I have some experience with REST (although none with Postman or Nextcloud OCS).
Here is the output of the capabilities call:
<?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message>OK</message>
<totalitems></totalitems>
<itemsperpage></itemsperpage>
</meta>
<data>
<version>
<major>18</major>
<minor>0</minor>
<micro>4</micro>
<string>18.0.4</string>
<edition></edition>
<extendedSupport></extendedSupport>
</version>
<capabilities>
<core>
<pollinterval>60</pollinterval>
<webdav-root>remote.php/webdav</webdav-root>
</core>
<bruteforce>
<delay>0</delay>
</bruteforce>
<files>
<bigfilechunking>1</bigfilechunking>
<blacklisted_files>
<element>.htaccess</element>
</blacklisted_files>
<directEditing>
<url>***/ocs/v2.php/apps/files/api/v1/directEditing</url>
<etag>6226ba873373f5e73a3ef504107523f7</etag>
</directEditing>
<versioning>1</versioning>
<undelete>1</undelete>
</files>
<activity>
<apiv2>
<element>filters</element>
<element>filters-api</element>
<element>previews</element>
<element>rich-strings</element>
</apiv2>
</activity>
<ocm>
<enabled>1</enabled>
<apiVersion>1.0-proposal1</apiVersion>
<endPoint>***/ocm</endPoint>
<resourceTypes>
<element>
<name>file</name>
<shareTypes>
<element>user</element>
<element>group</element>
</shareTypes>
<protocols>
<webdav>/public.php/webdav/</webdav>
</protocols>
</element>
</resourceTypes>
</ocm>
<deck>
<version>1.0.1</version>
</deck>
<dav>
<chunking>1.0</chunking>
</dav>
<files_sharing>
<api_enabled>1</api_enabled>
<public>
<enabled>1</enabled>
<password>
<enforced></enforced>
<askForOptionalPassword></askForOptionalPassword>
</password>
<expire_date>
<enabled></enabled>
</expire_date>
<multiple_links>1</multiple_links>
<expire_date_internal>
<enabled>1</enabled>
<days>30</days>
<enforced></enforced>
</expire_date_internal>
<send_mail></send_mail>
<upload>1</upload>
<upload_files_drop>1</upload_files_drop>
</public>
<resharing>1</resharing>
<user>
<send_mail></send_mail>
<expire_date>
<enabled>1</enabled>
</expire_date>
</user>
<group_sharing>1</group_sharing>
<group>
<enabled>1</enabled>
<expire_date>
<enabled>1</enabled>
</expire_date>
</group>
<default_permissions>31</default_permissions>
<federation>
<outgoing>1</outgoing>
<incoming>1</incoming>
<expire_date>
<enabled>1</enabled>
</expire_date>
</federation>
<sharee>
<query_lookup_default></query_lookup_default>
</sharee>
<sharebymail>
<enabled>1</enabled>
<upload_files_drop>
<enabled>1</enabled>
</upload_files_drop>
<password>
<enabled>1</enabled>
</password>
<expire_date>
<enabled>1</enabled>
</expire_date>
</sharebymail>
</files_sharing>
<notes>
<api_version>
<element>0.2</element>
<element>1.0</element>
</api_version>
</notes>
<notifications>
<ocs-endpoints>
<element>list</element>
<element>get</element>
<element>delete</element>
<element>delete-all</element>
<element>icons</element>
<element>rich-strings</element>
<element>action-web</element>
</ocs-endpoints>
<push>
<element>devices</element>
<element>object-data</element>
<element>delete</element>
</push>
<admin-notifications>
<element>ocs</element>
<element>cli</element>
</admin-notifications>
</notifications>
<password_policy>
<minLength>8</minLength>
<enforceNonCommonPassword>1</enforceNonCommonPassword>
<enforceNumericCharacters>1</enforceNumericCharacters>
<enforceSpecialCharacters>1</enforceSpecialCharacters>
<enforceUpperLowerCase>1</enforceUpperLowerCase>
<api>
<generate>***/ocs/v2.php/apps/password_policy/api/v1/generate</generate>
<validate>***/ocs/v2.php/apps/password_policy/api/v1/validate</validate>
</api>
</password_policy>
<theming>
<name>***name>
<url>***/</url>
<slogan>Official drink of paddy&#039;s pub</slogan>
<color>#C51230</color>
<color-text>#ffffff</color-text>
<color-element>#C51230</color-element>
<logo>***/apps/theming/image/logo?useSvg=1&v=7</logo>
<background>***/apps/theming/image/background?v=7</background>
<background-plain></background-plain>
<background-default></background-default>
<logoheader>***/apps/theming/image/logo?useSvg=1&v=7</logoheader>
<favicon>***/apps/theming/image/logo?useSvg=1&v=7</favicon>
</theming>
<registration>
<enabled>1</enabled>
<apiRoot>/ocs/v2.php/apps/registration/api/v1/</apiRoot>
<apiLevel>v1</apiLevel>
</registration>
</capabilities>
</data>
</ocs>
@DrMantisTobbogan Thanks for that perfect research! This looks exactly like the data we expect, really weird that the app can't parse that.
Just to make sure, we request it with an additional query-param like that:
@GET("cloud/capabilities?format=json")
Could you please post the output in JSON by adding ?format=json to the URL you are calling? Sorry, that you need to censor your URLs _again_ :smile:
For now i can't really tell what went wrong, since the data looks just fine. Additionally, we just released a new version you will get soon, which includes a better output for these cases. Sorry for the inconveniences though! We'll try to get rid of these problems as soon as possible!
I think it would be easier for all if you could provide us a test account (credentials to [email protected]), so we can directly debug the issue and don't need to bother you with this stuff 馃槈
Thanks for the help, I just setup the account. Let me know if you don't get the welcome email or need different permissions.
@desperateCoder, thanks for censoring those url's completely forgot.
@DrMantisTobbogan actually @stefan-niedermann censored it :smile:, but no problem at all!
Thanks for the test account, i just tried it and unfortunately had no luck. Works just fine. I suspect kind of temporary issues here, since your server seems to work flawlessly in my test.
Can you please make sure, the problem still persists for you? I can't see any cause, why this should not be working for now, so maybe just try again? To be sure, you can clear the app data or alternatively just un- and reinstall it.
Thanks for trying @desperateCoder and @stefan-niedermann,
Definitely a bit of an one-off case here I think. I tried reinstalling the server-side and local app again but with no luck (and the same error message).
I can hold out until the next release, hopefully things will sort themselves out.
Thanks again 馃槃
No problem buddy! But I wonder if you can log in using the provided test account. @stefan-niedermann will mail you the credentials, this one drives me crazy tbh
I got a timeout error with @stefan-niedermann account; very strange considering the server is up and I can interact with the Nextcloud files app just fine with his account.
Scratch that, definitely a server issue now; it's not externally available off my network for some reason. Will have to test again once I determine why it went down.
App Version: 1.4.0
App Version Code: 1004000
App Flavor: fdroid
Deck Server Version: 0.6.4
Files App Version Code: 30110190
---
OS Version: 4.4.222-Suggest-Good-Name-Ploxx-Kernul+(eng.prady.20200508.120017)
OS API Level: 29
Device: jasmine_sprout
Manufacturer: Xiaomi
Model (and Product): Mi A2 (derp_jasmine_sprout)
---
com.nextcloud.android.sso.exceptions.UnknownErrorException: failed to connect to xxxxxxx (port 443) from xxxxxxx2 (port 48530) after 5000ms
at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequest(AidlNetworkRequest.java:202)
at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequest(NextcloudAPI.java:119)
at com.nextcloud.android.sso.api.NextcloudAPI.performRequest(NextcloudAPI.java:98)
at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservable$0$NextcloudAPI(NextcloudAPI.java:86)
at com.nextcloud.android.sso.api.-$$Lambda$NextcloudAPI$yhhE-DMCe81fXF-bhjup5Tra-6o.subscribe(Unknown Source:6)
at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
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:919)
Your domain is in the stacktrace! 馃槃
Edit: fixed.
Thanks again, eventually I will learn (or get hacked 馃う); the server is back online and tried again with the test account. I'm getting a different error message now, this one is somewhat more descriptive hopefully:
App Version: 1.4.0
App Version Code: 1004000
App Flavor: fdroid
Deck Server Version: 0.6.4
Files App Version Code: 30110190
---
OS Version: 4.4.222-Suggest-Good-Name-Ploxx-Kernul+(eng.prady.20200508.120017)
OS API Level: 29
Device: jasmine_sprout
Manufacturer: Xiaomi
Model (and Product): Mi A2 (derp_jasmine_sprout)
---
android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: Card.accountId, Card.id (code 2067 SQLITE_CONSTRAINT_UNIQUE)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:879)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:88)
at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.java:51)
at androidx.room.EntityInsertionAdapter.insertAndReturnId(EntityInsertionAdapter.java:114)
at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.dao.CardDao_Impl.insert(CardDao_Impl.java:256)
at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.dao.CardDao_Impl.insert(CardDao_Impl.java:33)
at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.DataBaseAdapter.createCard(DataBaseAdapter.java:475)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.CardDataProvider.createInDB(CardDataProvider.java:72)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.CardDataProvider.createInDB(CardDataProvider.java:28)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.SyncHelper$1.onResponse(SyncHelper.java:44)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.SyncHelper$1.onResponse(SyncHelper.java:34)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.CardDataProvider$1.onResponse(CardDataProvider.java:52)
at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.CardDataProvider$1.onResponse(CardDataProvider.java:47)
at it.niedermann.nextcloud.deck.api.RequestHelper$ResponseConsumer.accept(RequestHelper.java:56)
at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeOnObserver.onNext(ObservableSubscribeOn.java:58)
at io.reactivex.internal.operators.observable.ObservableFromPublisher$PublisherSubscriber.onNext(ObservableFromPublisher.java:56)
at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservable$0$NextcloudAPI(NextcloudAPI.java:86)
at com.nextcloud.android.sso.api.-$$Lambda$NextcloudAPI$yhhE-DMCe81fXF-bhjup5Tra-6o.subscribe(Unknown Source:6)
at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
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:919)
Try clearing the app storage and sign in again please
Well, _thats_ actually good news. You passed the Capabilities-endpoint. Seems, something got stuck here, maybe in a different try. Clearing the app data might fix it.
Clearing the cache seems to have solved the issue for the test account for sure. I was able to login and create a new item on the board.
I tried again with my personal account and am still getting the same error message as before java.lang.IllegalArgumentException: capabilities endpoint returned no version string at all!
Well, we have two options now: @stefan-niedermann provides a test account on one of our instances, or you wait for the next update for more detailed messages. I think it's already tagged and should be available soon
Hi @desperateCoder, I am okay waiting for the next release to see what happens. You can mark this as closed for now not that makes things easier.
I have the same problem. :(
Device: Oneplus 7T Pro
Android-Version: 10
App Store: Google Play Store
App Version: 1.4.2
App Version Code: 1004002
Nextcloud version: 18.0.4
Deck version: 1.0.1
I tried what was written above.
"Clearing the app data might fix it."
@gleanlux what exactly is the error message you receive? Can you also please post it here?
@gleanlux if possible, can you please create a test account for us and share the credentials to [email protected] ?
@stefan-niedermann
I wrote an email.
I have an idea!
My server log is full a "login failed" messages.
I use 2FA. Could this be a problem?
As well as. My phone also use Nextcloud app.
@gleanlux, I can confirm that I am seeing the same thing in my log files. Tons of failed logins from both my account and the test account we were using for this issue. One difference is that neither my account or the test uses 2FA. Example of the log below:
{"reqId":"xxxx","level":2,"time":"2020-05-18T16:30:33+00:00","remoteAddr":"xxxx","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/webdav/xxxx","message":"Login failed: 'xxxxxx' (Remote IP: 'xxxxxxxx')","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.11.1","version":"18.0.4.2"}
@DrMantisTobbogan
Maybe you also use "2FA"?
@stefan-niedermann
The created test account has been successfully logged in.
The problem is solved! :)
I think, the original Nextcloud app is collided through.
Solution:
@stefan-niedermann
Thanks for the quick help!
Great team!
Interesting, glad to help, but it seems you solved the issue yourself^^.
@DrMantisTobbogan maybe you can also try to delete your account in both apps and readd it?
@stefan-niedermann, following @gleanlux solution solved the problem for me as well! 馃憤
Well... 馃 @gleanlux!
馃コ 馃コ 馃コ
Edit:
@stefan-niedermann we need to remember this one, maybe include it as a hint in case of an error.
Great to hear, thanks a lot for all the analyzes!
App Version: 1.4.4
App Version Code: 1004004
App Flavor: play
Deck Server Version: 0.6.4
Files App Version Code: 30110190
---
OS Version: 3.18.124-perf-g6d04eb4a(V11.0.5.0.QDLMIXM)
OS API Level: 29
Device: daisy_sprout
Manufacturer: Xiaomi
Model (and Product): Mi A2 Lite (daisy)
---
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Not a JSON Object: "066f80678b4845"
at com.google.gson.Gson.fromJson(Gson.java:944)
at com.google.gson.Gson.fromJson(Gson.java:897)
at com.nextcloud.android.sso.api.NextcloudAPI.performRequest(NextcloudAPI.java:101)
at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservable$0$NextcloudAPI(NextcloudAPI.java:86)
at com.nextcloud.android.sso.api.-$$Lambda$NextcloudAPI$yhhE-DMCe81fXF-bhjup5Tra-6o.subscribe(Unknown Source:6)
at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
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:919)
Caused by: java.lang.IllegalStateException: Not a JSON Object: "066f80678b4845"
at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91)
at it.niedermann.nextcloud.deck.api.JsonToEntityParser.parseAcl(JsonToEntityParser.java:192)
at it.niedermann.nextcloud.deck.api.JsonToEntityParser.parseBoard(JsonToEntityParser.java:149)
at it.niedermann.nextcloud.deck.api.JsonToEntityParser.parseJsonObject(JsonToEntityParser.java:41)
at it.niedermann.nextcloud.deck.api.NextcloudArrayDeserializer.deserialize(NextcloudArrayDeserializer.java:36)
at it.niedermann.nextcloud.deck.api.NextcloudArrayDeserializer.deserialize(NextcloudArrayDeserializer.java:18)
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
at com.google.gson.Gson.fromJson(Gson.java:932)
... 15 more
Dear @lvarnava could you please open a separate issue for your problem? (it seems unrelated to the other error messages in this issue)
Have you already tried to clear the storage of both apps? Nextcloud Android and Deck Android and import your account again? You can clear the storage in your Android settings -> Apps -> Nextcloud / Deck -> Storage -> Clear storage
If this doesn't help, please create a test account for us and send the credentials together with a link to your new created issue to [email protected] so we can have a closer look 馃檪
Regards
Most helpful comment
@stefan-niedermann, following @gleanlux solution solved the problem for me as well! 馃憤