"Export your Vikunja data" doesn't send email, looking for missing file in ' ./files/1' #1368

Closed
opened 2023-01-24 11:57:49 +00:00 by jbd7 · 2 comments

Description

Description : The Export function from Vikunja is not behaving as expected

Steps to reproduce

  • Log in Vikunja
  • Go to username -> Settings -> "Export your Vikunja data"
  • Enter valid password and enter
  • See a green message "Success You've successfully requested your Vikunja Data! We will send you an email once it's ready to download."

Actual behavior

  • Nothing happens in the FE, no email is received

Expected behavior

  • Email with link to downloadable data is sent, or
  • Vikunja throws an error, via FE or by email, that the data cannot be generated

Debugging info

The export files seem to be created correctly in this folder:

user@vps:/opt/vikunja/files$ ll
total 12K
drwxrwxr-x 3 vikunja vikunja_data 4.0K Jan 24 11:44 ./
drwxr-xr-x 5 vikunja vikunja_data 4.0K Jan 24 12:40 ../
drwxr-x--- 2 vikunja vikunja_data 4.0K Jan 24 12:38 user-export-tmp/

Inside user-export-tmp, I have multiple files of the format: 1_2023-01-24_12-12-51.zip. They are owned by root:root, while the folders, binary, .yml and .db files are owned by vikunja:vikunja_data, do I have permission issues? If this is the case, I'm still filing this as a bug because Vikunja looks for a file in a folder that doesn't exist.

Here is what I have in config.yml

files:
  # The path where files are stored
  basepath: ./files # relative to the binary
  # The maximum size of a file, as a human-readable string.
  # Warning: The max size is limited 2^64-1 bytes due to the underlying datatype
  maxsize: 20MB

Here are the last lines in events.log

^[[31m2023-01-24T12:38:51.464349357+01:00: ERROR        ▶ [EVENTS] 353e^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=2, max_retries=5, wait_time=305.702111ms, elapsed_time=624.695632ms
^[[31m2023-01-24T12:38:51.910413902+01:00: ERROR        ▶ [EVENTS] 3569^[[0m Error occurred, retrying: open ./files/1: no such file or directory, wait_time=362.323206ms, elapsed_time=1.070759454s, retry_no=3, max_retries=5
^[[31m2023-01-24T12:38:52.107605121+01:00: ERROR        ▶ [EVENTS] 3594^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=4, max_retries=5, wait_time=96.415282ms, elapsed_time=1.267956306s
^[[31m2023-01-24T12:38:54.562771023+01:00: ERROR        ▶ [EVENTS] 35bf^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=5, max_retries=5, wait_time=2.333817111s, elapsed_time=3.723122155s
^[[31m2023-01-24T12:44:31.278743206+01:00: ERROR        ▶ [EVENTS] 3692^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=1, max_retries=5, wait_time=25.086816ms, elapsed_time=140.374817ms
^[[31m2023-01-24T12:44:31.470516621+01:00: ERROR        ▶ [EVENTS] 36bd^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=2, max_retries=5, wait_time=93.208414ms, elapsed_time=332.148235ms
^[[31m2023-01-24T12:44:32.157897304+01:00: ERROR        ▶ [EVENTS] 36e8^[[0m Error occurred, retrying: open ./files/1: no such file or directory, elapsed_time=1.01952738s, retry_no=3, max_retries=5, wait_time=597.923046ms
^[[31m2023-01-24T12:44:32.681008593+01:00: ERROR        ▶ [EVENTS] 3713^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=4, max_retries=5, wait_time=419.076215ms, elapsed_time=1.542623063s
^[[31m2023-01-24T12:44:33.301317971+01:00: ERROR        ▶ [EVENTS] 373e^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=5, max_retries=5, wait_time=525.22478ms, elapsed_time=2.162932861s

Vikunja Frontend Version

0.20.2

Vikunja API Version

0.20.1

Browser and version

Latest Chrome on Windows, API is self hosted without docker.

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

### Description **Description** : The Export function from Vikunja is not behaving as expected **Steps to reproduce** - Log in Vikunja - Go to username -> Settings -> "Export your Vikunja data" - Enter valid password and enter - See a green message "Success You've successfully requested your Vikunja Data! We will send you an email once it's ready to download." **Actual behavior** - Nothing happens in the FE, no email is received **Expected behavior** - Email with link to downloadable data is sent, or - Vikunja throws an error, via FE or by email, that the data cannot be generated **Debugging info** The export files seem to be created correctly in this folder: ``` user@vps:/opt/vikunja/files$ ll total 12K drwxrwxr-x 3 vikunja vikunja_data 4.0K Jan 24 11:44 ./ drwxr-xr-x 5 vikunja vikunja_data 4.0K Jan 24 12:40 ../ drwxr-x--- 2 vikunja vikunja_data 4.0K Jan 24 12:38 user-export-tmp/ ``` Inside `user-export-tmp`, I have multiple files of the format: `1_2023-01-24_12-12-51.zip`. They are owned by root:root, while the folders, binary, .yml and .db files are owned by vikunja:vikunja_data, do I have permission issues? If this is the case, I'm still filing this as a bug because Vikunja looks for a file in a folder that doesn't exist. Here is what I have in config.yml ``` files: # The path where files are stored basepath: ./files # relative to the binary # The maximum size of a file, as a human-readable string. # Warning: The max size is limited 2^64-1 bytes due to the underlying datatype maxsize: 20MB ``` Here are the last lines in events.log ``` ^[[31m2023-01-24T12:38:51.464349357+01:00: ERROR ▶ [EVENTS] 353e^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=2, max_retries=5, wait_time=305.702111ms, elapsed_time=624.695632ms ^[[31m2023-01-24T12:38:51.910413902+01:00: ERROR ▶ [EVENTS] 3569^[[0m Error occurred, retrying: open ./files/1: no such file or directory, wait_time=362.323206ms, elapsed_time=1.070759454s, retry_no=3, max_retries=5 ^[[31m2023-01-24T12:38:52.107605121+01:00: ERROR ▶ [EVENTS] 3594^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=4, max_retries=5, wait_time=96.415282ms, elapsed_time=1.267956306s ^[[31m2023-01-24T12:38:54.562771023+01:00: ERROR ▶ [EVENTS] 35bf^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=5, max_retries=5, wait_time=2.333817111s, elapsed_time=3.723122155s ^[[31m2023-01-24T12:44:31.278743206+01:00: ERROR ▶ [EVENTS] 3692^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=1, max_retries=5, wait_time=25.086816ms, elapsed_time=140.374817ms ^[[31m2023-01-24T12:44:31.470516621+01:00: ERROR ▶ [EVENTS] 36bd^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=2, max_retries=5, wait_time=93.208414ms, elapsed_time=332.148235ms ^[[31m2023-01-24T12:44:32.157897304+01:00: ERROR ▶ [EVENTS] 36e8^[[0m Error occurred, retrying: open ./files/1: no such file or directory, elapsed_time=1.01952738s, retry_no=3, max_retries=5, wait_time=597.923046ms ^[[31m2023-01-24T12:44:32.681008593+01:00: ERROR ▶ [EVENTS] 3713^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=4, max_retries=5, wait_time=419.076215ms, elapsed_time=1.542623063s ^[[31m2023-01-24T12:44:33.301317971+01:00: ERROR ▶ [EVENTS] 373e^[[0m Error occurred, retrying: open ./files/1: no such file or directory, retry_no=5, max_retries=5, wait_time=525.22478ms, elapsed_time=2.162932861s ``` ### Vikunja Frontend Version 0.20.2 ### Vikunja API Version 0.20.1 ### Browser and version Latest Chrome on Windows, API is self hosted without docker. ### Can you reproduce the bug on the Vikunja demo site? No ### Screenshots _No response_
jbd7 added the
kind/bug
label 2023-01-24 11:57:49 +00:00
Owner

This looks like you uploaded a file (some way or the other) and then deleted the file on disk without removing the file entry. You need to remove the file entry with the ID 1 in the files table and the export should work.

This looks like you uploaded a file (some way or the other) and then deleted the file on disk without removing the file entry. You need to remove the file entry with the ID `1` in the `files` table and the export should work.
Author

Correct! I wouldn't have guessed that the Export feature was tired to the Upload attachments feature. And indeed, I hadn't noticed I had wiped out the contents of the /files folder by mistake. I restored them from a backup, didn't touch the DB, and things went back to normal.

(Note for posterity: The files in /files are numbered from 1, they include the backup archives, work fine when created as root:root and 644, and are matching the list in the files table in the DB. The contents of /files/user-export-tmp seem erased once the archive is created successfully in /files).

Thanks!

Correct! I wouldn't have guessed that the Export feature was tired to the Upload attachments feature. And indeed, I hadn't noticed I had wiped out the contents of the `/files` folder by mistake. I restored them from a backup, didn't touch the DB, and things went back to normal. (Note for posterity: The files in `/files` are numbered from 1, they include the backup archives, work fine when created as root:root and 644, and are matching the list in the `files` table in the DB. The contents of `/files/user-export-tmp` seem erased once the archive is created successfully in `/files`). Thanks!
jbd7 closed this issue 2023-01-25 15:14:40 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1368
No description provided.