-
Notifications
You must be signed in to change notification settings - Fork 332
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upoload image broken in latest docker images and main branch #403
Comments
Clear your browser cookies for that site. And make sure you don't have browser plugin that might be blocking cookies. Also make sure you're on |
changed docker-compose from
and Opened a private browser session in firefox with no plugins and I still get the same thing. |
You need to have a running nginx for pictures to work at the moment, you do have that set up? If you're accessing lemmy via |
Ah ok, no I didn't set up nginx. I think that should be more clear in the docs though. Why is it that we need nginx to upload pictures? |
We used to require nginx for routing to iframely and pictrs. Now we removed iframely, and we route pictrs requests through lemmy, but we still have to add it to our official API. Once we do this nginx will no longer be necessary for pictures. In reality it has to do with cross-domain issues... the UI runs on |
interesting. Is most of the api calls going through websockets? I don't see many entries in my network tab. tbh I've never actually used websockets before. So most stuff works because it's going through a websocket, but http request are failing because of cors? I tried a disable cors addon with no luck. @dessalines would you happen to know how the ui builds the backend url? I'm having a hard time trying to set it. I'm trying to get a reverse proxy with nginx set up but its stuck building it as |
Use this: https://github.com/LemmyNet/lemmy/blob/main/ansible/templates/nginx.conf And edit the vars in the |
I'm also having this issue on my test instance I set up recently. Its giving me "No JWT cookie found" in lemmy-ui logs. Please let me know if a solution to this is found. |
@ThePurpleRabbit and you are also running nginx? I believe this is explicitly in the docs: https://join-lemmy.org/docs/en/administration/install_docker.html |
seems we run into the same problem over ansible install, earlier images dont show either |
Can confirm. Example here: https://szmer.info/pictrs/image/gwCBW64PfY.jpg?format=webp&thumbnail=96 Non-processed images also fail: https://szmer.info/pictrs/image/gwCBW64PfY.jpg Uploading images is also broken, uploading an image fails with message in the browser window:
This instance was running 0.11.3, we upgraded tonight to 0.12.2. No changes in secrets (JWT token in The instance was deployed using the Ansible playbook from the official repo, and is using NginX configured by that playbook. |
@rysiekpl That's a different issue, because you didn't follow the upgrade notes. |
Do you think maybe it would make sense to add that line to the |
Oops, our bad, thx for catching. I'll add that now. |
I was able to fix this issue by adding
To the lemmy.hjson file |
Post your nginx, docker-compose.yml, and lemmy.hjson files. I don't know where the issue is without those. |
I am closing this issue because image upload works in docker now because it is configured to go through nginx by default. Instead of going to |
I am having the same issue, as requrested by @dessalines below is the log from the server: What could the issue be? Additionally, I have also installed NGINX the app is running on Apache and NGINX for testing purposes: Apache: https://mawlz.com/ As you can see on both of the web servers it is not working |
@Mawlz Post your nginx, docker-compose.yml, and lemmy.hjson files. I don't know where the issue is without those. |
@dessalines Apologies for the wait. See here: docker-compsoe.yml: lemmy.hjson: nginx.conf |
Should be 1235 1236 is only for our dev setups, run in the docker/dev folder, not for deploys. |
I only changed it to 1236 per the above fix when the issue was closed. I have now reverted back to 1235 Apache: https://mawlz.com/ The issue persists. I have changed nothing else |
|
Yes, this has already been made and it is one of the first steps inside the documentation we followed: https://join-lemmy.org/docs/en/administration/install_docker.html I have executed the commands again without the mkdir since the directories are created and there is some content inside of them: [root@vm2248 [/home/mawlz/lemmy]]# ll What exactly is the UID:GUID 991 since for cPanel servers it seems this is SSSD and cpanel's PHPPostGreAdmin. If this should be a special user which may be different on your system we can assign it, but 991 is what appears on the ll, for me this step was extremely strange. |
Pictrs is run as a non root container. Which is best practice. I assume that number is the id assigned to the user in the pictrs container |
It also says 404 not found to https://mawlz.com/pictrs/image , which tells me you didn't set up your nginx properly. |
I'm not sure this is correct as my system is CentOS 7 with Cpanel and all docker containers are ran by docker who is on the root user, docker containers work in their own environment and the fact that the configuration files are owned by root is not a problem since docker is installed and used by the root user. As for the directories for pictrs they are owned by 991 which is the user specified in the tutorial, all other directories may be owned by root. The pictrs/image is giving error 405 which is not 404: https://mawlz.com:8443/pictrs/image The correct URL for the NGINX build is with port 8443 on the back. Dessalines I believe you clicked the wrong URL above when you commented it showed 404. I have changed the UID and GID to mawlz and reran docker, and again the app is not working. Dessalines, would you by any chance log on to the server and review where this is going wrong? I can provide the details via a private message on lemmy.ml if you agree Thanks in advance |
I don't have time to do that, but also lemmy won't work at a non-standard port like that. |
Found a bug? Please fill out the sections below. 馃憤
For backend issues, use lemmy
Issue Summary
Using instructions to run lemmy locally found here with docker-compose the image upload feature does not work and the ui complains about missing jwt and so does the backend of lemmy.
Steps to Reproduce
2.Log in with default lemmy user
Lemmy logs say,
Technical details
sudo docker-compose logs > lemmy_log.out
.Full log output below,
The text was updated successfully, but these errors were encountered: