Connection closed while reading from the driver
Hey so my code works fine (code below) locally but in Railway hosted I am getting the below error, anyway I can fix this?
Essentially I am using playwright to scrape some data and return it via the python API
Code attached
36 Replies
Project ID:
77fedaf9-b72c-45fa-b96e-6c1f7f459653
77fedaf9-b72c-45fa-b96e-6c1f7f459653
you can check your HTTP logs for more information
Is the only way to solve this is to use my systemw ith docker?
you mean write your own dockerfile?
Yeah
Dont see how else I can add this dependency
its complicated for the most part, i'd recommend moving to a dockerfile, i can give your Dockerfile a once over after you write it?
Appreciate it, never really used docker tbh, I should learn it at some point. WIll build one and send it if I run into issue sthanks
sounds good!
additionally, would you be interested in using browserless? not having to install and bundle chrome into your container would decrease the build time, and also decrease the publish times!
So I use something similar, I use BrightData's bypass browser
Much better overall experience
and cheaper
ah perfect, i just saw playwright and thought chrome install, my bad
I seem to have got it all working though thanks!
with a Dockerfile? that was fast
I used perplexity tbh haha
not ideal, you are using BrightData yet you are installing chrome now
you are also installing python from apt-get, thats not a super stable install path for installing programming languages
Ah your right, stupid of me to confuse that. I wonder if I am not using brightdata correctly which prompted the need for this
well first off, simply try removing those two playwright commands
Yes your right .. it still worked 🙂
okay now instead of FROM playwright and then installing python with apt-get, you can do FROM python with a version
Hey sorry will check thatbut quick question
Is this saying BrightData blacklisted you guys?
Or the other way arround?
Every request was working at first
very possible, but its also a 401 instead of 403, so maybe your credentials are wrong / expired?
Cant be, working locally fine
Gotcha, do you have static Ips enabled?
Apologies for my lack of experience in this.
On Railway or BrightData?
on your railway service, check the service settings
Disabled
Static Outbound IPs
try enabling that
I did but they get banned fast it seems
ah then you would need to get in contact with them
So its them blocking you? (BrightData)
correct
Thanks for info Brody. Any info I can provide that will help them? Like any info about yoru servr or IP ranges or etc?
you have a static IP now, so that's all you'd need to give them
Perfect thanks again. I always feel confident in my knowledge until I run into these issues then remeber I have so muc more to learn 🙂 Appreciate your pateince with me.
I wish I could help here but unfortunately an IP ban is outside of what we can control
Of course I understand
You helped a lot already