pyppeteer.errors.BrowserError: Browser closed unexpectedly
See original GitHub issueSystem 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:
- Created 3 years ago
- Comments:13 (4 by maintainers)
Top GitHub Comments
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 thechromedriver
globally or I think running thepyppeteer-install
globally should work.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.