-
Notifications
You must be signed in to change notification settings - Fork 368
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
Unable to File Push #794
Comments
Hello @DecisionIT, thanks for contributing to the Password Pusher community! We will respond as soon as possible. |
Hi @DecisionIT - apologies for the issue. I just updated the To diagnose, can you re-pull that tag and retest? If still not working, can you shell into the container and create a file on that volume without issue? For example: docker exec -it <container ID> /bin/bash
cat "blah" > /opt/PasswordPusher/storage/test.txt And lastly, application logs may help. They are in the container at |
Also a good test might to try the request directly to the container (without nginx). The file uploads do some back and forth that nginx might not be handling correctly. Creating a file push directly with the Password Pusher container will tell us if nginx is the issue. |
Hi @pglombardo, Here are the results of the testing.
There was only one log file in the production.log
|
Hrm then possibly the browser might tell us something. Is there anything in the javascript console of the browser? Try another browser, private mode etc...
If checked it works? If still nothing, maybe you could provide a docker compose file of your setup with env vars/settings (that you can share) and I can try to recreate the issue here locally. |
So, no matter what options we have set, we are never able to actually view the file that was pushed. If it generates a link and you use it, it will say that it is expired. If, when pushing the file, the page just sits on 'pushing', you can see the link in the Audit Log, but if you go to it, it says that it is expired. For Edge and Chrome: For Firefox, For Safari I also see these messages in Edge\Chrome after navigating around the site the docker-compose file
|
I have the same problem. Browser Console reports the same. push Password works normally only file push unfortunately not pglombardo/pwpush-ephemeral Browser Console: |
That console message is benign & not related.
That is good. It means that the file uploaded successfully. the random name without file extension is a security step to anonymize the file (to an extent). In any case, I'm trying to reproduce this now and will post back soon. |
First test without nginx works:
...Using a docker-env file similar to this. So it seems like the issue is with nginx somewhere. I'll try that next. |
Thanks for all the patience on this issue here. After some fixes, I have an updated Password Pusher with nginx example here. The two key changes I had to make are:
PWP__LOG_TO_STDOUT=true
PWP__LOG_LEVEL=info This will likely reveal errors and/or warning when you attempt file uploads.
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Origin $scheme://$http_host;
proxy_set_header Host $http_host;
Since the stand-alone pwpush container uploads files without issue, the problem is very likely to be in the nginx configuration. If the above steps above don't resolve the issue for you, the additional logging (PWP__LOG_TO_STDOUT) should at least reveal more information to us. Could you both verify and try out these settings and let me know? |
HI @pglombardo I tried your suggestions, and was unsuccessful in getting it to work. Just so you know, I tired with and without nginx, and I got the same results. The files upload, and I can see them on the server, but the links always show as 'expired' when I try to access them. Here is the out put of the docker logs: With nginx (the redacted IPs were all the same IP):
Without nginx:
If there are additional logs that you would like me to provide, please let me know, and I can get those to you. |
Hi @DecisionIT - apologies for the late reply. I will take another look at this issue today. I'll post back soon. |
@pglombardo, no worries, I haven't had time to continue working on it either. |
Had this issue on PikaPods. It worked after removing those env vars:
Since those are all proxy-related, they may interfere with it somehow. We use Caddy ourselves. |
@m3nu Thanks for the suggestions. Unfortunately, turning off these options did work for me. |
I updated the |
Hi @pglombardo, I updated the docker container using the release tag. The issue is still there, I can't successfully push files. If you'd like, we can set up a remote session so that you can take a look at it directly. Let me know if you are interested in doing this. |
No luck on this one... I may take you up on your helpful offer. Let me setup nginx and pwpush myself first so I'm sure I won't waste your time. |
Hello, My Pw Pusher runs on Kubernetes with Treafik reverse proxy as frontend. I solved by disabling |
I'm facing the same error. |
Hi all just a heads up that I'm traveling for the next month. My time is limited but I'll try to get back to this soon. Apologies. |
Could you share settings.yml file? |
Sure. Here you have |
Hello, However, I noticed that in the first error case this error message in the PasswordPusher logs, when setting the log level to debug:
We're running PasswordPusher in a Docker container as well (pwpush-mysql), using the latest tag. I also pulled the newest image from yesterday, but the behaviour remains the same. We run a NGINX container in front of it. I followed the documentation for the docker-compose.yml and the NGINX config. |
Did you enable file push? It seams disabled...
At my side file push works, but I still get this issue #1182 The workaround I found when preview page doesn't appear is to jump to Dashboard-> Files and get Push Link from Audit section. ciao, |
An update..... so file pushes are working.... kind of. I removed and recreated the docker containers, and it seemed to start working. When uploading files, it will just hang on "Pushing", but clicking on "Pushing" again will take us to the preview with the link. We are able to download the file using that link, we no longer get the link expired page. This is the same issue that @assices seems to be having and the same that is described in #1182. What does not work is when we try to upload multiple files or files larger than 2mb. The "Pushing" button is not clickable and the files never upload to the storage. |
Yes, same behavior on my side, but the second click on "Pushing" creates another shared link. This is the reason I prefer to get shared link directly from Dashboard/File after first push. On my side, no issues with multiple files or files larger than 2mb using the method decribed before. ciao |
In the last version it works. Thanks. |
I was wrong sorry... It let me upload files, but I can't use it, it always says expired link... |
Just an update for everyone here. My apologies that this issue has persisted for so long. I'm back from vacation, back to work at HiveMQ and catching up on Password Pusher issues. As the project has gotten more popular, the number of issues has increased so I'm spread a bit thin. A couple of notes and "Hail Mary"s : 404 == Link Expired (Security Feature)The app will always show "Expired" for non existent pushes: https://pwpush.com/p/doesnotexist This is a security feature to obfuscate where pushes may have existed in the past. override_base_url was broken pre v1.29.3In v1.29.3, I fixed a bug where the wrong URL would be generated for File and URL pushes when using If you are using that option, uploading Files and get back a URL with As for everyone else, I know there is something amiss with file uploads when hosting Password Pusher with a proxy like nginx in the front... The weekend is almost here. I'll aim to dive deeper into this issue before Monday. Thanks to everyone for your patience. |
My sense that this issue and #1193 are a mix of issues which make fixing this more difficult but I do have some good news at least for a subset of users here. nginx, pwpush-ephemeral & file uploads: This morning I tested the Docker & Nginx example setup from scratch and I got the same stuck on "Pushing.." error (File uploads with pwpush-ephemeral and local storage). After a bit of digging, I found that File uploads were getting blocked by per second throttling. If you are having trouble uploading files, please try setting With this, I was able to upload files working without issue. When I switched to cloud storage (Amazon S3) I got the CORs error in the browser console but was fixed by applying the right CORs policy to the S3 buckets. Documentation here. There is more but I don't want to overwhelm the thread. I put other findings in the Troubleshooting wiki page. I hope that this helps at least some of you here. |
Hey, thanks a lot for looking at this issue. I tested on my side and uploading files works now. However, when I try to access the file push I get the message that the link has expired. When I check the status of the file push in the dashboard, it's shown as active. I have debug logs enabled and I noticed this message when trying to access the file push:
I might be wrong, but to me that SQL statement looks like it's looking for the file push under the passwords table, where it does not exist, instead of the file_pushes table. Also hopefully some more people will test this workaround and post their findings, just in case this behaviour is something unique to my instance. |
I think you may be right. There was a bug in an older version of Password Pusher that caused this. What version are you using and if not the latest, could you try v1.31.2? |
Yes, I looks like it was that bug that caused this. I was using a Docker container image from 5 weeks ago. I pulled the newest image and now the file pushing works flawlessly. Thank you so much! |
@pglombardo Thanks for all your work. Uploading files is working now after adding the |
Thanks for confirming @lauraled & @DecisionIT - glad to finally see some progress. As a summary of the solution for this issue:
WIth that said, I want to aim at closing this issue when possible. If these two steps don't solve the issue for you, could you please file a new issue so that we can diagnose your case separately? It would be much appreciated (and much easier to diagnose). I'll look to close this issue soon (assuming no objections). |
@pglombardo I'm ok with you closing the issue. Thanks again for your help. |
Closing this issue. Thanks all for the input and help. For others visiting here, please see this comment for a summary and solution. |
Checklist
issues
.discussions
.❓ Question
We just enabled File Push in our self-hosted Password Pusher, but we can't push files.
We have pwpush setup in a Docker container and have used the password function for quite a while with no issue. I tried enabling the file push option using local storage. I can see the files being uploaded to the server, but I am running into the following issues.
📎 Additional context
We are using the following containers to run pwpush:
nginx:latest
postgres:10
pglombardo/pwpush-postgres:release
The following options are set in the docker-compose file for the File Push.
I can share a sanitized version of the docker-compose if needed.
The text was updated successfully, but these errors were encountered: