What app is this about, and its version: Planka v2.1.1
What YunoHost version are you running: YunoHost 13 Trixie
What type of hardware are you using: VPS bought online
Describe your issue
Hi again,
after having problems with the installation of planka, I now have an issue when using the application itself ![]()
I started using the application and after a while, I tried adding an attachment to a card in a board. The feature is available when editing a card and allows to pin arbitrary files which is quite handy.
Something weird happened at that point, which is that I’m getting kicked from the application and sent back to the login page. Tried a few times with different files (and file types), always the same behaviour.
Investigation in the browser showed up that the call being made in the background from the client to the server is of type post :
POST /api/cards/1834873798856279054/attachments ...
and after doing the call an error shows up in the browser in javascript, being the following one :
Object { code: "E_UNAUTHORIZED", message: "Access token is missing, invalid or expired" }
This is interesting, because I didn’t see any notion of authorization in the application, apart from being part of a project and a board. I’m also editing my own cards, so that shouldn’t be a problem.
In order to have more information regarding the issue, first I started looking at the logs of the applications.
I noticed that in nginx, I had a few issues related to the size of the body that is sent by the client; this one is pretty common, and I fixed it by increasing the client_max_body_size setting for the domain of the application.
That did remove the errors in nginx apparently, but still no luck on the main issue.
When looking at the logs of the planka service, unfortunately there is no error related to this issue that would help understand what is going on.
From that point, my guess is that it is either :
- an issue on the server side where the application is unable to write the attachment object on the disk
- a real authentication issue with the content of the request
Investigating point 1), I noticed from reading the scripts of the ynh package that the attachments are expected to be stored in the application folder, somewhere between a private/attachments and a data/attachmentsfolder. I created all the folders I could find in documentation, thinking that the application may need the folders created in advance for the storage to work properly.
All the folders I created were done under the user of the application, with rights being 750; since I found a publicfolder in the installation folder of the application, I copied all the settings to recreate the same configuration for the private/attachmentsfolder and so on. But… that didn’t help ![]()
Not sure if this really the issue, but I can see in the repo of the planka application that when they execute the application in docker, they do specify a destination folder for attachments, so maybe something is missing here in order to have the application writing files on disk properly.
Moving on to investigations on point 2), I tried to compare in my browser the calls to my planka instance and the demo instance, since attachments are functional in the demo of the app.
The calls were pretty close, they do contain the authorization token and so on, except that on the yunohost instance the call would also has a yunohost token as part of the cookie; this is expected since it is related to the SSO feature of yunohost. Just in case this would confuse the application, I disabled the SSO on the page by running :
sudo yunohost app setting planka unprotected_uris -v "/"
That did modify the behaviour of the browser, which now does a call with exactly the same informations as the ones sent to the demo instance, but… still no luck
I wonder if this authorization error is a legit one, or if it is not hiding another issue like the point 1)
Anyway, now I’m stuck in my investigation without a solution. I think this would require more knowledge on how the application works, but I’m unable to find the information.
Any help appreciated on this ![]()
Thanks,
Share relevant logs or error messages
No error in the logs of the application; in the browser, the following error appears in javascript :
Object { code: "E_UNAUTHORIZED", message: "Access token is missing, invalid or expired" }
When looking at nginx logs, this seems to be interpreted as a 401 unauthorized error :
"POST /api/cards/1839255728880092314/attachments?requestId=local:1786447976900-0000 HTTP/2.0" 401 81 "https://planka.xxx.yyy/cards/1839255728880092314" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:153.0) Gecko/20100101 Firefox/153.0"
