question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pyppeteer.errors.BrowserError: Browser closed unexpectedly

See original GitHub issue

System is Ubuntu 16.04 LTS I am using a virtualenv which uses python3.7. >>> api.byHashtag('cat', count=30)

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/ubuntu/tiktok-search/tkenv/lib/python3.7/site-packages/TikTokApi/tiktok.py", line 176, in byHashtag id = self.getHashtagObject(hashtag)['challengeInfo']['challenge']['id'] File "/home/ubuntu/tiktok-search/tkenv/lib/python3.7/site-packages/TikTokApi/tiktok.py", line 211, in getHashtagObject b = browser(api_url) File "/home/ubuntu/tiktok-search/tkenv/lib/python3.7/site-packages/TikTokApi/browser.py", line 27, in __init__ asyncio.get_event_loop().run_until_complete(self.start()) File "/usr/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete return future.result() File "/home/ubuntu/tiktok-search/tkenv/lib/python3.7/site-packages/TikTokApi/browser.py", line 30, in start self.browser = await pyppeteer.launch(self.options) File "/home/ubuntu/tiktok-search/tkenv/lib/python3.7/site-packages/pyppeteer/launcher.py", line 305, in launch return await Launcher(options, **kwargs).launch() File "/home/ubuntu/tiktok-search/tkenv/lib/python3.7/site-packages/pyppeteer/launcher.py", line 166, in launch self.browserWSEndpoint = get_ws_endpoint(self.url) File "/home/ubuntu/tiktok-search/tkenv/lib/python3.7/site-packages/pyppeteer/launcher.py", line 225, in get_ws_endpoint raise BrowserError('Browser closed unexpectedly:\n') pyppeteer.errors.BrowserError: Browser closed unexpectedly:

I am unable to see what’s wrong. I was searching around. but did not get anything.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
NeelDroidcommented, May 23, 2020

Ok I had to manually install it over apt. sudo apt-get install chromium-chromedriver

It’s fetching JSON now. Thank you a lot. This was very important for me.

So, it means after installing the API & running pyppeteer-install on a virtualenv one needs to install the chromedriver globally or I think running the pyppeteer-install globally should work.

2reactions
vikasnavgirecommented, Apr 29, 2021

Run sudo apt-get install gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

It worked for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pyppeteer.errors.BrowserError: Browser closed unexpectedly
I got: pyppeteer.errors.BrowserError: Browser closed unexpectedly: pyppeteer.
Read more >
How to use the pyppeteer.errors.BrowserError function ... - Snyk
To help you get started, we've selected a few pyppeteer.errors. ... URLError: continue else: raise BrowserError( 'Browser closed unexpectedly:\n{}'.format( ...
Read more >
How to fix pyppeteer pyppeteer.errors.BrowserError
How to fix pyppeteer pyppeteer.errors.BrowserError: Browser closed unexpectedly: · Problem: · Solution: · Search · Categories.
Read more >
docker中使用pyppeteer报出如下错误时pyppeteer.errors ...
BrowserError : Browser closed unexpectedly: [0924/153706.301300:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not ...
Read more >
Enable selenium / pyppeteer for my account. : Forums
import asyncio from pyppeteer import launch async def main(): ... Error: pyppeteer.errors.BrowserError: Browser closed unexpectedly:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found