Error: Cannot read properties of null (reading 'scrollHeight')
Executing the example command provided in the documentation ./google-maps-scraper -input example-queries.txt -results restaurants-in-cyprus.csv -exit-on-inactivity 3m , or any valid command, results in the following error:
{"level":"error","component":"scrapemate","error":"playwright: TypeError: Cannot read properties of null (reading 'scrollHeight')\n at eval (eval at evaluate (:226:30), <anonymous>:3:21)\n at UtilityScript.evaluate (<anonymous>:233:19)\n at UtilityScript.<anonymous> (<anonymous>:1:44)","time":"2024-06-11T01:22:54.741770005Z","message":"error while processing job"}
I downloaded the repository using git clone and built it locally. The script was functioning correctly a few days ago. So, it's unclear whether the error is on my end or if Google has changed their layout.
Edit: Running curl -I https://www.google.com/maps returns HTTP/2 200 which indicates that my IP address is not blocked by Google.
@asadMarmash I just tried it (from the main branch) and i don't get that error.
Also tried the docker container and works.
Can you please try again and also using the docker image and let me know?
@gosom Guess its releated to https://github.com/gosom/google-maps-scraper/issues/55#issue-2318145938
You can test behavior with "polystyrene in doha" keyword it will lead single entry and then will get errors similar to these errors.
I think it is an intermittent issue, I tried to debug and if there is 1 record google will change the url into map/place but sometimes it executes too fast and the page url in playwright hasn't changed into map/place yet and when I put a long timeout after page.WaitForURL it will always work
https://github.com/gosom/google-maps-scraper/pull/98 will be fixed once this is merged
I have the same problem with the newest docker container.
me too