qtchaos / py_mega_account_generator

🤖 Create and manage MEGA accounts with ease, upload and share files.
GNU General Public License v3.0
109 stars 21 forks source link

Browser closed unexpectedly #38

Closed zdhd122a closed 3 months ago

zdhd122a commented 3 months ago

already a year use your script, on windows, also on second boot ubuntu, now i try to install it on vds, Ubuntu 22.04.2 LTS base, and encounter error which not see before

Traceback (most recent call last): File "megupl/py_mega_account_generator/main.py", line 218, in asyncio.run(register(credentials, executable_path, config)) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "megupl/py_mega_account_generator/main.py", line 150, in register browser = await pyppeteer.launch( File "megupl/mainenv/lib/python3.10/site-packages/pyppeteer/launcher.py", line 307, in launch return await Launcher(options, **kwargs).launch() File "megupl/mainenv/lib/python3.10/site-packages/pyppeteer/launcher.py", line 168, in launch self.browserWSEndpoint = get_ws_endpoint(self.url) File "megupl/mainenv/lib/python3.10/site-packages/pyppeteer/launcher.py", line 227, in get_ws_endpoint raise BrowserError('Browser closed unexpectedly:\n') pyppeteer.errors.BrowserError: Browser closed unexpectedly:

i try to change browser nothing work, not chromium not chrome, not firefox please help

zdhd122a commented 3 months ago

UPD. I installed the previous version, everything worked now image

qtchaos commented 3 months ago

Interesting, I'll take a look. There haven't been any changes to how we handle the browser between v1.5.1 and v1.5.0 so more information is needed either by you or any other person who encounters this issue. Did you encounter this issue on both Ubuntu and Windows or only on Ubuntu?

zdhd122a commented 3 months ago

There haven't been any changes to how we handle the browser between v1.5.1 and v1.5.0 so more information is needed either by you

sorry, i mean not previous version, not v1.5.0, i simply upload version from my pc to vds, so i'm not sure which version it is

zdhd122a commented 3 months ago

I think I've found the problem. on my version of ubuntu + xfce for some reason not works snaps, so firefox and chromium is snaps, if you have the same problem try to install something not snap (for me

sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge.list'
sudo apt update
sudo apt install microsoft-edge-stable

works)

qtchaos commented 3 months ago

Ah i see, thanks for including how to fix it aswell, will surely be useful for others.