Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Image upload Problems - [SyntaxError: Unexpected token 'R', "Request er"... is not valid JSON] #1489

Open
3 of 4 tasks
SuperContraptionGuy opened this issue Jun 22, 2023 · 5 comments
Labels
area: media bug Something isn't working

Comments

@SuperContraptionGuy
Copy link

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Is this a server side (not related to the UI) issue? Use the Lemmy back end repo.

Summary

Unable to upload images, as community icon, banner, or to attach to a post. When attaching an image to a new post, a red box appears a few seconds later with the error message:

SyntaxError: Unexpected token 'R', "Request er"... is not valid JSON

images of errors:
https://imgur.com/a/SG8Zh4D

Using Brave web browser.

Steps to Reproduce

  1. Press 'Create Post'
  2. Press the upload image icon.
  3. Choose an image and start the upload

Technical Details

Screenshot from 2023-06-22 15-27-55

Version

BE: 0.17.4

Lemmy Instance URL

https://lemmy.fmhy.ml/

@SuperContraptionGuy SuperContraptionGuy added the bug Something isn't working label Jun 22, 2023
@alectrocute
Copy link
Contributor

Possibly related to #1532.

@MichaelCharles
Copy link
Contributor

I'm having the same issue.

@MichaelCharles
Copy link
Contributor

When looking at the docker-compose log, this is what I see

lemmy-pictrs-1    | Error:
lemmy-pictrs-1    |    0: IO error: Permission denied (os error 13)
lemmy-pictrs-1    |
lemmy-pictrs-1    | Location:
lemmy-pictrs-1    |    src/repo.rs:447
lemmy-pictrs-1    |
lemmy-pictrs-1    |   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
lemmy-pictrs-1    |   <empty backtrace>
lemmy-pictrs-1    |
lemmy-pictrs-1    | Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
lemmy-pictrs-1 exited with code 1

@MichaelCharles
Copy link
Contributor

MichaelCharles commented Jun 29, 2023

In my case, I was able to resolve this by changing the user value under pictrs in my docker-compose.yml file from user: 991:991 to user: app:app.

@dcx
Copy link

dcx commented Jul 10, 2023

I'm experiencing this issue in 0.18.1, and it was working fine in 0.17.4.

Here's a bunch of my users confirming they have this issue.

I was getting the above error yesterday, but today it has started telling me "Picture deleted: <mypicture.png>"

(Edit: After a restart and possibly the 0.18.2 update, this has become clearer: we now see an error which says images were being rejected because they were >1mb)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: media bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants