Cannot upload file pixelfed 0.12.3~ynh1

Hello, did install Pixelfed without issues, did create a admin, and could log in. But i can upload files, i choose a file to upload, and nothing happen. I have seen in this forum that other had have some premission issues, but those should be patched now, did also try to run “yunohost app upgrade pixelfed --force” but i still do have the same issue. version is 0.12.3~ynh1.

2 Likes

Having the same issue on the same version on a fresh install. I caught the following in Firefox console:

Uncaught (in promise) 
Object { 
  stack: "N@https://example.com/js/vendor.js?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1:3016833\n86425/Ie.xhr</</h/<@https://example.com/js/vendor.js?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1:3030780\nh@https://example.com/js/vendor.js?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1:3030925\n", 
  message: "Request failed with status code 500", 
  name: "AxiosError", 
  code: "ERR_BAD_RESPONSE", 
  config: Object { timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", … }, 
  request: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }, 
  response: Object { data: {…}, status: 500, statusText: "Internal Server Error", … } 
}

Network request details

XHRPOST
https://example.com/api/compose/v0/media/upload
[HTTP/2 500 Internal Server Error 148ms]

Database error, I think this is the biggest clue?

error 'SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "caption" of relation "media" violates not-null constraint\nDETAIL: Failing row contains (2, null, 729198241515671553, 1, public/m/_v2/729198241515671553/0e43b1202-69768b/nD57XxKZKUUy/tF..., null, null, null, null, 1, image/png, 619, null, null, 2024-08-14 05:08:20, 2024-08-14 05:08:20, null, null, null, 80886755e66219cbb3071b5b1a9a0f7797a190ad1b93f474f8c1660ed10650f5, null, null, null, null, null, null, null, f, 3, f, null, null, null, n…ll, null, null). (Connection: pgsql, SQL: insert into "media" ("status_id", "profile_id", "user_id", "media_path", "original_sha256", "size", "mime", "filter_class", "filter_name", "version", "updated_at", "created_at") values (?, 729198241515671553, 1, public/m/_v2/729198241515671553/0e43b1202-69768b/nD57XxKZKUUy/tFab8Z34uU9vybrQpPeQqRDmiJKgbsyu4vl1MsJF.png, 80886755e66219cbb3071b5b1a9a0f7797a190ad1b93f474f8c1660ed10650f5, 619, image/png, ?, ?, 3, 2024-08-14 05:08:20, 2024-08-14 05:08:20) returning "id")'

I tried running

ALTER TABLE media ALTER COLUMN caption DROP NOT NULL;

Which let me upload but the image was broken after doing so.

SweetAlert:

Uncaught (in promise) SweetAlert: 2nd argument ('undefined') is invalid
vendor.js:1:2562350
    throwErr https://example.com/js/vendor.js?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1
    d https://example.com/js/vendor.js?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1
    p https://example.com/js/vendor.js?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1
    getOpts https://example.com/js/vendor.js?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1
    forEach self-hosted:203
    getOpts https://example.com/js/vendor.js?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1
    s https://example.com/js/vendor.js?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1
    mediaUpload https://example.com/js/compose.chunk.47ba00abaa827b26.js:1
    (Async: promise callback)
    mediaUpload https://example.com/js/compose.chunk.47ba00abaa827b26.js:1
    forEach self-hosted:203
    mediaUpload https://example.com/js/compose.chunk.47ba00abaa827b26.js:1
    mediaWatcher https://example.com/js/compose.chunk.47ba00abaa827b26.js:1
    dispatch https://example.com/js/vendor.js?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1
    handle https://example.com/js/vendor.js?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1

Here’s what I’ve tried so far:

Logs
sudo journalctl -u pixelfed -f and
sudo tail -f /var/www/pixelfed/storage/logs/*.log

Didn’t find anything noteworthy…

PHP
Used sudo tail -f /var/log/php8.2-fpm.log and confirmed that PHP 8.2 was deployed correctly.

Permissions
Older posts on the forums suggested doing this, which did not work:

sudo chown -R www-data:www-data /var/www/pixelfed/storage
sudo chmod -R 775 /var/www/pixelfed/storage
df -h

I also tried yunohost app upgrade pixelfed --force like you tried above. No dice.

Interestingly, I am able to upload stories.

1 Like

Yes, exacly the same here, stories work, but not uploading posts.

Any ideas guys?

No update on this @YunoHost ?

Same thing for me - can upload to stories, but normal posts it shows an upload bar briefly and then disappears. Looking at the console for browser it shows:

POST 500 (Internal Server Error)

1 Like

Yes, would be great with a fix to this one.

I too am having this issue and see no effort to repair it. The last updates in Github are about 4 months ago.