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

7.0.3: android-cloud-api error #12123

Closed
Huster-at-github opened this issue Nov 12, 2014 · 25 comments
Closed

7.0.3: android-cloud-api error #12123

Huster-at-github opened this issue Nov 12, 2014 · 25 comments
Assignees
Labels
Milestone

Comments

@Huster-at-github
Copy link

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

@LukasReschke
Copy link
Member

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 LukasReschke added this to the need more information milestone Nov 12, 2014
@Do-D
Copy link

Do-D commented Nov 12, 2014

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"

@volker-fr
Copy link

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
Copy link

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',
  ),

@Do-D
Copy link

Do-D commented Nov 13, 2014

This worked for me too, Thank You!

@LukasReschke LukasReschke self-assigned this Nov 13, 2014
@LukasReschke LukasReschke modified the milestones: 2014-sprint-08-current, need more information Nov 13, 2014
LukasReschke added a commit that referenced this issue Nov 13, 2014
This lead to a lot of confusion in the past and did not really offer any value. Let's remove the port check therefore. (it's anyways not really a part of the domain)

Fixes #12150 and #12123 and also a problem reported by @DeepDiver1975.
@Huster-at-github
Copy link
Author

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

@StraToN
Copy link

StraToN commented Nov 14, 2014

I had problems synchronizing CalDAV entries of my server on Android since the update. The workaround #12123 (comment) (volker-fr) did the trick.

@skavoovie
Copy link

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!

@juliadin
Copy link

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?

@sloniupl
Copy link

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

LukasReschke added a commit that referenced this issue Nov 18, 2014
This lead to a lot of confusion in the past and did not really offer any value. Let's remove the port check therefore. (it's anyways not really a part of the domain)

Fixes #12150 and #12123 and also a problem reported by @DeepDiver1975.

Conflicts:
	lib/private/request.php
@LukasReschke
Copy link
Member

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.

@ghost
Copy link

ghost commented Nov 20, 2014

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

@lysathor
Copy link

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

@alexander-yakushev
Copy link

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

@rbrueckner93
Copy link

workaround fixes issue. thanks!

@ceremcem
Copy link

thanks for the workaround!

@salfter
Copy link

salfter commented Nov 28, 2014

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.

@timaba
Copy link

timaba commented Nov 28, 2014

Thanks for the workaround!

@owenashurst
Copy link

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?

@dnorwood
Copy link

dnorwood commented Dec 6, 2014

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

@comamondo
Copy link

found this after same problem -> SOLVED, thanks!!

@ghost
Copy link

ghost commented Dec 8, 2014

Cool! This worked for me too! Thanks!

@mtudury
Copy link

mtudury commented May 16, 2015

Thanks for the 'trusted_domains' workaround.

i've found that the domain name is case sensitive too !
my.domain.name does not allow users with settings defined : my.Domain.Name (mobile devices virtual keyboards...)

Regards

@volker-fr
Copy link

@mtudury: I would create a new ticket for the case sensitive issue. This ticket is already closed and it is unclear if someone in charge will read your comment.

@salfter
Copy link

salfter commented May 19, 2015

Following up:

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.

At some point (first noticed it maybe a month ago), Keepass2Android started working again. I don't know if it was an update in Keepass2Android or in ownCloud (or both), but it's nice to have my passwords synced again. Other apps depending on WebDAV might also work once again.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests