Nginx 404 upon requesting Enketo preview on existing forms

1. What is the issue? Please be detailed.

When opening a preview from an ODK deployment on K8S with an imported database, The nginx service returns a 404 with existing projects and forms.
After creating a new project and form and trying to open this every works fine. Also creating a new draft and previewing this works fine but not anymore if the draft has been saved.

2. What steps can we take to reproduce this issue?

  • Deploy an empty ODK Stack
  • Import a existing database
  • Open any form from any project

3. What have you tried to fix the issue?

We tried using the original encryption key, less secure encryption key and api key.
We tried to discover the difference between existing projects/forms and newly created onces.

4. Upload any test forms or screenshots below.

This is the nginx logging of a failed enketoo form:


nginx-798f88967-wqkmf nginx 10.244.110.136 - - [23/Nov/2022:15:13:05 +0000] "GET /-/css/theme-kobo.css HTTP/1.1" 304 0 "https:/xxx/-/preview/UmXHPCRRUxn2M7kY3OK1jcR5LyYxR3u" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0" nginx-798f88967-wqkmf nginx 10.244.110.136 - - [23/Nov/2022:15:13:05 +0000] "GET /-/fonts/OpenSans-Bold-webfont.woff HTTP/1.1" 304 0 "https://xxxl/-/preview/UmXHPCRRUxn2M7kY3OK1jcR5LyYxR3u" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0" nginx-798f88967-wqkmf nginx 10.244.110.136 - - [23/Nov/2022:15:13:05 +0000] "GET /-/fonts/OpenSans-Regular-webfont.woff HTTP/1.1" 304 0 "https://xxx/-/preview/UmXHPCRRUxn2M7kY3OK1jcR5LyYxR3u" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0" nginx-798f88967-wqkmf nginx 10.244.110.136 - - [23/Nov/2022:15:13:05 +0000] "GET /-/fonts/fontawesome-webfont.woff?v=4.6.2 HTTP/1.1" 304 0 "https://xxx/-/preview/UmXHPCRRUxn2M7kY3OK1jcR5LyYxR3u" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0" nginx-798f88967-wqkmf nginx 10.244.110.136 - - [23/Nov/2022:15:13:05 +0000] "GET /-/js/build/enketo-webform.js HTTP/1.1" 304 0 "https://xxx/-/preview/UmXHPCRRUxn2M7kY3OK1jcR5LyYxR3u" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0" nginx-798f88967-wqkmf nginx 10.244.110.136 - - [23/Nov/2022:15:13:05 +0000] "GET /-/css/theme-kobo.print.css HTTP/1.1" 200 2500 "https://xxx/-/preview/UmXHPCRRUxn2M7kY3OK1jcR5LyYxR3u" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0" nginx-798f88967-wqkmf nginx 10.244.110.136 - - [23/Nov/2022:15:13:05 +0000] "GET /-/locales/build/en/translation-combined.json HTTP/1.1" 304 0 "https://xxx/-/preview/UmXHPCRRUxn2M7kY3OK1jcR5LyYxR3u" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0" nginx-798f88967-wqkmf nginx 10.244.110.136 - - [23/Nov/2022:15:13:05 +0000] "POST /-/transform/xform/UmXHPCRRUxn2M7kY3OK1jcR5LyYxR3u HTTP/1.1" 404 67 "https://xxx/-/preview/UmXHPCRRUxn2M7kY3OK1jcR5LyYxR3u" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0"