Great program! Here's a Walgreen's bug (it may not matter)
Opened this issue · 5 comments
Walgreens checker error: TypeError: Cannot read property 'press' of null
at checker (file:///Users/tmunn/src/cowGoesMoo/src/sites/walgreens.js:55:29)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async runCheckerSafely (file:///Users/tmunn/src/cowGoesMoo/src/check.js:19:12)
at async checkAllSites (file:///Users/tmunn/src/cowGoesMoo/src/check.js:34:20)
at async startChecking (file:///Users/tmunn/src/cowGoesMoo/src/check.js:57:5)
at async start (file:///Users/tmunn/src/cowGoesMoo/src/index.js:34:5)
It looks like Walgreens has some sort of check in place preventing you from jumping straight to the vaccine check page. I get the same error and the work around I came up with is to set the browser to visible and let Walgreens fail. In that failed tab go to the Walgreens website and check manually once and then it's fixed from there on out.
Thanks for the heads up 😀. I just pushed a fix
I am still seeing this in the latest release, am I doing something incorrectly? If I unhide the browser, the error goes away.
Thanks.
@akeslo - I think the problem is related to Walgreens's auth system. My guess is that the Walgreens server has some anti-bot logic. The logic probably blocks headless browsers. We might be able to find a solution by giving the headless browser some user-agent headers.
I noticed that this error shows up even if I run CowGoesMoo with HIDE_BROWSER = false
. It works for awhile, but eventually, it runs into this error, and the browser shows an "Access Denied" message. The Walgreens server probably detected bot-like activity. When I changed my IP address by using a VPN, my CowGoesMoo browser was allowed to browse the Walgreens vaccine URL. So Walgreens is probably rate limiting users based on IP address.
In my testing, I was using a very short LOOP_INTERVAL
in my privateConfig.js
. I suggest trying a long LOOP_INTERVAL
(in addition to HIDE_BROWSER = false
) if you want CowGoesMoo to check Walgreens for you.
However, in the long term, I might shift CowGoesMoo to just rely on the Vaccine Spotter API, which aggregates data for lots of pharmacies (including CVS and Walgreens).