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

Sync error #8

Closed
Toobian opened this issue Nov 4, 2014 · 27 comments
Closed

Sync error #8

Toobian opened this issue Nov 4, 2014 · 27 comments
Labels

Comments

@Toobian
Copy link

Toobian commented Nov 4, 2014

When i create the account on my phone, the sync process failed with "Error 9: Server set unhandle...".
I tried with disable https and bug is always here.
Sorry but i have no more information.

@nerzhul
Copy link
Owner

nerzhul commented Nov 4, 2014

What is your app version ?

@nerzhul
Copy link
Owner

nerzhul commented Nov 4, 2014

Hi. Have you enabled ocsms app on your owncloud instance ? Error 9 means that your server doesn't answer with 200 or 403 return code.

Can you tell me if it's a 404 and your app was enabled or not ? Then i'll handle this code

@Toobian
Copy link
Author

Toobian commented Nov 4, 2014

Hi.
The app version is 0.15.3 and android version is 4.4.4
And ocsms is enabled. I don't see any conf field, so I presume there is no config.
Thanks

@nerzhul
Copy link
Owner

nerzhul commented Nov 5, 2014

Can you find the HTTP return code into your HTTPD server logs (apache, nginx...) ? It will be great to find what is the problem
Can you also look at owncloud.log

@Toobian
Copy link
Author

Toobian commented Nov 5, 2014

The HTTP return code is 412.

92.139.197.243 - Toobian [05/Nov/2014:07:07:45 +0100] "GET /index.php/apps/ocsms/get/apiversion?format=json HTTP/1.1" 200 13 "-" "Android-ownCloud"
92.139.197.243 - Toobian [05/Nov/2014:07:07:46 +0100] "GET /index.php/apps/ocsms/get/smsidlist?format=json HTTP/1.1" 200 14 "-" "Android-ownCloud"
92.139.197.243 - Toobian [05/Nov/2014:07:07:47 +0100] "POST /index.php/apps/ocsms/push?format=json HTTP/1.1" 412 31 "-" "Android-ownCloud"
92.139.197.243 - Toobian [05/Nov/2014:07:24:05 +0100] "GET /index.php/apps/ocsms/get/apiversion?format=json HTTP/1.1" 200 13 "-" "Android-ownCloud"
92.139.197.243 - Toobian [05/Nov/2014:07:24:05 +0100] "GET /index.php/apps/ocsms/get/smsidlist?format=json HTTP/1.1" 200 14 "-" "Android-ownCloud"
92.139.197.243 - Toobian [05/Nov/2014:07:24:07 +0100] "POST /index.php/apps/ocsms/push?format=json HTTP/1.1" 412 31 "-" "Android-ownCloud"

There are nothing in owncloud.log and the nginx error log

@nerzhul
Copy link
Owner

nerzhul commented Nov 6, 2014

412 is a Nginx problem i think. I must review the header problems on the app, maybe Nginx doesn't like it

@gringo1er
Copy link

Hello
I have the same issue: error #9: server set unhandled http return code
My configuration:
Server:
IIS 7 with ssl activated (tested without: same problem)
Owncloud 7.0.3

Client:
LG D802 with kitkat 4.4.2, with ocsms 0.15.3
14-11-17 21:51:52 192.168.1.210 GET /owncloud/index.php/apps/ocsms/get/new_messages lastDate=0 443 - 192.168.1.254 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/38.0.2125.111+Safari/537.36 500 0 0 970
2014-11-17 21:52:03 192.168.1.210 GET /owncloud/index.php/apps/ocsms/get/new_messages lastDate=0 443 - 192.168.1.254 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/38.0.2125.111+Safari/537.36 500 0 0 932
2014-11-17 21:52:08 192.168.1.210 PROPFIND /owncloud/remote.php/webdav/ - 443 - 192.168.1.254 Mozilla/5.0+(Windows)+mirall/1.7.0 207 0 0 815
2014-11-17 21:52:14 192.168.1.210 GET /owncloud/index.php/apps/ocsms/get/new_messages lastDate=0 443 - 192.168.1.254 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/38.0.2125.111+Safari/537.36 500 0 0 1009

I don't know if I have copied the good extract

Thanks

Gringo1er

@durands
Copy link

durands commented Nov 18, 2014

Any update on this problem? I have the same error and I've done pretty much the same tests as above.

Slackware / Apache with SSL

Here's httpd log:

[18/Nov/2014:10:55:49 -0500] "GET /owncloud/index.php/apps/ocsms/get/apiversion?format=json HTTP/1.1" 200 13
[18/Nov/2014:10:55:51 -0500] "GET /owncloud/index.php/apps/ocsms/get/smsidlist?format=json HTTP/1.1" 200 14
[18/Nov/2014:10:55:52 -0500] "POST /owncloud/index.php/apps/ocsms/push?format=json HTTP/1.1" 412 31

412 = Precondition Failed The condition specified by one or more If... headers in the request evaluated to false.

"The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server. This response code allows the client to place preconditions on the current resource metainformation (header field data) and thus prevent the requested method from being applied to a resource other than the one intended."

Something seems wrong with the client (owncloud-sms).

@stagprom
Copy link

Same Problem

Ubuntu 12.04 Apache2 / Android 4.4.4 CM11

Log:

[18/Nov/2014:20:26:04 +0100] "GET /index.php/apps/ocsms/get/apiversion?format=json HTTP/1.1" 200 808 "-" "Android-ownCloud"
[18/Nov/2014:20:26:04 +0100] "GET /index.php/apps/ocsms/get/smsidlist?format=json HTTP/1.1" 200 809 "-" "Android-ownCloud"
[18/Nov/2014:20:26:04 +0100] "POST /index.php/apps/ocsms/push?format=json HTTP/1.1" 412 843 "-" "Android-ownCloud"

@nerzhul
Copy link
Owner

nerzhul commented Nov 19, 2014

Hi, thanks for the report. The problem is on the PUSH command, of course. I need to find why ownCloud is setting 412 error code sometimes

@nerzhul
Copy link
Owner

nerzhul commented Nov 19, 2014

have you got anything in your owncloud.log at this event time ?

@nerzhul nerzhul added the bug label Nov 19, 2014
@stagprom
Copy link

I found this in own cloud.log:
{"app":"core","message":"Invalid OCS content returned for app ocsms","level":4,"time":"2014-11-18T17:56:27+00:00"}
time: first run from ocsms-app -> in apache-log are the same messages as in my post above.

@nerzhul
Copy link
Owner

nerzhul commented Nov 19, 2014

this is not very verbose but there is a path to find the problem.

Can you try to disable appcodechecker by adding this line in your config.php ?

'appcodechecker' => false,

@nerzhul
Copy link
Owner

nerzhul commented Nov 19, 2014

Also, is there any other error before this error ?

@nerzhul
Copy link
Owner

nerzhul commented Nov 19, 2014

It seems this bug is triggered by ownCloud app store...

https://github.com/owncloud/core/blob/master/lib/private/ocsclient.php

Here is the call:

https://api.owncloud.com/v1/content/data/167289

I force update of the ownCloud app store, tell me if this fix your bug

@stagprom
Copy link

you are a bit faster
I just try a new run with debuglevel=0 and 'appcodechecker' => false:
owncloud.log:
{"reqId":"546c64f742fff","app":"no app in context","message":"CSRF check failed","level":0,"time":"2014-11-19T09:37:59+00:00","method":"POST","url":"/index.php/apps/ocsms/push?format=json"}
{"reqId":"546c64f9543c1","app":"no app in context","message":"CSRF check failed","level":0,"time":"2014-11-19T09:38:01+00:00","method":"POST","url":"/index.php/apps/ocsms/push?format=json"}

apache2.log:
[19/Nov/2014:10:37:46 +0100] "GET /index.php/apps/ocsms/get/new_messages?lastDate= HTTP/1.1" 200 971 "https://.../index.php/apps
/ocsms/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.1.17 (KHTML, like Gecko) Version/7.1 Safari/537.85.10"
[19/Nov/2014:10:37:47 +0100] "PROPFIND /remote.php/webdav/mm HTTP/1.1" 207 1482 "-" "Mozilla/5.0 (Macintosh) mirall/1.6.3"
[19/Nov/2014:10:37:48 +0100] "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 1417 "-" "Mozilla/5.0 (Macintosh) mirall/1.6.3"
[19/Nov/2014:10:37:57 +0100] "GET /index.php/apps/ocsms/get/apiversion?format=json HTTP/1.1" 200 1886 "-" "Android-ownCloud"
[19/Nov/2014:10:37:57 +0100] "GET /index.php/apps/ocsms/get/smsidlist?format=json HTTP/1.1" 200 809 "-" "Android-ownCloud"
[19/Nov/2014:10:37:58 +0100] "POST /index.php/apps/ocsms/push?format=json HTTP/1.1" 412 843 "-" "Android-ownCloud"

@nerzhul
Copy link
Owner

nerzhul commented Nov 19, 2014

CSRF check failed is a good path. I look at this

nerzhul added a commit to nextcloud/ocsms that referenced this issue Nov 19, 2014
CSRF is not needed on push because user is not calling other pages. This will fix issues #25 and nerzhul/ncsms-android#8
@nerzhul
Copy link
Owner

nerzhul commented Nov 19, 2014

Can you try the given commit ? I forget to set NoCSRF for this function, and it's really not needed. This security is useless on push function and may solve your issue.

@stagprom
Copy link

It works!!! great!
but there is a problem with combining conversations with names from adressbook.
I will take a look later
thnx

@nerzhul
Copy link
Owner

nerzhul commented Nov 19, 2014

@stagprom have your removed appcodechecker configuration directive ?

@Toobian @gringo1er I close the issue. Please add a comment to confirm if it's okay

@nerzhul nerzhul closed this as completed Nov 19, 2014
@stagprom
Copy link

of course
but thnx for reminding
more about the problem on numbers in issue #3

@gringo1er
Copy link

OK. Let me try that solution. I understood that there is something to tune inside owncloud. Let me juste time to read the previous mails and to identify what I have to do

@nerzhul
Copy link
Owner

nerzhul commented Nov 19, 2014

You don't have to tune anything. Everything is fixed into the app :)

@gringo1er
Copy link

Oups okay. I missed the "new commit" mail. I have installed it. Owncloud detected the upgrade.

Sync seems to be fine. But, when I click on SMS tab, there is no discussion appearing. Where are my messages? It's a mistery.....

@gringo1er
Copy link

It was not a joke! Maybe you prefer me to open a new issue.... But i's simple. Its syncs, but nothing seems to appear inside the OCSMS tab: no discussion, no messages...
Would you like me to have a look somewhere, inside any file? Nothing appears inside IIS log or OC log

Thanx

@nerzhul
Copy link
Owner

nerzhul commented Nov 21, 2014

Please open a new issue, it's better.

@Toobian
Copy link
Author

Toobian commented Dec 3, 2014

It works !! :)

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

No branches or pull requests

5 participants