client icon indicating copy to clipboard operation
client copied to clipboard

MAC client 1.6.3 status.php not valid JSON

Open tvaril opened this issue 12 years ago • 25 comments

Keep getting errors after installing latest MAC client, cannot go through Wizard. I entered https URL (have self signed certificate), client asks me to connect on http, since I have not allowed http for own cloud install I got connection error. I searched own cloud documentation, forum and github issues, but nothing helped me to sort this out :-(

Windows client works, Android and iOS app works, Webdav works, web works SSLlabs test does not indicate any issues owncloud.log and web server logs does not show anything

Owncloud client log shows this:

10-09 18:02:49:395 socketapi.cpp:55 SocketApi:  can't start server "" 
10-09 18:02:49:407 owncloudgui.cpp:106 No configured folders yet, starting setup wizard 
10-09 18:02:49:409 account.cpp:135 Migrate: checking old config  "/Users/name/Library/Application Support/ownCloud/owncloud.cfg" 
10-09 18:02:49:442 owncloudwizard.cpp:160 Current Wizard page changed to  0 
10-09 18:02:52:463 sparkleupdater_mac.mm:107 virtual void Mirall::SparkleUpdater::backgroundCheckForUpdate() launching background check 
10-09 18:02:52:469 sparkleupdater_mac.mm:34 -[DelegateObject updaterMayCheckForUpdates:] may check: YES 
10-09 18:03:03:239 cookiejar.cpp:119 "/Users/name/Library/Application Support/ownCloud//cookies.db" 
10-09 18:03:03:240 networkjobs.cpp:66 void Mirall::AbstractNetworkJob::setTimeout(qint64) 10000 
10-09 18:03:03:242 networkjobs.cpp:192 !!! Mirall::CheckServerJob created for  QUrl( "https://cloud.example.cz" )  querying "status.php" 
10-09 18:03:03:275 networkjobs.cpp:140 void Mirall::AbstractNetworkJob::slotFinished() 2 "Connection closed" 
10-09 18:03:03:276 networkjobs.cpp:415 status.php from server is not valid JSON! 
10-09 18:03:03:276 networkjobs.cpp:418 status.php returns:  QMap()   2  Reply:  QNetworkReplyHttpImpl(0x7fe17d1a7f70) 
10-09 18:03:03:276 networkjobs.cpp:424 No proper answer on   QUrl( "https://cloud.example.cz/status.php" )  
10-09 18:03:03:276 qstring.cpp:6919 QString::arg: Argument missing: Nemohu se připojit zabezpečeně. Přejete si místo toho připojit nezabezpečeně (nedoporučuje se)? , Selhalo spojení s ownCloud v https://cloud.example.cz/status.php:<br/>Connection closed
10-09 18:03:10:387 owncloudwizard.cpp:160 Current Wizard page changed to  -1 
10-09 18:03:10:403 owncloudsetupwizard.cpp:401 Rejected the new config, use the old! 
10-09 18:03:10:410 cookiejar.cpp:119 "/Users/name/Library/Application Support/ownCloud//cookies.db" 
10-09 18:03:11:311 sparkleupdater_mac.mm:47 -[DelegateObject updaterDidNotFindUpdate:]

status.php seems ok:

{"installed":"true","version":"7.0.2.1","versionstring":"7.0.2","edition":""}

Server config: Debian wheezy latest x64 build Nginx 1.6.2 PHP FPM 5.5.17 MariaDB 10.0.14

tvaril avatar Oct 09 '14 17:10 tvaril

10-09 18:03:03:242 networkjobs.cpp:192 !!! Mirall::CheckServerJob created for  QUrl( "https://cloud.example.cz" )  querying "status.php" 
10-09 18:03:03:275 networkjobs.cpp:140 void Mirall::AbstractNetworkJob::slotFinished() 2 "Connection closed" 

This is weird, why would your oC close the connection immediatly? Some firewall/proxy issue?

guruz avatar Oct 10 '14 09:10 guruz

I do not use proxy and I allowed all traffic for owncloud client in my firewall, so that should not be an issue.

Only thing that came up on my mind is security stuff (ciphers and https config), which I use quiet hard in and maybe the mac client does not support it?

my owncloud server ssl config for nginx:

listen 443 ssl spdy;
listen [::]:443 ssl spdy;
server_name cloud.example.com;

ssl_certificate /etc/ssl/nginx/server.crt;
ssl_certificate_key /etc/ssl/nginx/server.key;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1.2;
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA;
add_header Strict-Transport-Security max-age=15768000;
keepalive_timeout 70;
ssl_dhparam /etc/ssl/nginx/dh4096.pem;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;

tvaril avatar Oct 10 '14 11:10 tvaril

Sorry, looks like an server config issue, not a client error. closing hence.

dragotin avatar Oct 11 '14 15:10 dragotin

Are you sure enough to close the issue? Well, I would not say that, because only a mac version of owncloud client, is the only client which does not work with my server setup...

tvaril avatar Oct 12 '14 16:10 tvaril

@myazaki The Mac version uses the same codebase and same underlying network stack (from Qt).

Maybe you need a proxy on your Mac? Or you have some firewalling?

guruz avatar Oct 13 '14 09:10 guruz

@guruz as I said before I added owncloud client for mac to allow all traffic on firewall, so firewall should not be an issue. Why I need proxy btw? I am running Windows 8.1 virtual machine on my mac and onwcloud windows client connects just fine...

tvaril avatar Oct 13 '14 09:10 tvaril

What does the HTTP server access and error log say?

Regarding ciphers.. @danimo do you have an idea? see above nginx config.

guruz avatar Oct 13 '14 09:10 guruz

@guruz nginx server and owncloud log, are both empty, this is really strange... I would perosnaly assume, that ciphers should not be the problem as well because windows client works and it should use same Qt network stack as MAC version?

tvaril avatar Oct 13 '14 09:10 tvaril

I am using wildcard self-signed certificate and only difference between Windows and MAC client wizard is, than when I add https address in Windows client it immediately shows message that the certificate is untrusted, if I confirm that the certificate can be trusted, I can continue with setup. But MAC client does not asks about the certificate and acts as the certificate is automatically rejected...

tvaril avatar Oct 13 '14 10:10 tvaril

Did you create the certificate yourself with an empty CN attribute (CN)? The underlying OpenSSL library shipped with OS X doesn't like that.

danimo avatar Oct 13 '14 10:10 danimo

yes my certificate contains CN in form of:

*.example.com

tvaril avatar Oct 13 '14 10:10 tvaril

So what exactly is the error in the dialog that you cannot click away?

danimo avatar Oct 13 '14 12:10 danimo

When I write https://cloud.example.com in wizard dialog box, it shows that in cannot connect securely, and if I wish to connect insecurely (not recommended). If I click on No it shows me: "Connection failed with ownCloud on https://cloud.example.com/status.php: Connection closed".

tvaril avatar Oct 13 '14 12:10 tvaril

hello, any update on this, or help to debug more deeply?

tvaril avatar Oct 15 '14 07:10 tvaril

Can you open a terminal in your OS X and type: wget https://yourcloud_address/status.php What do you get?

guruz avatar Oct 15 '14 10:10 guruz

WGET

Connecting to cloud.example.com | 111.222.333.444|:443... connected.
ERROR: cannot verify cloud.example.com's certificate, issued by '/C=CZ/ST=PRG/L=Prague/O=John Doe/CN=*.example.com/[email protected]':
  Self-signed certificate encountered.
To connect to cloud.example.com insecurely, use `--no-check-certificate'

WGET --no-check-certificate

Connecting to cloud.example.com | 111.222.333.444|:443... connected.
ERROR: cannot verify cloud.example.com's certificate, issued by '/C=CZ/ST=PRG/L=Prague/O=John Doe/CN=*.example.com/[email protected]':
  Self-signed certificate encountered.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'status.php'

    [ <=>                                            ] 77          --.-K/s   in 0s

2014-10-15 15:06:56 (3.19 MB/s) - 'status.php' saved [77]

CURL

{"installed":"true","version":"7.0.2.1","versionstring":"7.0.2","edition":""}

tvaril avatar Oct 15 '14 13:10 tvaril

I suggest to enable more ssl_protocols and possibly ssl_ciphers. Does that work?

guruz avatar Oct 15 '14 14:10 guruz

So I did what you suggested, used bettercrypto.org ciphers and protocols recommendation for nginx and actualy it did help. But I needed to drop some security settings, which I believe is not a optimal way.

But still, I am wondering why owncloud client for MAC is not capable to support better security settings as owncloud Windows, Android, iOS clients as well as many other webdav clients and default MAC Finder Webdav support do. Can anyone explain, why is that and if there is a plan to support more secure encryption on MAC client? eg.

ssl_protocols TLSv1.2;
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA;

tvaril avatar Oct 15 '14 15:10 tvaril

Because we still depend on the system version of OpenSSL, which is rather old (0.9.8). Remedy is on the way, but the fix is party in 3rd party libraries. We expect Mac to improve in time for 1.8 (or 1.7.x if the upgrade seems safe enough).

danimo avatar Oct 15 '14 15:10 danimo

So the Safari and Finder does not use system version of OpenSSL?

tvaril avatar Oct 15 '14 15:10 tvaril