Skip to content
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

Nextcloud - Could not parse the JSON returned from the server: illegal value #1915

Closed
bcornw2 opened this issue Apr 8, 2020 · 17 comments
Closed

Comments

@bcornw2
Copy link

bcornw2 commented Apr 8, 2020

This occurs when trying to authenticate to a Nextcloud 11.0.2 server on the 2.6.4.15215 client for Windows. I am able to authenticate using the browser, but the above error occurs and it does not continue. No other use in this organization is experiencing this issue.

Expected behaviour

I sign in and Nextcloud continues as normal

Actual behavior

I cannot sign in and a red error that says "Could not parse JSON returned from the server: illegal value" pops up. Every other person in this organization can do so without issue.

Steps to reproduce

  1. Start Nextcloud for the first time
  2. Try to sign in/authenticate
  3. Experience error

Client configuration

Client version: 2.6.4.15215

Operating system: Windows 10 1909

OS language:

Installation path of client:

Server configuration

Nextcloud version: 11.0.2

@bcornw2 bcornw2 changed the title Could not parse the JSON returned from the server: illegal value Nextcloud - Could not parse the JSON returned from the server: illegal value Apr 8, 2020
@bcornw2
Copy link
Author

bcornw2 commented Apr 8, 2020

MicrosoftTeams-image

@bcornw2
Copy link
Author

bcornw2 commented Apr 8, 2020

###Fixed:
With Netxtcloud, sometimes in errors like these the application fails to communicate with the website. So completely removing the account and re-adding it resolves the issue. Uninstalling leaves traces of the account so that's why a reinstallation doesn't work unless you also remove the account. We did that, I renamed the old Nextcloud folder Nextcloud_old and transferred old docs he may have worked on before it crashed and everything is working properly.

Closing ticket.

@misch7
Copy link
Member

misch7 commented Jul 23, 2020

As @jhenin mentioned in #2226, this issue still persists:

I am faced regularly with issue #1915 , which I argue should be reopened. The workaround mentioned there is deleting and recreating the account. That requires a lengthy re-scan of the synced data, and is not what I'd call a fix.
I would have just commented there, but I am not allowed to reopen a closed issue.

@jhenin Could you please provide all version information:

  • Type of system and which OS version
  • Server version
  • Client version

And please also client (and if possible, server) logs? :)

@misch7 misch7 reopened this Jul 23, 2020
@jhenin
Copy link

jhenin commented Jul 23, 2020

Thank you @misch7 ! The client version that is currently giving me the error is 2.6.5, using the AppImage on Ubuntu 18.
Server is ownCloud 10.4.1 (stable)

@gruzilla
Copy link

thanks @misch7 to reopen this issue as i - similarly to @jhenin - regularly see this problem with university owncloud installations.

besides the buttons "Re-open Browser" and "Copy Link" not working in PureOs (a debian variant using wayland), i guess the problem lies within the single-sign-on-solution that my providers have implemented (i guess its something with SAML).

in my case, the url the nextcloud client is trying to access is returning an HTML instead of a JSON (the single-sign-on website).

hope this helps developing the issue? how can i help further?

@erjel
Copy link

erjel commented Sep 4, 2020

I have the described issue.

System: Debian GNU/Linux 9 (stretch)
Server version: OwnCloud Enterprise 10.4.1 (stable)
Client version:

Nextcloud version 2.6.5-20200713.144448.adada8b2e-1.0~stretch1
Using Qt 5.7.1, built against Qt 5.7.1
Using Qt platform plugin 'xcb'
Using 'OpenSSL 1.0.2u  20 Dec 2019'
Running on Debian GNU/Linux 9 (stretch), x86_64

Error message is the same as described previously

The workaround worked for me:

  • Open the nextcloud client via the Gnome Message Tray (at the bottom left of the screen)
  • Remove account via the Account button
  • Add account again via the Account button
  • If you have folder syncs you have to recreate all of them manually. (Is there another option?)

Yet, it looks like the error occurs every time the client is restarted.

@torwag
Copy link

torwag commented Sep 5, 2020

Same problem here...
Ach Linux, client 2.6.5
Server: Sciebo (European Cloud-service for Universities).
Could be that Sciebo slightly differently implemented the sync, or use an older version. There is a sciebo client as well, which looks more like a rebranded version of the nextcloud client.
What puzzles me, like others, I can create an account, it syncs, everything works and then suddenly it can't connect any more. Thus, there is something which initially during the account initialization is done differently (right) compared to the normal re-login process, which seems not to work.

I would like to add that I use a nextcloud-instance privately on my home-server and that I would love to use only one client to manage both accounts. Honestly speaking I trust the official client more in terms of features and security fixes.

@NightWorx
Copy link

NightWorx commented Sep 14, 2020

Same problem here...
Server: SWITCH (Swiss University & Research Network) drive.switch.ch.
Behaviour as described above.
login/auth ist done by Shibboleth/SAML2

Client: AppImage Version 3.0.1 (Ubuntu).

@switzel
Copy link

switzel commented Sep 14, 2020

I have the same problem. Purging the client and reinstalling fixes the problem for a single login but then the problem reoccurs.
The client is 2.6.2 from the Ubuntu repository, the server is sciebo again.
Does someone know how to debug this? For instance it would be interesting to know what the server's answer was and in particular, what the illegal value is.

@torwag
Copy link

torwag commented Sep 14, 2020

It seems that the owncloud client works... not sure if this helps.

@switzel
Copy link

switzel commented Sep 15, 2020

I have been using the owncloud client before but now it is rejected by the server as being too old ("it" being the version bundled with Ubuntu 20.04, possibly a more recent one would work). So possibly development of owncloud/nextcloud has diverged to become incompatible?
If someone tells me how to collect data on the server and on the data transmitted I'm happy to do it. I just don't want to dig out how to do it.

@er-vin
Copy link
Member

er-vin commented Sep 29, 2020

I have been using the owncloud client before but now it is rejected by the server as being too old ("it" being the version bundled with Ubuntu 20.04, possibly a more recent one would work). So possibly development of owncloud/nextcloud has diverged to become incompatible?

Clearly they diverged and you can expect that to increase over time.

If someone tells me how to collect data on the server and on the data transmitted I'm happy to do it. I just don't want to dig out how to do it.

Well, you'd have to enable logs on the server indeed and it's best if you look at the documentation for that. Likewise it's likely a good idea to provide debug client logs (using --logdebug and --logfile on the command line).

@jhenin
Copy link

jhenin commented Nov 3, 2020

I have a client-side debug log of the incident. Is that any help? I don't see anything obviously informative there but I don't know precisely what to look for. Here is the part that seems relevant to me:

2020-11-03 17:20:42:129 [ info nextcloud.sync.networkjob.determineauthtype ]:   Auth type for QUrl("https://owncloud.example.com/owncloud/remote.php/webdav/") is 0
2020-11-03 17:20:42:131 [ warning default ]:    QLayout: Attempting to add QLayout "" to OCC::WebFlowCredentialsDialog "", which already has a layout
2020-11-03 17:20:42:133 [ info nextcloud.sync.accessmanager ]:  4 "" "https://owncloud.example.com/owncloud/index.php/login/v2" has X-Request-ID "14a49b1b-5171-4c81-8f38-e8791668b506"
2020-11-03 17:20:42:133 [ debug nextcloud.sync.cookiejar ]      [ OCC::CookieJar::cookiesForUrl ]:      QUrl("https://owncloud.example.com/owncloud/index.php/login/v2") requests: (QNetworkCookie("ocf11e9791ce=bkagm6k5d3u0otli95541p13j9; oc_sessionPassphrase=H4laNgHPeRFR5aNkquF5FFHYcUeXnVKJuqw53kEkdiB1j5fm4q6ZnDXpFzsvJOlqNrcwfvbyhKa7xoNhjXVVN0Nw5TOyInkwabH1fsOAnA62leUYXTM6cIJWvhpwBP8a; ocf11e9791ce=bkagm6k5d3u0otli95541p13j9; oc_sessionPassphrase=H4laNgHPeRFR5aNkquF5FFHYcUeXnVKJuqw53kEkdiB1j5fm4q6ZnDXpFzsvJOlqNrcwfvbyhKa7xoNhjXVVN0Nw5TOyInkwabH1fsOAnA62leUYXTM6cIJWvhpwBP8a; ocf11e9791ce=bkagm6k5d3u0otli95541p13j9; oc_sessionPassphrase=H4laNgHPeRFR5aNkquF5FFHYcUeXnVKJuqw53kEkdiB1j5fm4q6ZnDXpFzsvJOlqNrcwfvbyhKa7xoNhjXVVN0Nw5TOyInkwabH1fsOAnA62leUYXTM6cIJWvhpwBP8a; ocf11e9791ce=fsj6t8cuhqpdk21v20bvbedlqr; oc_sessionPassphrase=k%2BeltbTs%2FShNwlBaIXussTXya6EyCYOvgqJxphdVjx9HoOJz3CZjtA9P%2BdrWWnVxR7S5lgiqQd7JkB%2FGuxEk8XFO2hd8ZAXLpTpoWldjzSRXVzZTtGz8wZwwAq3GhwUg; domain=owncloud.example.com; path=/owncloud/index.php/"), QNetworkCookie("ocf11e9791ce=o09bqahnoj80fhkkegm14llcft; secure; HttpOnly; domain=owncloud.example.com; path=/owncloud"), QNetworkCookie("oc_sessionPassphrase=AHo4Q4Wd%2FY%2BGwFfFTXmDCwdM3AabTMhMnCkpZt1rhZZ5ay%2Bz9pwRYwqfJTX3q%2BJbKM27Tuy%2BBSnL2%2FjhyNK087j7J625Up7WxDChmQWuIgr5nPdLrsz1nqxLUAFTNZvT; secure; HttpOnly; domain=owncloud.example.com; path=/owncloud"))
2020-11-03 17:20:42:133 [ info nextcloud.sync.networkjob ]:     OCC::SimpleNetworkJob created for "https://owncloud.example.com/owncloud" + "" "OCC::Account"
2020-11-03 17:20:42:144 [ debug nextcloud.sync.networkjob ]     [ OCC::AbstractNetworkJob::slotFinished ]:      Network job OCC::JsonApiJob finished for "/ocs/v2.php/cloud/capabilities"
2020-11-03 17:20:42:360 [ info nextcloud.sync.credentials.webflow ]:    request finished
2020-11-03 17:20:42:361 [ info nextcloud.sync.networkjob ]:     Redirecting "POST" QUrl("https://owncloud.example.com/owncloud/index.php/login/v2") QUrl("https://owncloud.example.com/owncloud/index.php/login")
2020-11-03 17:20:42:361 [ debug nextcloud.sync.accessmanager ]  [ OCC::AccessManager::setRawCookie ]:   "ocf11e9791ce" "bkagm6k5d3u0otli95541p13j9; oc_sessionPassphrase=H4laNgHPeRFR5aNkquF5FFHYcUeXnVKJuqw53kEkdiB1j5fm4q6ZnDXpFzsvJOlqNrcwfvbyhKa7xoNhjXVVN0Nw5TOyInkwabH1fsOAnA62leUYXTM6cIJWvhpwBP8a; ocf11e9791ce=bkagm6k5d3u0otli95541p13j9; oc_sessionPassphrase=H4laNgHPeRFR5aNkquF5FFHYcUeXnVKJuqw53kEkdiB1j5fm4q6ZnDXpFzsvJOlqNrcwfvbyhKa7xoNhjXVVN0Nw5TOyInkwabH1fsOAnA62leUYXTM6cIJWvhpwBP8a; ocf11e9791ce=bkagm6k5d3u0otli95541p13j9; oc_sessionPassphrase=H4laNgHPeRFR5aNkquF5FFHYcUeXnVKJuqw53kEkdiB1j5fm4q6ZnDXpFzsvJOlqNrcwfvbyhKa7xoNhjXVVN0Nw5TOyInkwabH1fsOAnA62leUYXTM6cIJWvhpwBP8a; ocf11e9791ce=fsj6t8cuhqpdk21v20bvbedlqr; oc_sessionPassphrase=k%2BeltbTs%2FShNwlBaIXussTXya6EyCYOvgqJxphdVjx9HoOJz3CZjtA9P%2BdrWWnVxR7S5lgiqQd7JkB%2FGuxEk8XFO2hd8ZAXLpTpoWldjzSRXVzZTtGz8wZwwAq3GhwUg; ocf11e9791ce=o09bqahnoj80fhkkegm14llcft; oc_sessionPassphrase=AHo4Q4Wd%2FY%2BGwFfFTXmDCwdM3AabTMhMnCkpZt1rhZZ5ay%2Bz9pwRYwqfJTX3q%2BJbKM27Tuy%2BBSnL2%2FjhyNK087j7J625Up7WxDChmQWuIgr5nPdLrsz1nqxLUAFTNZvT"
2020-11-03 17:20:42:361 [ info nextcloud.sync.accessmanager ]:  4 "" "https://owncloud.example.com/owncloud/index.php/login" has X-Request-ID "79f5c194-4987-4afd-a8ab-0e78b81b7822"
2020-11-03 17:20:42:361 [ debug nextcloud.sync.cookiejar ]      [ OCC::CookieJar::cookiesForUrl ]:      QUrl("https://owncloud.example.com/owncloud/index.php/login") requests: (QNetworkCookie("ocf11e9791ce=bkagm6k5d3u0otli95541p13j9; oc_sessionPassphrase=H4laNgHPeRFR5aNkquF5FFHYcUeXnVKJuqw53kEkdiB1j5fm4q6ZnDXpFzsvJOlqNrcwfvbyhKa7xoNhjXVVN0Nw5TOyInkwabH1fsOAnA62leUYXTM6cIJWvhpwBP8a; ocf11e9791ce=bkagm6k5d3u0otli95541p13j9; oc_sessionPassphrase=H4laNgHPeRFR5aNkquF5FFHYcUeXnVKJuqw53kEkdiB1j5fm4q6ZnDXpFzsvJOlqNrcwfvbyhKa7xoNhjXVVN0Nw5TOyInkwabH1fsOAnA62leUYXTM6cIJWvhpwBP8a; ocf11e9791ce=bkagm6k5d3u0otli95541p13j9; oc_sessionPassphrase=H4laNgHPeRFR5aNkquF5FFHYcUeXnVKJuqw53kEkdiB1j5fm4q6ZnDXpFzsvJOlqNrcwfvbyhKa7xoNhjXVVN0Nw5TOyInkwabH1fsOAnA62leUYXTM6cIJWvhpwBP8a; ocf11e9791ce=fsj6t8cuhqpdk21v20bvbedlqr; oc_sessionPassphrase=k%2BeltbTs%2FShNwlBaIXussTXya6EyCYOvgqJxphdVjx9HoOJz3CZjtA9P%2BdrWWnVxR7S5lgiqQd7JkB%2FGuxEk8XFO2hd8ZAXLpTpoWldjzSRXVzZTtGz8wZwwAq3GhwUg; ocf11e9791ce=o09bqahnoj80fhkkegm14llcft; oc_sessionPassphrase=AHo4Q4Wd%2FY%2BGwFfFTXmDCwdM3AabTMhMnCkpZt1rhZZ5ay%2Bz9pwRYwqfJTX3q%2BJbKM27Tuy%2BBSnL2%2FjhyNK087j7J625Up7WxDChmQWuIgr5nPdLrsz1nqxLUAFTNZvT; domain=owncloud.example.com; path=/owncloud/index.php/"), QNetworkCookie("ocf11e9791ce=o09bqahnoj80fhkkegm14llcft; secure; HttpOnly; domain=owncloud.example.com; path=/owncloud"), QNetworkCookie("oc_sessionPassphrase=AHo4Q4Wd%2FY%2BGwFfFTXmDCwdM3AabTMhMnCkpZt1rhZZ5ay%2Bz9pwRYwqfJTX3q%2BJbKM27Tuy%2BBSnL2%2FjhyNK087j7J625Up7WxDChmQWuIgr5nPdLrsz1nqxLUAFTNZvT; secure; HttpOnly; domain=owncloud.example.com; path=/owncloud"))
2020-11-03 17:20:42:540 [ info nextcloud.sync.credentials.webflow ]:    request finished
2020-11-03 17:20:42:541 [ warning nextcloud.sync.credentials.flow2auth ]:       Error when getting the loginUrl QJsonObject({"error":null}) "Could not parse the JSON returned from the server: <br><em>illegal value</em>"

@er-vin
Copy link
Member

er-vin commented Nov 3, 2020

That helps locate the place in the code at least, although for now I'm unsure why it does so.

@jhenin
Copy link

jhenin commented Nov 29, 2020

For anyone stumbling across this, an easy workaround is mentioned in this comment :
#2111 (comment)

  1. Stop Nextcloud client
  2. Delete the authType line for the affected account
  3. Start Nextcloud client
  4. Re-Login to the account

@AlexeyGusev
Copy link

@jhenin this brings nextcloud sync to my owncloud server back, thank you so much

For anyone stumbling across this, an easy workaround is mentioned in this comment :
#2111 (comment)

@github-actions
Copy link

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants