My browser says (in F12 console of firefox):

SyntaxError client.js:2:1170023
    hw https://лемми.опенсорс.рус/static/0799f19b/js/client.js:2

the file starts with

/*! For license information please see client.js.LICENSE.txt */
(()=>{var e,t,n,r,o={45850:(e,t,n)=>{"use strict";n.d(t,

and DeepSeek says that e,t,n,r,o should be separated by spaces, i.e. e, t, n, r, o

The lemmy.ml instance adds that image without problems.

all 11 comments

sorted by: hot top controversial new old
[–] 1 point 3 months ago* (last edited 3 months ago) (10 children)

Wonderful day!
The actual script file is minified. And we may see the actual position the error points to: 2:1170023.
That is the second line and 1170023 character on that line. If we check it out manually, we may see the following, from 1169975 to 1170025 character positions:

(r.state=u({},r.state,{form:u({},r.state.form,d)}))

hw mentioned in the error is probably the following function:

function hw(e,t){var n;t.target?(t.preventDefault(),n=t.target.files[0]):n=t,e.setState({imageLoading:!0}),Ln.client.uploadImage({image:n}).then((function(t){"success"===t.state?"ok"===t.data.msg?(e.state.form.url=t.data.url,e.setState({imageLoading:!1,imageDeleteUrl:t.data.delete_url})):"too_large"===t.data.msg?bo(po.i18n.t("upload_too_large"),"danger"):bo(JSON.stringify(t),"danger"):"failed"===t.state&&(console.error(t.err.name),bo(t.err.name,"danger"),e.setState({imageLoading:!1}))}))}

Yet, these two are valid in terms of JavaScript syntax.


Meanwhile, DeepSeek states utter nonsense. The space is not required in JavaScript declarations. You may check it yourself:

var e,t,n=1,r,o=2; console.log({e,t,n,r,o});
// {e: undefined, t: undefined, n: 1, r: undefined, o: 2}
  • source
  • hideshow 10 child comments
  • [–] [S] 0 points 3 months ago (9 children)

    Ok, what I should do to fix the "Syntax Error" message during image uploading?

  • source
  • parent
  • hideshow 9 child comments
  • [–] 0 points 3 months ago* (8 children)

    I would start by deploying non-minified scripts, and with the error/exception thown, set breakpoint in the previous stacktrace step. Then, reload/repeat, and follow the logic step by step until the exception stage.

  • source
  • parent
  • hideshow 8 child comments
  • [–] [S] 0 points 3 months ago* (7 children)

    It's a bit illogical. I have exactly the same version as lemmy.ml. But their instance works, and mine - doesn't.

    BE: 0.19.19

  • source
  • parent
  • hideshow 7 child comments
  • [–] 0 points 3 months ago* (6 children)
  • [–] [S] 1 point 3 months ago (5 children)

    I don't know is it related or not. I have only one container instead of two, and I use Firefox instead of Chromium. Theoretically it's possible that there is no enough access rights for images data volume, but I didn't checked that yet (and in this case the error message is not clear and helpfull).

  • source
  • parent
  • hideshow 5 child comments
  • [–] 1 point 3 months ago* (last edited 3 months ago) (4 children)

    Yes, indeed! Please do check out the volume (bind-)mount permissions of the container.
    Weird, that someone unknown downvoted our messages. Perhaps, the person has life issues, unfortunately...

  • source
  • parent
  • hideshow 4 child comments
  • [–] [S] 2 points 3 months ago* (last edited 3 months ago) (2 children)

    the problem was in reverse proxy settings. but during the reconfiguration process i also switched the setup from files to minio and from sled (pict-rs relies on an embedded key-value store called sled to store metadata) to postgres

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 3 months ago* (1 child)

    It works! Hurray! Hurray! Awesomely done!
    Thank you for the response!

    Just in case, though the project is great, Minio is known to have issues in management, unfortunately.
    Please check the following:
    - https://redd.it/1pd97nq (It seems the project has come to an abrupt halt...) [2025-12-03]

    Have you considered the time-verified Redis for key/value storage?

  • source
  • parent
  • hideshow 1 child comment
  • Have you considered the time-verified Redis for key/value storage?

    I prefer to keep the setup as it is now. But if I will need k/v storage next time, I will use something else. And then, when it will be time to upgrade, i will migrate from minio to next choice. Or, just drop this setup and create a new one.

  • source
  • parent