mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-03-11 17:48:44 -05:00
[Question] When I upload images to list's description, error happen #7
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rogerBridge on GitHub (Jun 9, 2021).
Hello Sir, your vikunja is really a fantastic app, recently, while using your app, I found a bug, when I upload image file to list's description, a bug will happen, in browser console:


In frontend:
my platform:
client: linux x86 64, firefox 89.0;
server: docker-compose, follow your website's example;
If you need more info about this situation, please tell me : )
could u help me deal with this question? Thank you Sir!
@rogerBridge commented on GitHub (Jun 9, 2021):
PS: this error msg is circulate print in browser console
@kolaente commented on GitHub (Jun 10, 2021):
Hi :)
What Vikunja version is that? (There should be a message in the browser console)
Can you reproduce this on try?
@rogerBridge commented on GitHub (Jun 10, 2021):
Hello Sir:


This is the frontend version: Vikunja frontend version 0.17.0+47-34ded051d1,
Sir, when I upload image file to "try", I found a error existed, show below:
Thanks for response : )
@kolaente commented on GitHub (Jun 10, 2021):
That's odd - works for me on try (at least for tasks).
Does the error also occur in a private tab with all caches cleared?
@rogerBridge commented on GitHub (Jun 11, 2021):
I just retest it on "try", it worked, I guess maybe some static asset load error yesterday, the same time, I found a small issue, I add a list called: "test_list", and add a item called: "test_image_upload", when I click the attachment, it looks like miss token in request header so the api call is rejected by api server
@rogerBridge commented on GitHub (Jun 11, 2021):
"e is not defined" error message still exist in my environment, I guess maybe I did something wrong, I follow majority of your instruct on vikunja website: "nginx -> (api + frontend)", but I add a layer, "caddy -> nginx -> (api + frontend)", I just use caddy point to nginx's port, just like: nginx associate local 127.0.0.1:8000, and caddy as a reverse proxy point to 127.0.0.1:8000(because caddy had very easy let's encrypt certificate apply and I had some app use caddy, I want make all of them in one place), I will visit nginx only as reverse proxy and try it later
@kolaente commented on GitHub (Jun 11, 2021):
Anything in the server logs? Is the file created correctly in the db and on disk?
If you're running with docker behind caddy, you might want to check out the caddy proxy examples.
@rogerBridge commented on GitHub (Jun 11, 2021):
Sir, I am sorry for my bad English and my bad expression, "try" is try, it is your website, so I could not know the server logs.
Thanks, Sir, I will follow your instruct to check out "the caddy proxy examples"
@rogerBridge commented on GitHub (Jun 11, 2021):
Sir, I followed your instruct, and I update all vikunja images(vikunja/api:latest + vikunja/frontend:latest) and the issue still exists;
my docker-compose yml:
my Caddyfile is:
While upload images failed, the vikunja/api log is:
because I enable the firefox's resist browser fingerprint option, so the request header is wrong.
I guess the issue is when file create, vikunja/api face a permission question, but why it happend? I don't know : (
almost everything works fine, except upload images, if you need more log, please tell me, thanks Sir : )
@kolaente commented on GitHub (Jun 11, 2021):
Nothing to worry about, I'm not a native english speaker myself so I know that very well 🙂
I've looked at the list and task you created on try and the attachment was uploaded just fine. I can access it when clicking on it in the list, embedding works as well when adding a
!in front of the generated markdown code when uploading through the editor (That's an upstream bug in the editor itself).The configuration looks fine to me. It looks like you're able to access the frontend and upload files even though uploading itself fails. That means the caddy configuration is working fine.
About the permission error: The files folder you mounted to store the attachments (and other things) needs to be accessible to the user and group with the id 1000 for Vikunja to have access to it. Try running
chown 1000:1000 ./files -Rin the directory where the compose file is stored. After that, restart the container and try uploading an attachment again.You can could change the uid and gid to match the value of some other user on your host system: https://vikunja.io/docs/install-backend/#files-volume
@rogerBridge commented on GitHub (Jun 11, 2021):
Wow, it worked, Thanks, Sir, and I have a question, I had add docker to sudo group, so if its permisson group is: root:root, it should has permission to store file in my home directory, why it can't? did it say: docker usergroup is just docker usergroup, it is not root:root, it is just docker:docker and equal to user:user, not equal to root:root, so it has not permission to store file in user:user's folder, is it right? if so, why vikunja/db can store file in my home directory? I can't understand it 😂
ps: just a irrelavant question
@kolaente commented on GitHub (Jun 11, 2021):
While the docker daemon runs as root, Vikunja itself does not. Vikunja runs as
1000:1000so if it wants to store files somewhere they have to be accessible to that user. I think you got the gist of it 🙂There's a bit more info about docker's permission model here: https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
I'm going to close this issue as your problem got resolved. Feel free to open a new one if you have other issues or check out the forum.
@rogerBridge commented on GitHub (Jun 11, 2021):
I found something in vikunja/api Dockerfile:
I guess it is the answer, I am wrong before, it associate docker usergroup and host usergroup;
thank you, Sir : )