kobotoolbox / koboform

A Java/GWT based formbuilder (no longer supported). Replaced by dkobo.
2 stars 8 forks source link

Nexus 7 deviceid is it's MAC address - problems with KoboSync #116

Open Dylan-Gillespie opened 11 years ago

Dylan-Gillespie commented 11 years ago

From gsrz...@gmail.com on June 06, 2013 23:06:03

My daughter is in Zanzibar working on a survey for a malaria project using ODK Collect on several Nexus 7 tablets. There are 10 tablets and although 8 of them have 'standard' deviceids, 2 have deviceids that contain their MAC address. Apparently this could become more common in future.

During training of her team with the tablets several forms were completed and when my daughter had problems (on a Windows 7 laptop) she asked me to look at it. I used XP and had the same problems. Looking into the XML I saw the deviceid pattern was different on the problem files from the ones that processed successfully. What steps will reproduce the problem? 1.Try to use the Kobo Post Processor on the attached file It was in a folder of the same name but I don't think that is necessary as long as you point to the folder containing the file. Select the folder the file is in and click 'Aggregate'

2.I switched on logging to FINEST and the attached log shows a successful and then the failure related to the xml file attached. A snippet from the log shows

FINE: Syncing 1 files Jun 07, 2013 5:10:14 AM org.oyrm.kobo.postproc.KoboSurveyDeviceSynchronizer copyFiles FINER: ENTRY [C:\Documents and Settings\Terry\Desktop\JackieDocs\Training instances\newhouse_2013-06-05_15-39-05\newhouse_2013-06-05_15-39-05.xml] Jun 07, 2013 5:10:14 AM org.oyrm.kobo.postproc.KoboSurveyDeviceSynchronizer copyFiles WARNING: Error copying file from newhouse_2013-06-05_15-39-05.xml to 08:60:6e:a2:88:f3_newhouse_2013-06-05_15-39-05.xml Jun 07, 2013 5:10:14 AM org.oyrm.kobo.postproc.KoboSurveyDeviceSynchronizer processDirectory WARNING: java.io.IOException: The filename, directory name, or volume label syntax is incorrect Jun 07, 2013 5:10:14 AM org.oyrm.kobo.postproc.KoboSurveyDeviceSynchronizer doInBackground WARNING: java.io.IOException: The filename, directory name, or volume label syntax is incorrect Jun 07, 2013 5:10:14 AM org.oyrm.kobo.postproc.KoboSurveyDeviceSynchronizer done() FINER: ENTRY Jun 07, 2013 5:10:14 AM org.oyrm.kobo.postproc.KoboSurveyDeviceSynchronizer done() FINER: RETURN

What is the expected output? We expected to see the Forms aggregated total increase by 1

What do you see instead? There is an Exception when the software attempts to create a directory with a name containing colons. A dialog box appears on screen but disappears before we had time to see what it contained. We could see that the file had not been aggregated.

What version of the product are you using? The jar file I'm using (and my daughter) is KoboSync_0.93.1.jar

On what operating system? My daughter is using Windows 7, and I'm on Windows XP SP3 Please provide any additional information below. For the post processing I think you could probably just strip the colons from the deviceid to build the directory name. I don't know what othere areas the colons might affect with your other components (syncing etc ) so it probably wouldn't be a good idea to store the deviceid without the colons. I suppose a mirror class member to use for directory naming etc could be added and have an os friendly content, but that might be more overhead than you need.

I'm very impressed with your products and the flexibility they provide, though my daughter had problems building forms and switched to ODK Collect for that.

Keep up the excellent work.

Attachment: newhouse_2013-06-05_15-39-05.xml kobo.log

Original issue: http://code.google.com/p/kobo/issues/detail?id=115

Dylan-Gillespie commented 11 years ago

From gsrz...@gmail.com on June 12, 2013 23:33:10

I updated the KoboSurveyDeviceSynchronizer.java so that when the deviceid text was retrieved I removed the ':'s if there were any, and all of the forms were processed successfully.

My updated file is attached.

Attachment: KoboSurveyDeviceSynchronizer.java