Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Invalid url error when pulling data from server #695

Closed
lincmba opened this issue Jan 9, 2019 · 7 comments
Closed

Invalid url error when pulling data from server #695

lincmba opened this issue Jan 9, 2019 · 7 comments
Assignees
Labels

Comments

@lincmba
Copy link

lincmba commented Jan 9, 2019

Software versions

from Briefcase v1.11.0 to v1.13.1

Problem description

Pulling data from the server fails. Here's the detailed status

Fetching form definition resolving against briefcase form definitions Fetching form manifest Error fetching form definition: Fetch of manifest failed. Detailed reason: Invalid url. Failed with error: no protocol: . Did you forget to prefix the address with 'http://' or 'https://' ?

Only one of the two api calls are made to the server.

Steps to reproduce the problem

Configure briefcase with Aggregate Server
Provide right credentials to an account with forms
Pull form

Expected behavior

Should pull forms with the final status 'SUCCESS'

@ggalmazor
Copy link
Contributor

Thanks for reporting this issue, @lincmba!

Could you add the URL are you trying to use? Also, could you attach the briefcase.log file?

@lincmba
Copy link
Author

lincmba commented Jan 9, 2019

@ggalmazor , thanks for the quick response.

The url is https://odk.ona.io/{username}/
Sorry, I can't get the briefcase.log Here is a log of the api requests made.

For <v1.10
[09/Jan/2019 02:58:24] "GET /lincolnsimba/forms/30/form.xml HTTP/1.1" 200 3244
[09/Jan/2019 02:58:24] "GET /lincolnsimba/view/submissionList?formId=look5&cursor=&numEntries=100 HTTP/1.1" 200 134
[09/Jan/2019 02:58:24] "GET /lincolnsimba/view/submissionList?formId=look5&cursor=0&numEntries=100 HTTP/1.1" 200 134

For later versions
[09/Jan/2019 02:57:01] "GET /lincolnsimba/forms/30/form.xml HTTP/1.1" 200 3244

@ukanga
Copy link
Contributor

ukanga commented Jan 9, 2019

@lincmba I see this seems only to happen when the form in formList has an empty tag

<xform>
   <formID>south</formID>
   <name>south</name>
   <version>201709072011</version>
   <hash>md5:cbddab1c170b3406ee4bbfac3b89cb4a</hash>
   <descriptionText />
   <downloadUrl>https://odk.ona.io/..../form.xml</downloadUrl>
   <manifestUrl />
</xform>

Propably the approach we should take on the onadata side is not include the <manifestUrl /> at all if there are no manifest files for that form.

<xform>
   <formID>south</formID>
   <name>south</name>
   <version>201709072011</version>
   <hash>md5:cbddab1c170b3406ee4bbfac3b89cb4a</hash>
   <downloadUrl>https://odk.ona.io/..../form.xml</downloadUrl>
</xform>

@ggalmazor What I am wondering, should ODK Briefcase bulk at empty XML tags e.g <manifestUrl />?

@lincmba
Copy link
Author

lincmba commented Jan 9, 2019

Here's the briefcase.log file
briefcase.log

@ggalmazor
Copy link
Contributor

Thanks @lincmba and @ukanga!

I think Briefcase expects a non-empty manifestUrl tag. I'll check this and get back to you. In any case, if this is happening, I think we should make Briefcase support empty manifest urls.

@ggalmazor ggalmazor self-assigned this Jan 14, 2019
@ggalmazor ggalmazor added this to the v1.14.0 milestone Jan 14, 2019
@lincmba
Copy link
Author

lincmba commented Jan 14, 2019

@ggalmazor Here are detailed steps to reproduce this:

On Onadata

  • Create an account at https://odk.ona.io/
  • Upload a form without media files (I have attached one pizza_questionaire.xlsx)

On Briefcase

  • Configure the aggregate server with this url https://odk.ona.io/{username}
  • Pull form

pizza_questionnaire.xlsx

@ggalmazor
Copy link
Contributor

@lincmba,

I've sent #704 to make Briefcase ignore empty manifest tags in the form's XML, but I can't really reproduce the error you're reporting following your steps list.

Could you verify that this is still happening?

Maybe Ona has changed something and now there's no manifest url tag in the response. Can you confirm this, @ukanga?

@ggalmazor ggalmazor removed this from the v1.14.0 milestone Feb 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants