Re: [Snowy] Crash when doing PUT



On Mon, Aug 10, 2009 at 9:03 AM, Cornelius Hald<hald icandy de> wrote:
> On Sun, 2009-08-09 at 09:22 -0700, Sandy Armstrong wrote:
>> > In the sites table I now have four entries:
>> > - 10.11.1.183:8000
>> > - localhost:8000
>> > - 127.0.0.1:8000
>> > - example.com
>>
>> Well, I think you have to set one of those to be the "current" site.
>
> Thanks Sandy! This was the reason why Tomboy was not syncing. I didn't
> find a way to set one of them to "current", but removing all and only
> leaving "10.11.1.183:8000" there did the trick.

Hmm, good to know.  We should update our INSTALL file.

> The reason why this is needed is, that Tomboy makes a request
> to /api/1.0 and gets back the full URL for making the next request. In
> my case this was something like "http://example.com/root/notes";. Tomboy
> then tried to access this URL which of course failed.
>
> Maybe the Tomboy log should contain the information which URL it was
> trying to connect to, instead of only logging the answer it got from
> this URL?!

It is possible to enable more verbose logging in Tomboy's web sync
add-in (you have to recompile to do it at this time, though, because
it's *extremely* verbose).  I'll take another look at the default
debug logging and see if I can improve it (at least show the URL in
the case of an error, as you suggest).

>> >> How are you starting Snowy?  You may need to start it with:
>> >>
>> >> python manage.py runserver 10.11.1.183:8000
>> >
>> > I did use "python manage.py runserver 0.0.0.0:8000" as Benoit suggested
>> > on the Snowy list. I now also tried with 10.11.1.183. The result is the
>> > same, only that I'm not able to connect to localhost anymore.
>>
>> Honestly, I am not very familiar with this part of django (or any of
>> django, it's quite new to me actually).  For the purposes of testing,
>> it would be great if you could run Snowy on the same machine as
>> Tomboy, set 'localhost:8000' as the "current" site, run `python
>> manage.py runserver` with no additional arguments, and put
>> 'http://localhost:8000' in Tomboy's web sync preferences UI.
>
> Running Snowy like this "python manage.py runserver 0.0.0.0:8000" works
> and is the most flexible as clients can connect from every IP address.

Thanks, good to know this.

>> If that still doesn't work, we'll need to roll up our sleeves and do
>> some serious debugging.  Right now I'm still thinking it could just be
>> a configuration issue.
>
> Luckily there is no need to do this anymore :) While trying tons of
> different settings and stuff I somehow also managed to get my own code
> running and just did the first successful PUT request.

Awesome!

> Two more things:
> - There seems to be a bug when requesting access to Snowy via Tomboy. If
> you're not already logged into Snowy Tomboy will open the Browser and
> present a not existing page. It works correctly if you're already logged
> in.

Yes, this is annoying.  Could you file a bug if one does not exist already?

> - When doing a PUT request and the last-sync-revision is set wrong you
> get "Bad Request" as reply. Nothing else. I think it would really be
> helpful to get a proper error message there. At least helpful to new
> client developers ;) There's already a comment about this in the source
> code, so the problem seems to be known.

Another good idea.  If you file a bug it will help us remember to
address it.  We can also improve this situation by improving our
documentation of the REST API on l.g.o.

> Anyways, thank you very much for the help! Hopefully it's getting easier
> from now on :)

Indeed, sorry for all the hurdles...and thanks for helping us figure
out these issues.

Sandy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]