Unable to generate the PDF
I'm unable to generate the PDF, tried everything at my own, but it keep giving 500 Error
This error on Terminal
If you have yet to do so, i would switch to the github-dev branch, since that is more up to date. This looks like an issue with the selenium server, an issue which I had also encountered in the past. Can you do the following steps and get back to me on the results?
- switch to github-dev branch
- rebuild the docker image, ensuring that the correct docker image versions are being used
- start the server and try to generate a pdf again
Just in case, i recommend making a backup of any existing mysql data before rebuilding, in case of mysql version changes messing things up. After doing that, if it still errors out, can you post an image of the stacktrace?
Hi @TMDeal, For some reason, Still getting the same error.
I've cloned the github-dev branch using the following cmd on a fresh DO VPS, having 8GB RAM, 2vCPU
git clone --branch github-dev https://github.com/blacklanternsecurity/writehat.git
and getting the same error
Hi @TMDeal,
Please note that, it gives different error each time to add some random URLs to the ALLOWED_HOSTS
After adding the shown hosts, it gives a new host to add in ALLOWED_HOSTS
Im not too sure how those extra hosts have showed up in the logs. From what i am seeing in there, it looks like a request is being made to the writehat web server for a php file?
I am going to see if i can work this issue out on my end and see if there is something I am missing. Also, can you post some more log messages from the chrome container? If not, I understand, I was a bit late in responding to this and you may no longer have the logs around.
from my tests, I also got an error when browsing to the generate pdf page, I was able to fix it by downgrading the version of selenium installed to 4.8.2 by pinning it in requirements.txt. Can you try adding that version pin into requirements.txt, rebuilding the containers, and then trying to render the pdf again? It may not have had anything to do with the allowed hosts
Hi @TMDeal, Thankyou so much
selenium installed to 4.8.2 by pinning it in requirements.txt
Worked like a charm, Thanks for your time :)