← Back to team overview

tomdroid-dev team mailing list archive

Re: Web sync branch hurdles

 

Thanks a lot for your feedback! Motivation is much more easy to find
when you know people are actually using and testing the code.

On Sun, Nov 8, 2009 at 10:58 PM, Sandy Armstrong
<sanfordarmstrong@xxxxxxxxx> wrote:
> Hi Folks,
>
> I finally got an Android environment set up (sadly, Eclipse just
> failed totally in openSUSE, so I'm using my Mac for Android stuff).

I also gave up on installing the Ubuntu Eclipse packages, installing
plugins fails in every conceivable way. I usually download the tarball
from eclipse.org and run it from my home dir.

> I pulled Benoit's web sync branch and decided to play around and see if
> I could get it to work with Ubuntu One.  The first thing I did was to
> change the default sync backend pref from "sdcard" to "snowy", because
> without a tomdroid directory on the SD card I was getting exceptions
> on startup.

I'll have to catch the exception anyway. My reasoning here was that
the sd card sync should be the default because it doesn't have to be
configured but if someone has an argument against it I'll gladly
change this.

> Then I replaced the signpost jar files with the latest
> 1.1 jar files I could find, since supposedly they contain OAuth 1.0a
> support.

I'm not really satisfied with the solution of having a jar file
versioned in bzr. If someone knows if there is an equivalent to svn
exports or if it would be okay to put a whole svn checkout under bzr,
I'd really like to know.

> The last thing I did was to change the oauth consumer pair
> constants from "tomdroid"/"tomdroid" to "anyone"/"anyone".
>
> With these changes I was able to get pretty far in the authentication
> process, but not far enough.

Then you got further than I did when I tried, I kept hitting internal
server errors during the first part of the authentication. I gave up
quickly for I didn't have any mean of knowing what really happened on
U1.

> When the callback URL (tomdroid://sync)
> was called by the browser, it seemed like a new Tomdroid instance came
> up (or at least, the welcome message was shown again), and then
> nothing happened.  At this point I'm kind of out of time to keep
> digging in today, but really I'm just not sure what the expected
> behavior is when running Tomdroid from the web sync branch, in the
> emulator, starting with an empty SD card.

The menu should contain a sync item as soon as the authentication
process is finished, but we really should inform the user about the
progress.

I tested U1 with the patch you provided below (which should be the
only changes required to support oauth 1.0a). You're absolutely
correct in your assumption that Tomdroid is handling the tomdroid://
url, that's why another instance seems to be started (we should only
show the popup on the first run). I get the following exception when
trying to do the last part of the auth process:

OAuthExpectationFailedException: Request token or token secret not set
in server reply. The service provider you use is probably buggy.

I'm sorry I don't have any tips to share as we're roughly at the same
point and I unfortunately won't have time to dig deeper into this
until this weekend.

Thanks for your time!
Benoit



Follow ups

References