Uploading an image to a task using the Android app causes internal server errors

Uploading an image to a task using the Android app causes internal server errors when attempting to load that project. Uploading the same image from the website doesn’t cause this problem. I will post the logs later today as I cannot access them until I get home.

Log: _vikunja_logs.txt ~ pixeldrain

There seems to be a file permission problem going on when uploading via the app. Below is an image of the permissions for the files. File “8” is the file that was uploaded using the app.

It doesn’t seem to be file permissions. Uploading a file using the website gives the file the same permissions, but doesn’t cause the error. File “9” below is has the same permissions as file “8” which is causing the problem, but its task doesn’t cause any problems.

Modifying the file permissions for file “8” to “777” still gives a permission error when attempting to view the project with the broken image. I suspect that the file entry is not being stored in the database correctly when uploaded using the app.

Fixing a permission error by making a file 777 is almost never the solution.

The app uses the same API to upload a file as the web does. In your logs, there’s another permission error, but for a SQL query on a task fetching endpoint - this seems to indicate something is broken elsewhere, not directly related to the file upload.

Which app version are you using? And where did you download it?

Does the same problem happen when you upload the same file from app and web?

I agree that 777 permissions is almost never the answer, but it is a great way to really quickly check if the problem is permissions related.

Version is 0.1.8-beta from Google Play.

Same image or different images doesn’t change much. When I use the same image the server detects that it is already uploaded and doesn’t save it. The server saves it when using a different image using the app. The images linked are in chronological order. I would have attached them, but the image limit is 1 for my account.

Also it may be preferable for the server not to fall over due to a missing image. :upside_down_face:

Another interesting thing to note is that when I delete the project the server successfully deletes the image file that it insists to have no I/O access to

Are you sure you’re talking about uploading and not downloading? Because the official app does not support uploading attachments to a task.

The image upload button is on the right most side of the description editor. See the attached image.

The image button in the editor doesn’t upload an attachment, it stores the image inline. This is a feature that’s provided by the editor package that we’re using in the app and does not use attachments.

I’ve just tried it with the demo instance, and it works without issues there. Does it work for you there as well?

Since there are multiple occasions of the i/o error: permission denied, not only related to attachments, I would guess that the problem is not with the attachment upload itself, but something else.

Yep, I definetly have something else going on. The demo worked fine. I will look deeper into everything when/if I get the time.