core icon indicating copy to clipboard operation
core copied to clipboard

7.0.3: android-cloud-api error

Open Huster-at-github opened this issue 12 years ago • 25 comments

After upgrade from 7.0.2 to 7.0.3 there is an Android App Error:

FolderSync can't connect anymore. Other Apps as "ES File Explorer" or the two Owncloud-Apps are still working.

access.log: 79.232.202.xxx - - [12/Nov/2014:08:12:22 +0100] "PROPFIND /owncloud/remote.php/webdav/ HTTP/1.1" 400 8731 "-" "android-cloud-api - Android 4.4.2"

Android 4.4.4 also reported this bug.

See also same bug in OC 8.0: https://forum.owncloud.org/viewtopic.php?f=29&t=23983

Huster-at-github avatar Nov 12 '14 07:11 Huster-at-github

Can you please report a complete issue report using the issue template as stated at https://github.com/owncloud/core/blob/master/CONTRIBUTING.md? - Thanks.

LukasReschke avatar Nov 12 '14 09:11 LukasReschke

Hi, just fyi, since the upgrade to 7.0.3 it does not work with the android app "synchronize ultimate" either. It's a free XDA App if someone likes to test: http://forum.xda-developers.com/showthread.php?t=2412188

It did work with 7.0.2. Owncloud Sync client, iOS App and Owncloud Android App are still working. No owncloud or Nginx error log. Nginx access log:

10.31.31.254 - {USERNAME} [12/Nov/2014:15:27:41 +0100] "PROPFIND /remote.php/webdav/ HTTP/1.1" 400 2901 "-" "Sardine/0.0"

Do-D avatar Nov 12 '14 14:11 Do-D

I debugged this future and came to the point where it fails in lib/base.php init

if (!OC::$CLI
   // overwritehost is always trusted
  && OC_Request::getOverwriteHost() === null
  && !OC_Request::isTrustedDomain($host)
) {

The error here is that the the isTrustedDomain() function resolves it as "false" and therefore fails.

Comparing the $host variable between a working client and a not working client indicated that the not working system provided the port and is therefore not trusted.

Passes: my.owncloud.hostname Fails: my.owncloud.hostname:443

volker-fr avatar Nov 13 '14 03:11 volker-fr

My workaround fix is adding the host name with :443 into the config.php. The first entry (labeled 0) is the default one, the one labeled "1" is the new one.

  'trusted_domains' =>
  array (
    0 => 'my.owncloud.hostname',
    1 => 'my.owncloud.hostname:443',
  ),

volker-fr avatar Nov 13 '14 03:11 volker-fr

This worked for me too, Thank You!

Do-D avatar Nov 13 '14 08:11 Do-D

Sorry for the late reply and YES, your workaround is working! - Thanks!

Huster-at-github avatar Nov 13 '14 19:11 Huster-at-github

I had problems synchronizing CalDAV entries of my server on Android since the update. The workaround https://github.com/owncloud/core/issues/12123#issuecomment-62837583 (volker-fr) did the trick.

StraToN avatar Nov 14 '14 10:11 StraToN

Disregard previous report that the fix didn't work for me in Thunderbird. I forgot about the Thunderbird Lightning URL work-around ( http://forum.owncloud.org/viewtopic.php?f=3&t=2894 ) when setting up a test server.

Thanks for the work-around!

skavoovie avatar Nov 14 '14 23:11 skavoovie

Thanks, the workaround did work for me, too. Since this problem was introduced with my installation being upgraded to 7.0.3 and the 7.0.3 - will there be a fix for that, so that the workaround is not necessary anymore?

juliadin avatar Nov 17 '14 07:11 juliadin

ownCloud 7.0.3 (stable) - great workaround, now foldersync android app works correctly with my owncloud (webdav) :)

sloniupl avatar Nov 17 '14 10:11 sloniupl

This will be fixed with 7.0.4. Sorry for the hassle. - In the meanwhile I'd like to ask anyone experiencing this problem to adjust the trusted_domain setting as pointed out above.

LukasReschke avatar Nov 19 '14 22:11 LukasReschke

Adding :433 to the trusted domain in config.php solved this issue for me too. Thanks

ghost avatar Nov 20 '14 21:11 ghost

Modification of trusted_domain in config.php solved this issue for me too. Thanks

lysathor avatar Nov 20 '14 22:11 lysathor

Not contributing much, but worked for me too! Thanks a lot.

alexander-yakushev avatar Nov 21 '14 20:11 alexander-yakushev

workaround fixes issue. thanks!

rbrueckner93 avatar Nov 22 '14 09:11 rbrueckner93

thanks for the workaround!

ceremcem avatar Nov 25 '14 21:11 ceremcem

So that's why FolderSync was giving me fits earlier. I replaced it with the ownCloud app at F-Droid, but then I saw that calendar entries weren't updating. The :443 workaround mentioned abovr got calendar sync working again.

OTOH, it would now appear that Keepass2Android can no longer sync to an ownCloud WebDAV share. When it tries to access the file, it briefly says something like "could not open from remote" in a popup that goes away after a couple of seconds. The aforementioned workaround makes no difference. I can load that program's database through (for instance) ES File Explorer, but that'll be a read-only copy.

salfter avatar Nov 28 '14 05:11 salfter

Thanks for the workaround!

timaba avatar Nov 28 '14 16:11 timaba

Hmm. I've added my domain with ":443" on the end like stated above, but instead of getting "Bad Request" I'm now getting, in FolderSync, "Attempt to read from field 'java.util.Listbbi.a' on a null object reference".

If I choose OwnCloud as the account type, then I get "Method Not Allowed".

Any ideas?

owenashurst avatar Nov 28 '14 21:11 owenashurst

This workound works great, was beating my head against the wall earlier.

dnorwood avatar Dec 06 '14 21:12 dnorwood