owncloud-archive / mozilla_sync

GNU Affero General Public License v3.0
120 stars 23 forks source link

Please add support for iOS #24

Closed phellmon closed 10 years ago

phellmon commented 10 years ago

As requested, opening an issue here:

Though Firefox has discontinued its own browser Firefox Home for iOS, there is a compatible browser called Foxbrowser (see https://itunes.apple.com/us/app/foxbrowser/id550365886?mt=8) which has the sync option. Syncing with the Firefox cloud server works, and it used to work with owncloud, but does no longer.

It seems the problem was with user/password authentication. I'd like to send you log files, but I have no clue where to look for them, since I am not a developer, only a power user. If you can tell me where to look, I'll send you what you need.

Right now I'm syncing my iPhone and laptop via Mozilla's sync server, but I'd rather like to use my owncloud. Please advise.

ogasser commented 10 years ago

Hi @phellmon

phellmon commented 10 years ago

a) yes. b) a bunch of error log files. I don't know how much they entail encrypted passwords, and because they contain the hostname of my cloud server, I don't want to post to a public board like this. Pls send me your email address and I forward them to you (preferably encrypted - got a PGP public key?). c) not sure how to access those logs. I'm using 1&1 as my ISP / webspace provider. I can get to PHPadmin and MySQL, but am not familiar with those.

ogasser commented 10 years ago

Sent you an email, @phellmon .

bastei commented 10 years ago

I tried the same and I think the problem is that foxbrowser doesn't send any HTTP Authentication headers in the requests. I don't know how authentication is handled in the Mozilla Sync protocol.?

foxbrowser is calling:

/owncloud/remote.php/mozilla_sync/user/1.0/my_userid/node/weave

followed by

/owncloud/remote.php/mozilla_sync/1.0/my_userid/storage/meta/global

Here the server returns 401 as it doesn't get HTTP Authentication credentials.

ogasser commented 10 years ago

@bastei Are you guessin that Foxbrowser is not sending an authentication header or did you actually see this behaviour?

According to the Sync specification they suggest to use HTTP Basic Authentication for Sync servers. It is, however, not strictly standardized. Do you know more about Foxbrowser's authentication?

@phellmon also got 401 errors. These can have a couple of reasons. You can try out the debug_issue22 branch and report back what kind of error code you get.

bastei commented 10 years ago

@ogasser I logged the $_SERVER-variables and didn't see any authentication header with foxbrowser. What can I do with the version in the debug branch? Is there any readme for it?

In foxbrowser there is an option "HTTP Authentication". Activating it unfortunately doesn't help. There is also a weird explanation of that option in https://github.com/graetzer/Foxbrowser/issues/7.

I'll open a new issue in the foxbrowser repo to find out how the browser is handling authentication. Maybe it is a bug there.

ogasser commented 10 years ago

The debug branch returns a different HTTP status code for the different authentication problems that can occur.

@bastei please reference this issue if you open a new issue in the foxbrowser repo.

ogasser commented 10 years ago

@phellmon @bastei Any update on this issue?

graetzer commented 10 years ago

Hi, I am the developer of Foxbrowser,

Foxbrowser is based on the code of the Firefox Home App: https://github.com/mozilla-services/ios-sync-client Either this is a new bug or the bug was in the original code.

Have you tried syncing your owncloud installation with a different app that uses the same codebasis as Foxbrowser? There is a free App which looks like a re-branded version of Firefox Home: https://itunes.apple.com/de/app/bookmarks-on-the-go/id550037184?mt=8

Tschaul commented 10 years ago

I tried the "Bookmarks On The Go" app and it doesn't work either.

ogasser commented 10 years ago

Unfortunately I don't have an Apple device so I can't reproduce this behaviour.

@Tschaul Can you check the owncloud.log or your webserver/database log for further information?

Tschaul commented 10 years ago

The owncloud.log as well as a mysql query log don't get entries when i try to setup the server. The app gives the error: "Failed To Communicate With Server (1)"

ogasser commented 10 years ago

What about /var/log/apache/error.log and /var/log/apache/access.log?

phellmon commented 10 years ago

@ogasser

Oliver, sorry, I haven't looked at this in a while now. Right now I'm thinking of first upgrading to OC 6.x, then checking whether the apps all work. I'm not techie enough to understand php programming or mysql error logs etc. My OC is hosted at my ISP, so looking at their apache log is likely not going to help us, as I expect there to be hundreds of installations running on it. But maybe I am wrong. Perhaps the best would be to arrange for a common time on a chat system (skype, google talk, facebook chat, internet relay chat) to do some hands-on. Or if anyone is in the Munich area, later in this coming week I could meet up someplace if someone wants to get their hands on the device. I'll be travelling the next few days, so nothing can be done until towards the end of the week. -- Peter

bastei commented 10 years ago

@ogasser @graetzer I still have an iPhone + ownCloud installation here and some skills, so I can easily provide logs. I think I will have some time for testing tomorrow evening, you can also find me in the owncloud dev IRC channel then.

ogasser commented 10 years ago

@bastei and I did a debugging session yesterday. We found two issues that were Foxbrowser specific. After applying two workarounds, syncing seems to work now. Please try out the foxbrowser_fixes branch, @phellmon @Tschaul.

tristan-k commented 10 years ago

Maybe the developer of iCabMobile can jump in, because his firefoxsync engine is working with the the latest offical firefox sync app from apps.owncloud. Also see this: https://github.com/balu-/FSyncMS/issues/9

ogasser commented 10 years ago

It would be great if we could have feedback from @phellmon and @Tschaul so that we know if this should be merged into master. Thanks!

phellmon commented 10 years ago

Thanks to @ogasser I could install the latest version of mozilla_sync today and got it to work! Thanks also to @bastei for the debugging session and to @graetzer for the Foxbrowser. Great to see you all working together, and apologies for my own slowness in testing and responding.