google-maps-scraper icon indicating copy to clipboard operation
google-maps-scraper copied to clipboard

Error: Cannot read properties of null (reading 'scrollHeight')

Open asadMarmash opened this issue 1 year ago • 8 comments

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 avatar Jun 11 '24 01:06 asadMarmash

@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 avatar Jun 18 '24 17:06 gosom

@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.

admbyz avatar Jun 23 '24 11:06 admbyz

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

arceushui avatar Jul 15 '24 15:07 arceushui

https://github.com/gosom/google-maps-scraper/pull/98 will be fixed once this is merged

gosom avatar Dec 15 '24 11:12 gosom

I have the same problem with the newest docker container.

Blackvz avatar Aug 28 '25 09:08 Blackvz

me too

lclx868 avatar Sep 26 '25 09:09 lclx868