Tangerine-Community / Tangerine

Digitize your offline data collection. Create your Forms online with Tangerine Editor, conduct them offline with the Tangerine Android App. All results you collect can be exported as a CSV file, easy for processing in a spreadsheet. Tangerine has been used in over 1 million assessments and surveys in over 60 countries and in 100 languages.
http://www.tangerinecentral.org/
GNU General Public License v3.0
51 stars 30 forks source link

CSV does not process new results (fail) #3668

Closed lachko closed 11 months ago

lachko commented 12 months ago

2023-11-30T12:14:02.106Z DEBUG Object.batch (/tangerine/server/src/reporting/reporting-worker.js:186:15) Processing a batch of 8 changes from seq: 47-g1AAAAIfeJyV0d0NgjAQAOBGUDDGGXSEghTpk2yiLW2DBNsH9Vk30U10E90E-0NiQqKBl2tyuftyd60BAGHpMTCXSirGc6lKdTzVOj0igC6apqlKjwQHnQgwxtGK4W7xj3a61JFuWsG3AiMZXJOir5AbYdsKoZtBxEXCaV9hZ4RLK0yswClGlCQ9BenrCK760cjNKGOrpBgxLLJByt0pj-8scUQSDuEg5emUl1GAVVAcCcT1RtOzZFzsJWd_hbcT7E1m7l8gFqkQ3Z7qA-d7prE with a batchSizePerDatabase of 200

CSV generation - using older userProfileId as key instead of tangerineModifiedByUserId: undefined

Error: (node:29) UnhandledPromiseRejectionWarning: ReferenceError: safeKey is not defined at /tangerine/server/src/modules/csv/index.js:541:37 at Array.forEach () at /tangerine/server/src/modules/csv/index.js:537:31 at processTicksAndRejections (internal/process/task_queues.js:95:5) (Use node --trace-warnings ... to show where the warning was created)

Error: (node:29) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:29) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

lachko commented 12 months ago

It looks like this line was removed and safeKey not initialized : let safeKey = key.replace('form-0.', '')

esurface commented 12 months ago

Fixing in v3.10.1-rc-14