Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms from Ona accounts appear to always have new versions available #2203

Closed
lognaturel opened this issue May 14, 2018 · 9 comments
Closed

Comments

@lognaturel
Copy link
Member

Following up from #2095 (comment)

@ukanga and @jasonrogena have verified that the formList response doesn't have any differences. This happens with forms that don't have any attachments (and thus no manifestUrl).

@lognaturel
Copy link
Member Author

I can't reproduce from https://ona.io/lognaturel/. I downloaded the form with ID timestamp-tests to Collect, then verified that no new version was shown as available from Get Blank Form. Then I added a media attachment and verified that a new version was shown as available from Get Blank Form. I downloaded that new version and then verified no new version was shown as available from Get Blank Form.

@grzesiek2010
Copy link
Member

grzesiek2010 commented May 15, 2018

I asked @ukanga about xformsList #2095 (comment) because I'm curious what value we receive: For example in our (ODK Aggregate) case it's:
<hash>md5:29a492009d35c1515886ddd307521819</hash>
Is it possible that ONA sends the same hash but without md5: prefix?

@ukanga
Copy link

ukanga commented May 15, 2018

@grzesiek2010
Copy link
Member

@lognaturel

yes but @lognaturel is not able to reproduce the issue so I'm asking about your instance. Could you share it also?

@ukanga
Copy link

ukanga commented May 15, 2018

@grzesiek2010 Check https://odk.ona.io/ukd/formList, the form with the name idm.

@lognaturel
Copy link
Member Author

lognaturel commented May 15, 2018

I don't see a form with name idm. Any chance there could be something different going on with private forms? I haven't tried one of those.

Are all the forms in your account showing that updates are available or only some? If it doesn't seem to be a private/public issue, any other pattern you can see?

@grzesiek2010
Copy link
Member

grzesiek2010 commented May 17, 2018

I made a quick test:

  1. Go to https://odk.ona.io/ukd/formList
    The first form is:
<xform>
<formID>a9h6EeMhbM9BXj8BYaGej2</formID>
<name>idm</name>
<version/>
<hash>md5:8384506fd51c00a94a6c30074fca1e96</hash>
<descriptionText/>
<downloadUrl>https://odk.ona.io/ukd/forms/305256/form.xml</downloadUrl>
<manifestUrl/>
</xform>
  1. Download the firs form using downloadUrl: https://odk.ona.io/ukd/forms/305256/form.xm
  2. Calculate md5 hash using an online tool like http://onlinemd5.com/
  3. My result is: C08154A4E4F23C4A9E0DAC009FC2ABAF but the hash recived (and visible above) is 8384506fd51c00a94a6c30074fca1e96

Then I performed the same steps using lognaturel's https://ona.io/lognaturel/formList using also the first form:

<xform>
<formID>geowidgets-demo</formID>
<name>Geowidgets Demo</name>
<version>201702161003</version>
<hash>md5:99f85297be2c2ea9fbc90fbd09b8d74f</hash>
<descriptionText/>
<downloadUrl>https://ona.io/lognaturel/forms/182486/form.xml</downloadUrl>
<manifestUrl/>
</xform>

After downloading and calculating md5 hash it's the same like the recived one.

So looks as if there is something wrong on the ONA's side with calculating md5 hashes since in the first case hashes are not equal.

@jasonrogena
Copy link

The issue was with how Onadata generates the MD5 hash for the xform (onaio/onadata#1417) which @ukanga has just fixed.

I think this issue can be closed.

@lognaturel
Copy link
Member Author

lognaturel commented May 22, 2018

Thank you for the detective work, @grzesiek2010 -- was good to get those repro steps. 🔎

And great to know it's fixed for Ona users, @jasonrogena and @ukanga!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants