Comments (9)
@desperateCoder thank you very much. It solves my issue.
from nextcloud-deck.
@desperateCoder we changed this specific part in the latest version, so I can even without stacktrace tell (thanks though for fetching the logs!), that this happend when calling SyncRepository#refreshCapabilities
. We get an OfflineException
with Reason.OFFLINE
as reason.
@pern0x did you used the Deck Android app before? Is it possible that you changed settings like Sync only on Wi-Fi
in the past? (We should already catch this case, but it helps to know)
@pern0x does the output of curl https://<username>:<passwod>@example.com/ocs/v2.php/cloud/capabilities?format=json -H 'OCS-APIRequest: true'
return some json stuff similar to
{
"ocs": {
"meta": {
"status": "ok",
"statuscode": 200,
"message": "OK"
},
"data": {
"version": {
"major": 28,
"minor": 0,
"micro": 1,
"string": "28.0.1",
"edition": "",
"extendedSupport": false
},
}
}
}
from nextcloud-deck.
Thanks for the quick reply. I did use the deck app before, but I did not activte wifi only. I have delete the storage of the app and uninstall it complete. After both actions the same message was shown.
Here is a part of the response from the curl query:
{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":{"version":{"major":28,"minor":0,"micro":3,"string":"28.0.3","edition":"","extendedSupport":false
from nextcloud-deck.
The connection is not possible on mobile or on wifi
from nextcloud-deck.
Are you able to provide a temporary test account on your instance and send the credentials to [email protected] ? This way we might be able to debug the cause.
from nextcloud-deck.
Hi @pern0x,
I tried it myself with your provided credentials and also got an error. Seems like whoever is answering our request behaves quite strangely:
2024-03-19 12:52:17.823 12432-12651 DeckLog it.niedermann.nextcloud.deck.dev E (RequestHelper.java:94) onFailure() → com.nextcloud.android.sso.exceptions.NextcloudHttpRequestFailedException: HTTP request failed with HTTP status-code: 520
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.RuntimeException: HTTP StatusCode wasn't 2xx:
Got [HTTP 520] for Call [GET http://localhost//ocs/v2.php/cloud/capabilities] with Message:
[java.lang.IllegalArgumentException: Unexpected char 0xfffd at 6 in X-Content-Security-Policy value: allow ���self���;]
at it.niedermann.nextcloud.deck.remote.api.RequestHelper$ResponseConsumer.buildCause(RequestHelper.java:87)
... 5 more
2024-03-19 12:52:17.824 12432-12651 DeckLog it.niedermann.nextcloud.deck.dev E (IResponseCallback.java:16) onError() → it.niedermann.nextcloud.deck.exceptions.OfflineException: Connection rejected
at it.niedermann.nextcloud.deck.remote.api.ServerCommunicationErrorHandler$Handler.handle(ServerCommunicationErrorHandler.java:52)
at it.niedermann.nextcloud.deck.remote.api.ServerCommunicationErrorHandler.translateError(ServerCommunicationErrorHandler.java:28)
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)
Whats interesting here are two parts:
HTTP request failed with HTTP status-code: 520
and
[java.lang.IllegalArgumentException: Unexpected char 0xfffd at 6 in X-Content-Security-Policy value: allow ���self���;]
The funny questionmarks aren't added by me or got added while copying, this is the actual response from the server.
By the HTTP-Status of 520 I guess your server is hidden behind CloudFlare? No idea what magic they are doing here, but this often leads to problems of various manner. Bypassing Cloudflare / Turning it off should your issue. And I guess we'll never know why there are funny bytes in the X-Content-Security-Policy
headers.
Sadly we can't do anything on our apps side. If the infrastructure won't let us talk to the server, there's not much we can do about it.
Does this help?
from nextcloud-deck.
What's really weird though: seems like CURL gets to the server. I'm not sure, but maybe there's actually an issue on our side. I'll have a deeper look at it as soon as I find some time. Would be really nice if we could keep the test account for an additional week or something.
from nextcloud-deck.
Hey @desperateCoder ,
I'm not using cloudflare. The instance is self-hosted on a machine at my home.
You can use the test account an additional week.
from nextcloud-deck.
@pern0x ok, I did some further research and found the following:
when i curl
this endpoint, i end up with the following line in the HTTP headers:
X-Content-Security-Policy: allow ‘self’;
In that case the ‘
s seem to be the issue. ATTENTION: I first didn't notice, but this is not a valid '
, but ‘
(french 'accent'/backtick vs. valid single-quote). To me it seems like a misconfiguration of the server, where someone mistook those two.
Is there a configuration on the server side setting this header? usually you'll find something like this in /etc/apache2/conf-available/security.conf
or something like that, i guess you can google that for your environement. Please check that and change it to valid single-quotes ('
), then just retry. Chances are good that it just starts working then.
EDIT:
In case this fixes your issue, feel free to close this issue and delete the test user (thanks for providing the user!)
from nextcloud-deck.
Related Issues (20)
- Filenames are not shown for jpg attachments HOT 4
- Feature Request: Add shortcut buttons for today and tomorrow
- Added ability to mark a card as done HOT 1
- Synchronize with one request HOT 1
- Show card description icon always if description is present HOT 2
- Board sort order of Lists HOT 2
- Renaming and order of lists not synced via ETags option HOT 3
- Nextcloud Deck App HOT 1
- "Upcoming cards" view not being remembered upon reopening app
- Leap year issue HOT 1
- Add new card to top or bottom of a list HOT 2
- Boards not sorted anymore after update; app crashing upon non-ETag sync
- Full crash when opening the app
- Add a photo via gallery not possible HOT 2
- App crashes when server is in maintenance mode HOT 2
- Deck (and Notes) apps stopped syncronizing after update - Offline exception HOT 1
- App crashes with NullPointerException in com.android.server.am.ProcessServiceRecord.updateHasAboveClientLocked HOT 1
- Flexible view of lists within a deck (for larger screens - like tablets) HOT 1
- Color of due date is too dark on android when usign a dark theme
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextcloud-deck.