Tomdroid Sync fails, datetime_format error

Bug #1064149 reported by David B
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tomdroid
Fix Released
Medium
Unassigned
Beta
Fix Released
Medium
Unassigned

Bug Description

I am seeing a number of notes fail to synchronize (silently!). I sync between two android devices, a tablet and phone and they work together fine. However, when I sync from my Ubuntu box, it silently ignores certain documents. These are always documents edited on the android devices.

This script - http://people.canonical.com/~roman.yepishev/us/tomboy-sync-validator.py tells me that these documents have datetime_format error and the stamp does seem to be reported as having a different format. Here are a couple of examples, the first is an example of the error and note the time format, quite different from the format of the other two, 'good ones'.

[8/57] "MapDesktop": last-change-date 2012-10-08T05:32:39.000Z
ERROR:
 20cbbaf1-0f17-4f5f-a6f0-fec4b628b122: datetime_format

[9/57] "Internode": last-change-date 2012-04-23T20:11:51.9364630+10:00
create-date 2009-10-02T08:52:42.9279910+10:00
OK

[10/57] "DesktopConfiguration": last-change-date 2012-09-20T11:23:39.4397650+10:00
create-date 2009-08-23T20:41:39.5709400+10:00
OK

I have seven of these error in my 57 documents, the differing date format is common to all error ones.

On an older version of Ubuntu (and therefore Tomboy notes) this problem seems to cause to sync to fail completely, not sure what is worse, a complete failure or a silent skip of what might be an important document. Interesting....

David

Revision history for this message
David B (d-bannon) wrote :

Oh dear, all those times I have complained when people put in bug reports with out telling me what they are using. And I go and do it here. Sorry !

I am using Tomdroid 0.7.1 on my android devices.

David

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

Thanks for your great bug report!
Could you maybe try if this issue is still present in this build: http://goo.gl/fKg6N ?

Noah changed a lot of the sync process since 0.7.1 but I don't know if this issue was known before.

Thanks,
Stefan

Revision history for this message
Randy Syring (rsyring) wrote :

I'm having the same problem. Can you tell me how to fix the datetime format in the notes so they will sync again?

Revision history for this message
Randy Syring (rsyring) wrote :

Just realized I could run `python tomboy-sync-validator.py --fix` and that worked.

Revision history for this message
David B (d-bannon) wrote :

Yes Stefan, I'll try with the version you mention when I get a chance. I guess I'll have to remove the existing, 'formal' one ? No problem, I'll have a play.

Randy, glad you got it working.

David

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote : Re: [Bug 1064149] Re: Tomdroid Sync fails, datetime_format error

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, you can use the new beta 0.7.2 now for testing this! no uninstall
necessary then.

On 17/10/12 07:36, David B wrote:
> Yes Stefan, I'll try with the version you mention when I get a
> chance. I guess I'll have to remove the existing, 'formal' one ? No
> problem, I'll have a play.
>
> Randy, glad you got it working.
>
> David
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlB+p0QACgkQXeaPvgR0RGf71gCgiwUNdLpSVjVc1Oor9mEMF8FR
Hl0Aniuu3WD/us8ZDKE+wqq8Ql1VXqCY
=s7RT
-----END PGP SIGNATURE-----

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

Hi!

It is true that the note format is saved differently, but this should not be a problem. it works for me at least.
Could you report which Tomboy version you are using and in which timezone you live?
thanks!

Changed in tomdroid:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 0.7.3
Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

Further, how do you sync? Ubuntu one, sdcard, other snowy server?

Revision history for this message
David B (d-bannon) wrote :

Hi Stefan.
I have two current Ubuntu boxes, a laptop and netbook. I also occasionally sync from an older PC running, maybe, two reversion older Ubuntu. But I don't think I have used that since I noted the problem.

On the android side, its a tablet running 4 something and a phone with 2 something.

I sync over Ubuntu One.

Time zone is Australia, +10 or +11 from memory.

I hope to have a play with that newer version of tomdroid later today.

David

Stefan Hammer <email address hidden> wrote:

>Further, how do you sync? Ubuntu one, sdcard, other snowy server?
>
>--
>You received this bug notification because you are subscribed to the bug
>report.
>https://bugs.launchpad.net/bugs/1064149
>
>Title:
> Tomdroid Sync fails, datetime_format error
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/tomdroid/+bug/1064149/+subscriptions

Revision history for this message
David B (d-bannon) wrote :

Hmm, this has just got a bit messier

I have upgraded to 0.7.2 and now its not syncing at all. Pops up the usual box to tell me its getting a list of notes - takes several minutes then drops back to the tomdroid screen having done nothing. No error message I'm afraid. Thats bad.

Using the script mentioned above, I can see the (UbuntuOne) server clearly has newer versions of some notes available but they don't appear on either of my android devices.

Further, I then modified a note on my andoid tablet and synced. Again, no error message. But the script tells me that the server did not get the modified note.

I can confirm that Tomboy on my two Ubuntu boxes is happily syncing. And I can confirm that Ubuntu One on the android box is working OK, files are remiaing in sync.

Now, no debugging skills on Android ! (plenty on unix platform however). If someone can point me in the right direction to capture some logs, that would be great

Davi

(Hmm, I suspect tomdroid has not been syncing for two days before I updated, so this is not a 0.7.2 issue !)

Changed in tomdroid:
assignee: nobody → Stefan Hammer (j-4)
Revision history for this message
David B (d-bannon) wrote :

OK, here is an extract from the logs, still looks like a timedate format issue -

......
10-20 13:12:01.876 I/SyncService(552): Local note is older, updating in content provider TITLE:MyShoppingList GUID:15520260-0e77-46ad-9aae-03db17e2caaa
10-20 13:12:01.876 I/SyncService(552): Local note is older, updating in content provider TITLE:MapDesktop GUID:20cbbaf1-0f17-4f5f-a6f0-fec4b628b122
.....
10-20 13:12:01.886 E/SyncService(552): Problem syncing in thread
10-20 13:12:01.886 E/SyncService(552): android.util.TimeFormatException: Unexpected length; should be 33 characters
10-20 13:12:01.886 E/SyncService(552): at android.text.format.Time.nativeParse3339(Native Method)
10-20 13:12:01.886 E/SyncService(552): at android.text.format.Time.parse3339(Time.java:484)
10-20 13:12:01.886 E/SyncService(552): at org.tomdroid.Note.getLastChangeDate(Note.java:169)
10-20 13:12:01.886 E/SyncService(552): at org.tomdroid.sync.SyncService.prepareSyncableNotes(SyncService.java:328)
10-20 13:12:01.886 E/SyncService(552): at org.tomdroid.sync.web.SnowySyncService.access$8(SnowySyncService.java:1)
10-20 13:12:01.886 E/SyncService(552): at org.tomdroid.sync.web.SnowySyncService$3.run(SnowySyncService.java:261)
10-20 13:12:01.886 E/SyncService(552): at org.tomdroid.sync.SyncService$1.run(SyncService.java:169)
10-20 13:12:01.886 E/SyncService(552): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
10-20 13:12:01.886 E/SyncService(552): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
10-20 13:12:01.886 E/SyncService(552): at java.lang.Thread.run(Thread.java:856)

This is using catlog. I don't see anything else particularly interesting in the log but its reasonable to assume I'm not good at spotting such things. At present, nothing is being sync'ed, but I see only the one exception. I guess that means the process crashes at that one exception ? There was no more sync activity after that point.

If I can get more data on the table with deeper log levels or what ever, please ask.

David

Revision history for this message
David B (d-bannon) wrote :

Sorry folks, don't want to be pushy. Is there any further information I can provide about this bug ?

David

Changed in tomdroid:
assignee: Stefan Hammer (j-4) → nobody
Revision history for this message
David B (d-bannon) wrote :

OK, some info about this
I invoked the "clean local database" and removed all local notes and resyncronised
The resync failed on three notes on the server, message was the same
...
-11-12 08:03:22.134 E/SyncService( 6322): Problem syncing in thread 11-12 08:03:22.134 E/SyncService( 6322): android.util.TimeFormatException: Unexpected length; should be 33 characters

By deleting each one, I could get it to complete the sync
The notes that caused the problems were ones origionally created by tomdroid and each one has a date stamp like this

[24/61] "Email Address": last-change-date 2012-10-17T09:58:16.0000000+0000
create-date 2012-10-17T09:58:16.0000000+0000

But it should look like this

[9/61] "MapDesktop": last-change-date 2012-10-14T17:42:37.2198950+11:00
create-date 2009-07-07T19:36:25.7226179+10:00

This seem quite repeatable. The bad date format is apparenlty acceptable to linux based tomboy.
David

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

Thanks. No more information necessary :-)

http://developer.android.com/reference/java/text/SimpleDateFormat.html
I will fix this this week and post a test-build. In case I forget, please remind me ;-)

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

Hi! The bug is fixed now. Can you please test if it works for you too now.
The script tells me that there are not errors any more! :-D

Download the test-build here: http://goo.gl/fKg6N

Revision history for this message
David B (d-bannon) wrote :

Hi Stephan, I have installed to new fixed version but have found that with one particular note I am getting a parsing error when I go to save it. Its quite repeatable with that particular note and does not seem to happen with any other one I have found yet. So it might well be unrelated to your fix, maybe I need to log a seperate bug report for that ?

As long as I don't sync from the tablet to the server, I can pull down fresh and good copies of all notes so not a fatal problem but I am a little reluctant to sync a whole lot of notes until I know a bit more about whats happening.

Do you agree that the parsing error (in which the note gets saved so it shows all the markup code) is likely to be unrelated to your fix ?

David
.

Stefan Hammer <email address hidden> wrote:

>Hi! The bug is fixed now. Can you please test if it works for you too now.
>The script tells me that there are not errors any more! :-D
>
>Download the test-build here: http://goo.gl/fKg6N
>
>** Changed in: tomdroid/beta
> Status: In Progress => Fix Committed
>
>--
>You received this bug notification because you are subscribed to the bug
>report.
>https://bugs.launchpad.net/bugs/1064149
>
>Title:
> Tomdroid Sync fails, datetime_format error
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/tomdroid/+bug/1064149/+subscriptions

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

Hi,
The parsing error is completely unrelated to this. It just appears if there is a bullets-list in the note. This bug is reported here already: https://bugs.launchpad.net/bugs/1067604
I just changed the date format as a fix for this, nothing else ;-) You should be able to sync up and down without any errors now!

Revision history for this message
David B (d-bannon) wrote :

Ah, yes, i guessed it would be unrelated. I should have searched...
Anyway, i have now edited several notes, created two new ones, even deleted a couple. Have not managed to reproduce the problem (the date format one) yet. From past experience, i would expect it to show by now. But i guess we should wait awhile before declaring it done ?
I will watch closely and tell you if i see anything.
Thanks heaps for your help, i use tomboy a lot!

David

.

Stefan Hammer <email address hidden> wrote:

>Hi,
>The parsing error is completely unrelated to this. It just appears if there is a bullets-list in the note. This bug is reported here already: https://bugs.launchpad.net/bugs/1067604
>I just changed the date format as a fix for this, nothing else ;-) You should be able to sync up and down without any errors now!
>
>--
>You received this bug notification because you are subscribed to the bug
>report.
>https://bugs.launchpad.net/bugs/1064149
>
>Title:
> Tomdroid Sync fails, datetime_format error
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/tomdroid/+bug/1064149/+subscriptions

Revision history for this message
David B (d-bannon) wrote :

Stefan, progress report. Been operating for a week now from my android tablet with not sign of the bug. I deliberately left the old unpatched version on my phone and have managed to reproduce the bug there. Thats a pretty good sign.

I have just now updated the phone to the patched version too and will run with that for a few days but its all looking good !

Thanks again.

David

Revision history for this message
David B (d-bannon) wrote :

Stefan, just spotted a problem, initially had trouble syncing but have not been able to replicate that.

But I have noticed that the date now being set for notes coming from Tomdroid, while the correct format, actually have the wrong date. For example, tomboy-sync-validator.py tells me they are all -

create-date 2000-01-01T10:00:00.0000000+11:00

Is the year 2000 Java's idea of the start of the epoch ? Or have we found the very last "Year 2000 bug" ? Younger people may need to google....

Anyway, looks like the field is not being initialized with current date, this could be bug number #1074602 perhaps ? Stephan, has your fix for the date format been rolled into the main stream code, if so, I can grab that and test but if its still got the dodgy date format I would rather not !

David

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

HI!

No need to test here any more. The bug is fixed in the trunk, you can test it any time (the version i gave you is exact the trunk lp:tomdroid)
If you don't trust the fix, just get the code and check it ;-)

This is no 2000 bug :-) we just do not store the create date... therefore we have to create an artificial one one. I know this is bad, but it does not harm the sync process! more reading here:
https://bugs.launchpad.net/tomdroid/+bug/1074602
https://bugs.launchpad.net/tomdroid/+bug/1078461

Greetings

Changed in tomdroid:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.