Notes on Android cannot connect to the sever
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 CapabilitiesDeserializer.java 第 87 行开始,跟踪 ImportAccountActivity 进行帐户导入期间 CapabilitiesClient.getCapabilities 使用的 capabilities 响应。使用报告中的服务器设置重现该连接,并验证帐户导入完成时不会出现报告的 NullPointerException 或不可用连接错误。
由索引模型根据 Issue 内容生成。
描述
This issue respects the following points:
- I have read the FAQ
- I have searched for existing issues
- The issue affects the Notes Android app, neither the Notes server app nor the Nextcloud Android app.
Describe the bug
After installing the app and trying to connect to self-hosted server configured in the main Android Nextcloud app, the Notes app throws an error which says something like "wrong answer from the server" and that's it. The app is completely unusable.
Notes apps on the server is working without any issues through web interface.
The main Android Nextcloud app works without issues with the same server and account.
Expected behavior
No response
Notes Android version
33.1.0
Notes server version
5.0.0
Nextcloud Android version
33.1
Nextcloud version
33.0.2
Device
Samsung Galaxy S10
Android Version
12
App Store
- Google Play Store
- F-Droid
- Huawei App Gallery
Stacktrace
App Version: 33.1.0
App Version Code: 330010090
App Flavor: play
Files App Version Code: 330010090 (PROD)
---
OS Version: 4.14.113-25257816(G973FXXSGHWC1)
OS API Level: 31
Device: beyond1
Manufacturer: samsung
Model (and Product): SM-G973F (beyond1lteeea)
---
java.lang.NullPointerException: Attempt to invoke virtual method 'int com.google.gson.JsonPrimitive.getAsInt()' on a null object reference
at it.niedermann.owncloud.notes.persistence.sync.CapabilitiesDeserializer.deserialize(CapabilitiesDeserializer.java:87)
at it.niedermann.owncloud.notes.persistence.sync.CapabilitiesDeserializer.deserialize(CapabilitiesDeserializer.java:32)
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:95)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$2.readIntoField(ReflectiveTypeAdapterFactory.java:271)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:559)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:517)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$2.readIntoField(ReflectiveTypeAdapterFactory.java:271)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:559)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:517)
at com.google.gson.Gson.fromJson(Gson.java:1358)
at com.google.gson.Gson.fromJson(Gson.java:1259)
at com.google.gson.Gson.fromJson(Gson.java:1227)
at com.nextcloud.android.sso.api.NextcloudAPI.convertStreamToTargetEntity(NextcloudAPI.java:136)
at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$0(NextcloudAPI.java:98)
at com.nextcloud.android.sso.api.NextcloudAPI.$r8$lambda$af7W9mq2B0ZrhVJwZd-ibFp8T3Y(Unknown Source:0)
at com.nextcloud.android.sso.api.NextcloudAPI$$ExternalSyntheticLambda1.subscribe(D8$$SyntheticClass:0)
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.ObservableSingleMaybe.subscribeActual(ObservableSingleMaybe.java:31)
at io.reactivex.Maybe.subscribe(Maybe.java:4290)
at io.reactivex.Maybe.blockingGet(Maybe.java:2320)
at io.reactivex.Observable.blockingSingle(Observable.java:5381)
at it.niedermann.owncloud.notes.persistence.CapabilitiesClient.getCapabilities(CapabilitiesClient.java:38)
at it.niedermann.owncloud.notes.importaccount.ImportAccountActivity.lambda$onActivityResult$5(ImportAccountActivity.java:103)
at it.niedermann.owncloud.notes.importaccount.ImportAccountActivity.$r8$lambda$wIJzzcgrzM9d6k7exwdLMn3GvgQ(Unknown Source:0)
at it.niedermann.owncloud.notes.importaccount.ImportAccountActivity$$ExternalSyntheticLambda4.run(D8$$SyntheticClass:0)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
- 主要语言
- Java
- 星标
- 1.1k
- 派生
- 168
- 平均合并
- 20 小时 11 分钟
- 30 天内合并 PR
- 28
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nextcloud/notes-android 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
nextcloud/notes-android#3367 ·
维护者通常 1 天内回复
-
0. Needs triage bug
难度 2/5 1-3 小时 新手友好度 74/100
nextcloud/notes-android#3353 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 20/100
nextcloud/notes-android#3360 · 1 个 reaction ·
维护者通常 1 天内回复
-
0. Needs triage bug
难度 4/5 3-5 天 新手友好度 48/100
nextcloud/notes-android#3358 ·
维护者通常 1 天内回复
-
0. Needs triage bug
难度 3/5 1-2 天 新手友好度 68/100
nextcloud/notes-android#3357 · 2 条评论 ·
维护者通常 1 天内回复
查看 nextcloud/notes-android 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
-
component/zeebe kind/bug
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
UniversalMediaServer/UniversalMediaServer#6356 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
refinedmods/refinedstorage2#1414 · 1 条评论 ·
-
难度 1/5 1-3 小时 新手友好度 88/100
yegor256/rultor-image#76 · 1 条评论 ·