Vikunja data import on self-hosted install gets a 502 Bad Gateway

That’s correct.

There have been issues in the past with importing attachments from Trello. This has been solved by now though, and all attachments get pulled in correctly. After a migration, they are saved in Vikunja itself. When exporting them, Vikunja does not get them from Trello. Maybe that’s coming from there but in that case, there shouldn’t be these “shells” of files lingering around - the file would just not exist at all with no traces of it.

Can you check for one of the missing files (via the Task ID of the attachment belonging to the file) if the attachment is available and downloadable in the web ui?

And out of curiosity, if you export multiple times, do you always get the same missing files?

I’m not sure I follow - I don’t think they’re in Vikunja Cloud. I see no indication that the tasks in question have any kind of attachment. I pulled up a task in the API that I expected to have an attachment and the attachments property is null.

When I ran a Postman request to get one of the files the Vikunja Cloud export referenced but that didn’t exist in files/, Vikunja Cloud replied:

{
    "code": 4011,
    "message": "This task attachment does not exist."
}

I was able to run a request to an attachment I saw in the browser, so I don’t think the problem was with my request.

Does that answer your questions?

Thank you!

If the attachment does not show up when you open the task in the Vikunja frontend, there is no attachment. Can you check if you’re able to open and download an attachment which does not have a file in the export? Make sure to use the attachment id in the request, not the file id.

You’re right. I was using the wrong ID. The attachment I chose at random that appears in the export’s data.json document but not in files/ appears in Postman. The browser says "missing or malformed jwt", in case that’s meaningful to you.

Amusingly (at least, it amused me), I took a look at that random attachment and realized I’d apparently accidentally archived an entire workspace :person_facepalming: Un-archiving it didn’t change the import situation, but at least I’m not sitting here going, “I swear I had a board for…”

Thoughts on what I should try next?

Many thanks!

You mean in the files folder? What are you using Postman here for?

I was just using Postman so it would remember relevant URLs for me.

Yes, the files folder :slight_smile:

The file id or the attachment id?

At least if the file does not exist that would explain why it does not show up in the export.

attachment.id was the one that returned the expected result.

New but not a whole lot better behavior! Hooray for progress! It reports success and sends back a 200, and the missing namespaces are present, but there are no lists in any of the namespaces that are new to it.

I exported anew tonight. Did you by any chance change something in the export code that might have accounted for the new behavior? Should I pull a new Docker image on the server I’m running?

I haven’t take a detailed look at the latest export. The number of attachments is about consistent with what I was seeing above. Should I investigate further?

Thank you!

There have been some changes, most notably the renaming of lists to projects. That’s not yet in a stable release though, are you running unstable?

I’m running the tag latest.

docker pull vikunja/frontend says “Image is up to date for vikunja/frontend:latest”. Likewise for vikunja/api.

I’m not very good with Docker, so let me know if that’s not the command for the job.

Thanks again!

latest is the correct one for the last release. Were you exporting and importing from the same instance?

No, I was going from the cloud instance to one I host on my own server.

The cloud instance runs a newer version than the last release. Since migrating between versions is only possible between instances running the same version, that’s probably where the problem is. You can check the version currently running on Vikunja Cloud in the “about” dialogue accessible through the user menu on the top right.

If the Cloud version is newer than the latest release, is there a way to put the one I host the same version as the cloud one so I can run the import?

My server says reports that it’s running frontend 0.20.5 and API v0.20.4. Cloud (as you probably know) says Frontend Version: 0.20.5+186-8555006d9e and API Version: v0.20.4+95-7ad256f6cd.

Try the unstable build, that should work.

It did! Hooray! This made my day! Thank you!

1 Like

Awesome! Glad it works for you now.