error job finished playwright: target closed: Target page, context or browser has been closed gosom
hi , Im facing this issues "playwright: target closed: Target page, context or browser has been closed gosom" when a job finished, I executed the command prompt with debug flag and the chromium browser open and close inmediatly, I follow whole the steps, in fact I have another computer working fine in the same network and works fine, but in this new computer the jobs always fails, anyone hjappens the same issue? I have a windows 11 machine
Hi, I also encountered the same issue. I am using it on both Mac and Windows. On Mac, everything works fine with the compiled executable, but on Windows, I get this error: playwright: target closed: Target page, context or browser has been closed. I will put the full error message below.
I checked the playwright versions and chromium versions downloaded on both Mac and Windows, and I found they should be consistent. The chromium version is 1148, ffmpeg is 1010, and ms-playwight-go is 1.49.1. Under these circumstances, everything runs normally on Mac, but not on Windows. I am seeking for help.
visit http://localhost:8080
2025/04/18 08:26:00 job b9a3edf3-5679-4a15-8ddc-b4afdb91a27b has proxy: false
2025/04/18 08:26:00 running job b9a3edf3-5679-4a15-8ddc-b4afdb91a27b with 3 seed jobs and 180 allowed seconds
2025/04/18 08:26:13 INFO Downloading browsers...
2025/04/18 08:26:13 INFO Downloaded browsers successfully
{"level":"info","component":"scrapemate","time":"2025-04-18T00:26:15.5184402Z","message":"starting scrapemate"}
{"level":"info","component":"scrapemate","job":"Job{ID: f7a1df5d-8728-4630-b155-ae9f9d8606ea, Method: GET, URL: https://www.google.com/maps/search/electric+vehicle+charging+station+in+North+District%2C+Hong+Kong/@0,0,18z, UrlParams: map[hl:en]}","error":"playwright: target closed: Target page, context or browser has been closed","status":"failed","duration":15017.8708,"time":"2025-04-18T00:26:30.5368987Z","message":"job finished"}
{"level":"error","component":"scrapemate","error":"playwright: target closed: Target page, context or browser has been closed","time":"2025-04-18T00:26:30.5368987Z","message":"error while processing job"}
{"level":"info","component":"scrapemate","job":"Job{ID: b19929bf-d8f9-4cbb-be23-df2161c5dea5, Method: GET, URL: https://www.google.com/maps/search/electric+vehicle+charging+station+in+Islands+District%2C+Hong+Kong/@0,0,18z, UrlParams: map[hl:en]}","error":"playwright: target closed: Target page, context or browser has been closed","status":"failed","duration":13376.1181,"time":"2025-04-18T00:26:43.9136561Z","message":"job finished"}
{"level":"error","component":"scrapemate","error":"playwright: target closed: Target page, context or browser has been closed","time":"2025-04-18T00:26:43.9143194Z","message":"error while processing job"}
{"level":"info","component":"scrapemate","job":"Job{ID: 9be71e8c-68e8-42c6-8586-00fc7317d52a, Method: GET, URL: https://www.google.com/maps/search/electric+vehicle+charging+station+in+Kwai+Tsing+District%2C+Hong+Kong/@0,0,18z, UrlParams: map[hl:en]}","error":"playwright: target closed: Target page, context or browser has been closed","status":"failed","duration":13422.8377,"time":"2025-04-18T00:26:57.3371571Z","message":"job finished"}
{"level":"error","component":"scrapemate","error":"playwright: target closed: Target page, context or browser has been closed","time":"2025-04-18T00:26:57.3371571Z","message":"error while processing job"}
{"level":"info","component":"scrapemate","numOfJobsCompleted":0,"numOfJobsFailed":3,"lastActivityAt":"2025-04-18T00:26:57.3378029Z","speed":"0.00 jobs/min","time":"2025-04-18T00:27:15.5214336Z","message":"scrapemate stats"}
{"level":"info","component":"scrapemate","numOfJobsCompleted":0,"numOfJobsFailed":3,"lastActivityAt":"2025-04-18T00:26:57.3378029Z","speed":"0.00 jobs/min","time":"2025-04-18T00:28:15.523521Z","message":"scrapemate stats"}
{"level":"info","component":"scrapemate","time":"2025-04-18T00:29:00.2325933Z","message":"scrapemate exited"}
2025/04/18 08:29:01 job b9a3edf3-5679-4a15-8ddc-b4afdb91a27b scraped successfully
@buaatian thast rigt, I don`t figure out what happens, but, I installed the scrapper in another machine, a laptop, and works fine, the windows arch its the same in the all machines, x64, I verified that the browsers were downdloaded succesfully, its same version in the 3 machines, how ever, in the desktop pc HP , the job always fails,, even I thonk that maybe its a memory problem, but in the laptop I have 8gb ram and the scrapper works fine, I will suggest to the developer allows another browser, for example, firefox instead chromium
Getting the same issue on windows
2025/04/28 00:00:55 running job ef7dfb09-feef-4402-b11f-f1a89bd5ffb9 with 1 seed jobs and 600 allowed seconds 2025/04/28 00:00:55 INFO Downloading browsers... 2025/04/28 00:00:56 INFO Downloaded browsers successfully {"level":"info","component":"scrapemate","time":"2025-04-27T22:00:57.1465165Z","message":"starting scrapemate"} {"level":"info","component":"scrapemate","job":"Job{ID: fc04ecba-32e8-4a7e-9b5f-8b817525ccc4, Method: GET, URL: https://www.google.com/maps/search/restaurant+in+Paris/@0,0,15z, UrlParams: map[hl:en]}","error":"playwright: target closed: Target page, context or browser has been closed","status":"failed","duration":2671.0957,"time":"2025-04-27T22:00:59.8176122Z","message":"job finished"} {"level":"error","component":"scrapemate","error":"playwright: target closed: Target page, context or browser has been closed","time":"2025-04-27T22:00:59.8176122Z","message":"error while processing job"}
Same issue, working fine on my Windows server but not on Windows desktop
Fast Mode is working fine too.
same issue!!!
Any Update Regarding this Issue.
Hi, I also encountered the same issue. I am using it on both Mac and Windows. On Mac, everything works fine with the compiled executable, but on Windows, I get this error:
playwright: target closed: Target page, context or browser has been closed. I will put the full error message below.I checked the playwright versions and chromium versions downloaded on both Mac and Windows, and I found they should be consistent. The chromium version is 1148, ffmpeg is 1010, and ms-playwight-go is 1.49.1. Under these circumstances, everything runs normally on Mac, but not on Windows. I am seeking for help.
visit http://localhost:8080 2025/04/18 08:26:00 job b9a3edf3-5679-4a15-8ddc-b4afdb91a27b has proxy: false 2025/04/18 08:26:00 running job b9a3edf3-5679-4a15-8ddc-b4afdb91a27b with 3 seed jobs and 180 allowed seconds 2025/04/18 08:26:13 INFO Downloading browsers... 2025/04/18 08:26:13 INFO Downloaded browsers successfully {"level":"info","component":"scrapemate","time":"2025-04-18T00:26:15.5184402Z","message":"starting scrapemate"} {"level":"info","component":"scrapemate","job":"Job{ID: f7a1df5d-8728-4630-b155-ae9f9d8606ea, Method: GET, URL: https://www.google.com/maps/search/electric+vehicle+charging+station+in+North+District%2C+Hong+Kong/@0,0,18z, UrlParams: map[hl:en]}","error":"playwright: target closed: Target page, context or browser has been closed","status":"failed","duration":15017.8708,"time":"2025-04-18T00:26:30.5368987Z","message":"job finished"} {"level":"error","component":"scrapemate","error":"playwright: target closed: Target page, context or browser has been closed","time":"2025-04-18T00:26:30.5368987Z","message":"error while processing job"} {"level":"info","component":"scrapemate","job":"Job{ID: b19929bf-d8f9-4cbb-be23-df2161c5dea5, Method: GET, URL: https://www.google.com/maps/search/electric+vehicle+charging+station+in+Islands+District%2C+Hong+Kong/@0,0,18z, UrlParams: map[hl:en]}","error":"playwright: target closed: Target page, context or browser has been closed","status":"failed","duration":13376.1181,"time":"2025-04-18T00:26:43.9136561Z","message":"job finished"} {"level":"error","component":"scrapemate","error":"playwright: target closed: Target page, context or browser has been closed","time":"2025-04-18T00:26:43.9143194Z","message":"error while processing job"} {"level":"info","component":"scrapemate","job":"Job{ID: 9be71e8c-68e8-42c6-8586-00fc7317d52a, Method: GET, URL: https://www.google.com/maps/search/electric+vehicle+charging+station+in+Kwai+Tsing+District%2C+Hong+Kong/@0,0,18z, UrlParams: map[hl:en]}","error":"playwright: target closed: Target page, context or browser has been closed","status":"failed","duration":13422.8377,"time":"2025-04-18T00:26:57.3371571Z","message":"job finished"} {"level":"error","component":"scrapemate","error":"playwright: target closed: Target page, context or browser has been closed","time":"2025-04-18T00:26:57.3371571Z","message":"error while processing job"} {"level":"info","component":"scrapemate","numOfJobsCompleted":0,"numOfJobsFailed":3,"lastActivityAt":"2025-04-18T00:26:57.3378029Z","speed":"0.00 jobs/min","time":"2025-04-18T00:27:15.5214336Z","message":"scrapemate stats"} {"level":"info","component":"scrapemate","numOfJobsCompleted":0,"numOfJobsFailed":3,"lastActivityAt":"2025-04-18T00:26:57.3378029Z","speed":"0.00 jobs/min","time":"2025-04-18T00:28:15.523521Z","message":"scrapemate stats"} {"level":"info","component":"scrapemate","time":"2025-04-18T00:29:00.2325933Z","message":"scrapemate exited"} 2025/04/18 08:29:01 job b9a3edf3-5679-4a15-8ddc-b4afdb91a27b scraped successfully
Any Fix yet ?
Any Update Regarding this Issue.
Hi, I also encountered the same issue. I am using it on both Mac and Windows. On Mac, everything works fine with the compiled executable, but on Windows, I get this error:
playwright: target closed: Target page, context or browser has been closed. I will put the full error message below. I checked the playwright versions and chromium versions downloaded on both Mac and Windows, and I found they should be consistent. The chromium version is 1148, ffmpeg is 1010, and ms-playwight-go is 1.49.1. Under these circumstances, everything runs normally on Mac, but not on Windows. I am seeking for help.visit http://localhost:8080 2025/04/18 08:26:00 job b9a3edf3-5679-4a15-8ddc-b4afdb91a27b has proxy: false 2025/04/18 08:26:00 running job b9a3edf3-5679-4a15-8ddc-b4afdb91a27b with 3 seed jobs and 180 allowed seconds 2025/04/18 08:26:13 INFO Downloading browsers... 2025/04/18 08:26:13 INFO Downloaded browsers successfully {"level":"info","component":"scrapemate","time":"2025-04-18T00:26:15.5184402Z","message":"starting scrapemate"} {"level":"info","component":"scrapemate","job":"Job{ID: f7a1df5d-8728-4630-b155-ae9f9d8606ea, Method: GET, URL: https://www.google.com/maps/search/electric+vehicle+charging+station+in+North+District%2C+Hong+Kong/@0,0,18z, UrlParams: map[hl:en]}","error":"playwright: target closed: Target page, context or browser has been closed","status":"failed","duration":15017.8708,"time":"2025-04-18T00:26:30.5368987Z","message":"job finished"} {"level":"error","component":"scrapemate","error":"playwright: target closed: Target page, context or browser has been closed","time":"2025-04-18T00:26:30.5368987Z","message":"error while processing job"} {"level":"info","component":"scrapemate","job":"Job{ID: b19929bf-d8f9-4cbb-be23-df2161c5dea5, Method: GET, URL: https://www.google.com/maps/search/electric+vehicle+charging+station+in+Islands+District%2C+Hong+Kong/@0,0,18z, UrlParams: map[hl:en]}","error":"playwright: target closed: Target page, context or browser has been closed","status":"failed","duration":13376.1181,"time":"2025-04-18T00:26:43.9136561Z","message":"job finished"} {"level":"error","component":"scrapemate","error":"playwright: target closed: Target page, context or browser has been closed","time":"2025-04-18T00:26:43.9143194Z","message":"error while processing job"} {"level":"info","component":"scrapemate","job":"Job{ID: 9be71e8c-68e8-42c6-8586-00fc7317d52a, Method: GET, URL: https://www.google.com/maps/search/electric+vehicle+charging+station+in+Kwai+Tsing+District%2C+Hong+Kong/@0,0,18z, UrlParams: map[hl:en]}","error":"playwright: target closed: Target page, context or browser has been closed","status":"failed","duration":13422.8377,"time":"2025-04-18T00:26:57.3371571Z","message":"job finished"} {"level":"error","component":"scrapemate","error":"playwright: target closed: Target page, context or browser has been closed","time":"2025-04-18T00:26:57.3371571Z","message":"error while processing job"} {"level":"info","component":"scrapemate","numOfJobsCompleted":0,"numOfJobsFailed":3,"lastActivityAt":"2025-04-18T00:26:57.3378029Z","speed":"0.00 jobs/min","time":"2025-04-18T00:27:15.5214336Z","message":"scrapemate stats"} {"level":"info","component":"scrapemate","numOfJobsCompleted":0,"numOfJobsFailed":3,"lastActivityAt":"2025-04-18T00:26:57.3378029Z","speed":"0.00 jobs/min","time":"2025-04-18T00:28:15.523521Z","message":"scrapemate stats"} {"level":"info","component":"scrapemate","time":"2025-04-18T00:29:00.2325933Z","message":"scrapemate exited"} 2025/04/18 08:29:01 job b9a3edf3-5679-4a15-8ddc-b4afdb91a27b scraped successfully
![]()
Any Fix yet ?
Until now, I just realized that the solution works in laptops and in he pc desktops does not work
Same issue on windows 11, with linux or windows 10 it works. The browser just crash after the navigating the page, maybe the problem is in the scrapemate/playwright library
Running into the same issue on Windows 11. WSL works though
I had the same problem, via graphical interface it doesn't work at all, but you can run docker and do it via docker it will work