{"action":"opened","issue":{"url":"https://api.github.com/repos/kobotoolbox/kobocat/issues/474","repository_url":"https://api.github.com/repos/kobotoolbox/kobocat","labels_url":"https://api.github.com/repos/kobotoolbox/kobocat/issues/474/labels{/name}","comments_url":"https://api.github.com/repos/kobotoolbox/kobocat/issues/474/comments","events_url":"https://api.github.com/repos/kobotoolbox/kobocat/issues/474/events","html_url":"https://github.com/kobotoolbox/kobocat/issues/474","id":348759325,"node_id":"MDU6SXNzdWUzNDg3NTkzMjU=","number":474,"title":"Cannot deploy forms or launch Enketo with local HTTPS","user":{"login":"Humblehound","id":5132069,"node_id":"MDQ6VXNlcjUxMzIwNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/5132069?v=4","gravatar_id":"","url":"https://api.github.com/users/Humblehound","html_url":"https://github.com/Humblehound","followers_url":"https://api.github.com/users/Humblehound/followers","following_url":"https://api.github.com/users/Humblehound/following{/other_user}","gists_url":"https://api.github.com/users/Humblehound/gists{/gist_id}","starred_url":"https://api.github.com/users/Humblehound/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Humblehound/subscriptions","organizations_url":"https://api.github.com/users/Humblehound/orgs","repos_url":"https://api.github.com/users/Humblehound/repos","events_url":"https://api.github.com/users/Humblehound/events{/privacy}","received_events_url":"https://api.github.com/users/Humblehound/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-08T14:47:00Z","updated_at":"2018-08-08T14:47:00Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI'm able to setup everything using local config. Once I use the server config, I've identified at least two issues:\r\n\r\n- Any attempt to open Enketo from Kobotoolbox fails (preview of a form or opening a submission)\r\n- More importantly, I'm unable to deploy a form (duplicate of [#162](https://github.com/kobotoolbox/kobo-docker/issues/162))\r\n\r\nAs in #162, I've verified that `koboform_surveydraft` is nonexistent in my database with the use of \r\n\r\n `SELECT (1) AS \"a\" FROM \"koboform_surveydraft\" LIMIT 1`. The postgres log contains the following errors:\r\n> 2018-08-08 14:32:59 GMT ERROR:  duplicate key value violates unique constraint \"kpi_assetsnapshot_asset_version_id_key\"\r\n> 2018-08-08 14:32:59 GMT DETAIL:  Key (asset_version_id)=(3) already exists.\r\n> 2018-08-08 14:32:59 GMT STATEMENT:  INSERT INTO \"kpi_assetsnapshot\" (\"xml\", \"source\", \"details\", \"owner_id\", \"asset_id\", \"_reversion_version_id\", \"asset_version_id\", \"date_created\", \"uid\") VALUES ('<?xml version=\"1.0\"?>\r\n> \t<h:html xmlns=\"http://www.w3.org/2002/xforms\" xmlns:ev=\"http://www.w3.org/2001/xml-events\" xmlns:h=\"http://www.w3.org/1999/xhtml\" xmlns:jr=\"http://openrosa.org/javarosa\" xmlns:orx=\"http://openrosa.org/xforms\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n> \t  <h:head>\r\n> \t    <h:title>tt</h:title>\r\n> \t    <model>\r\n> \t      <instance>\r\n> \t        <data id=\"snapshot_xml\">\r\n> \t          <start/>\r\n> \t          <end/>\r\n> \t          <t1/>\r\n> \t          <meta>\r\n> \t            <instanceID/>\r\n> \t          </meta>\r\n> \t        </data>\r\n> \t      </instance>\r\n> \t      <bind jr:preload=\"timestamp\" jr:preloadParams=\"start\" nodeset=\"/data/start\" type=\"dateTime\"/>\r\n> \t      <bind jr:preload=\"timestamp\" jr:preloadParams=\"end\" nodeset=\"/data/end\" type=\"dateTime\"/>\r\n> \t      <bind nodeset=\"/data/t1\" required=\"false()\" type=\"string\"/>\r\n> \t      <bind calculate=\"concat(''uuid:'', uuid())\" nodeset=\"/data/meta/instanceID\" readonly=\"true()\" type=\"string\"/>\r\n> \t    </model>\r\n> \t  </h:head>\r\n> \t  <h:body>\r\n> \t    <input ref=\"/data/t1\">\r\n> \t      <label>t1</label>\r\n> \t    </input>\r\n> \t  </h:body>\r\n> \t</h:html>\r\n> \t', '{\"translated\":[\"label\"],\"translations\":[null],\"schema\":\"1\",\"survey\":[{\"$autoname\":\"start\",\"type\":\"start\",\"name\":\"start\"},{\"$autoname\":\"end\",\"type\":\"end\",\"name\":\"end\"},{\"$autoname\":\"t1\",\"$kuid\":\"ha7vm49\",\"required\":false,\"type\":\"text\",\"label\":[\"t1\"]}],\"settings\":{\"form_title\":\"tt\"}}', '{\"status\":\"success\",\"warnings\":[]}', 1, 1, NULL, 3, '2018-08-08T14:32:59.259127+00:00'::timestamptz, 'sLvUQyCRBDoVWtJZBcJubb') RETURNING \"kpi_assetsnapshot\".\"id\"\r\n> Aug  8 14:35:01 postgres CRON[210]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)\r\n>2018-08-08 14:35:45 GMT ERROR:  relation \"koboform_surveydraft\" does not exist at character 24\r\n>2018-08-08 14:35:45 GMT STATEMENT:  SELECT (1) AS \"a\" FROM \"koboform_surveydraft\" LIMIT 1\r\n\r\nI've followed all the steps mentioned in the readme file.  I'm using the latest master version of kobo-docker. I analyzed the history of the bug, and I understand that this should be resolved in current versions of kpi and kobocat images. Now when it comes to Enketo, here's what I've verified so far:\r\n- Upon clicking deploy, a request gets sent to \r\n`https://forms.mydomain.coml/assets/agWfRiwDuuAv8z8hiarWKG/deployment/`\r\nThe database contains an entry with such `uid `in the` kpi_asset` table. The `content` column contains what looks like valid json. The response is `{\"detail\":\"No JSON object could be decoded\"}`\r\n\r\nI've enabled DJANGO_DEBUG for both kpi and kobocat. `docker-compose logs` does not log any errors upon submission. What's more `uwsgi.log` don't contain any errors at all (for both kpi and kobocat). The only trace of the error in in the access log of nginx. \r\n\r\nThe one thing which I should probably still do, is sign the certificate because currently it is self-signed. But I feel like this is unrelated, since I can access the rest of application normally.\r\n\r\nI'm on Ubuntu 18.04 LTS, Docker 18.03.1-ce, Linux 4.15.0-30-generic.\r\n\r\nPlease let me know what else could I do to debug this issue, I'll try using a signed certificate tomorrow.\r\n\r\n\r\n"}}
{"actor":{"display_login":"Humblehound"}}