Coder Social home page Coder Social logo

Comments (3)

MikeTschudi avatar MikeTschudi commented on June 28, 2024

This error occurs because we replace the contents of the text files in the survey configuration zip file. While this is implemented in order to swizzle the contents, no modification of the contents is needed to replicate this bug: we simply read and replace text files. While the XLSX file is also read, it is not replaced back into the zip--it is left alone.

from solution.js.

chris-fox avatar chris-fox commented on June 28, 2024

This is occurring because the date timestamps for the files are showing in the future for some files. See the screenshot below, I just took this picture and the timestamps for the Sign Request.xml file is showing as tomorrow. Survey123 Connect compares the timestamp of the xlsx file with this .xml file. If the xlsx file has a modification date newer than the xml file then it refreshes the xml file from the xlsx definition. Because the timestamp of the xml appears newer than the xlsx even after I save it doesn't refresh.

image

The update forces the xml to update and its timestamp is updated to now as a result. Is there anything we can do to control the timestamp of these files when we replace these files in the zip? Not sure if this is some UTC offset going on here.

from solution.js.

MikeTschudi avatar MikeTschudi commented on June 28, 2024

Thank you, @chris-fox, for discovering this.

I'm marking every file with the same time.

  • xlsx earlier than xml causes this issue as you discovered
  • xlsx later than xml causes infinite loop asking if we want to update the survey
  • xlsx with same date as xml works

S123 does something strange while unzipping, however: it adds the UTC offset to all files except the PNG and .itemInfo files. This puts the XLSX file hours into the future west of the prime meridian, thus breaking the update.

Merely correcting for UTC offset for all files leads to S123 to unzip all files to be approximately the same time, but all files except the PNG and .itemInfo files are one day in the future.

Merely subtracting one day for all files has the same effect as setting all files to deployment time.

Correcting for UTC offset and subtracting one day seems to be the solution.

from solution.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.