stefan-niedermann / nextcloud-deck

📋 Android client for nextcloud deck app
https://play.google.com/store/apps/details?id=it.niedermann.nextcloud.deck.play
GNU General Public License v3.0
500 stars 53 forks source link

App crashes when server is in maintenance mode #1611

Open mhastu opened 7 months ago

mhastu commented 7 months ago

This issue respects the following points:

Describe the bug

  1. Open the app
  2. the app crashes with following error message:
    
    Full Crash:

App Version: 1.24.1 App Version Code: 1024001 App Flavor: fdroid

Files App Version Code: 30280090 (PROD)


OS Version: 4.19.157-perf-g81c35c565a1b(eng.root.20240220.211354) OS API Level: 32 Device: FP4 Manufacturer: Fairphone Model (and Product): FP4 (FP4eea)


The nextcloud Android app tells me the server is in maintenance mode.

### Expected behavior

_No response_

### Deck Android version

1.24.1

### Deck server version

don't know, not my server

### Nextcloud Android version

3.28.0

### Nextcloud version

don't know, not my server

### Device

FP4

### Android Version

12

### App Store

- [ ] Google Play Store
- [ ] Google Play Store (Beta channel)
- [X] F-Droid
- [ ] Huawei App Gallery

### Stacktrace

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Not a JSON Object: "HTTP" at com.google.gson.Gson.fromJson(Gson.java:1238) at com.google.gson.Gson.fromJson(Gson.java:1137) at com.google.gson.Gson.fromJson(Gson.java:1047) at com.google.gson.Gson.fromJson(Gson.java:982) at it.niedermann.nextcloud.deck.repository.SyncRepository$3.onError(SyncRepository.java:307) at it.niedermann.nextcloud.deck.remote.api.RequestHelper$ResponseConsumer.onFailure(RequestHelper.java:95) at it.niedermann.nextcloud.deck.remote.api.RequestHelper$ResponseConsumer.onResponse(RequestHelper.java:70) at com.nextcloud.android.sso.helper.Retrofit2Helper$1.lambda$enqueue$0(Retrofit2Helper.java:87) at com.nextcloud.android.sso.helper.Retrofit2Helper$1.$r8$lambda$n0izO5V3AflskH7z1H8dSLmVKXo(Unknown Source:0) at com.nextcloud.android.sso.helper.Retrofit2Helper$1$$ExternalSyntheticLambda0.run(Unknown Source:6) at java.lang.Thread.run(Thread.java:920) Caused by: java.lang.IllegalStateException: Not a JSON Object: "HTTP" at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:101) at it.niedermann.nextcloud.deck.remote.api.NextcloudDeserializer.deserialize(NextcloudDeserializer.java:30) at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76) at com.google.gson.Gson.fromJson(Gson.java:1227) ... 10 more

LukasFreeze commented 6 months ago

Same problem here - "Please check whether your Nextcloud instance is not currently in maintenance mode"

It happened today after I tried clearing my app storage as suggested in #1619 to resolve sync issues I've had ever since installing the app (swiping down does not force a sync of cards I recently edited on PC, this has already cost me some data that was overwritten before I noticed this behavior)

I do not believe the server is actually in maintenance mode (hosted by IONOS, so I cannot see every setting, but everything including the deck app works fine on PC)

Nextcloud Version: 27.1.5 Enterprise

Here's the error message with (hopefully) all remaining details:

App Version: 1.24.1
App Version Code: 1024001
Server App Version: 1.11.4
App Flavor: play

Files App Version Code: 30290090 (PROD)

---

OS Version: 4.19.152-perf-28068759-abA526BXXS6FXC4(A526BXXS6FXC4)
OS API Level: 34
Device: a52xq
Manufacturer: samsung
Model (and Product): SM-A526B (a52xqnaeea)

---

com.nextcloud.android.sso.exceptions.NextcloudHttpRequestFailedException: HTTP request failed with HTTP status-code: 503
    at it.niedermann.nextcloud.deck.remote.api.RequestHelper$ResponseConsumer.onResponse(RequestHelper.java:70)
    at com.nextcloud.android.sso.helper.Retrofit2Helper$1.lambda$enqueue$0(Retrofit2Helper.java:87)
    at com.nextcloud.android.sso.helper.Retrofit2Helper$1.$r8$lambda$n0izO5V3AflskH7z1H8dSLmVKXo(Unknown Source:0)
    at com.nextcloud.android.sso.helper.Retrofit2Helper$1$$ExternalSyntheticLambda0.run(Unknown Source:6)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.RuntimeException: HTTP StatusCode wasn't 2xx:
Got [HTTP 503] for Call [GET [http://localhost//index.php/apps/deck/api/v1.1/boards/1/stacks/7/cards/38](http://localhost/index.php/apps/deck/api/v1.1/boards/1/stacks/7/cards/38)] with Message:
[<html>
<head>
<title>The page is temporarily unavailable</title>
<style>
body { font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body bgcolor="white" text="black">
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">
The page you are looking for is temporarily unavailable.<br/>
Please try again later.
<br />
4eba76321fb7f9f7530e864ae7cb2771
642e327af25d74d54b927caabdb900db
276c637d46fd45c3c9e00eb4deac65a5
</td>
</tr>
</table>
</body>
</html>
]
    at it.niedermann.nextcloud.deck.remote.api.RequestHelper$ResponseConsumer.buildCause(RequestHelper.java:87)
    ... 5 more
LukasFreeze commented 6 months ago

Update: in my case, the problem could be solved once by...

Update 2: less than a week later, the problem has returned (same error as posted above) and clearing the account data does not help this time around :-(

LukasFreeze commented 2 months ago

@stefan-niedermann any idea what else we could try? I've been effectively locked out of my app for half a year now 😞

An update to Nextcloud Enterprise 28.0.7.5 did not change anything, still getting the HTTP 503 error posted above no matter how often I uninstall the app and clear local storage.