Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium crashes after trying to log in... (RuntimeError: Event loop is closed) #244

Open
1god opened this issue May 25, 2022 · 1 comment

Comments

@1god
Copy link

1god commented May 25, 2022

I try to log in via this script but when succeeded chromium will just crash and i never get the message cookies found, even when i click fast on view profile or something preventing the browser from crashing. Any help would be appreciated, thanks!
tiktokpy login
2022-05-25 17:00:03 | INFO | 🥳 TikTokPy initialized. Version: 0.9.0
2022-05-25 17:00:03 | INFO | 🔧 Settings successfully loaded
2022-05-25 17:00:03 | INFO | 🛑 Cookies not found, anonymous mode
2022-05-25 17:00:56 | INFO | ✋ TikTokPy finished working. Session lasted: 53 seconds
Traceback (most recent call last):
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\Scripts\tiktokpy.exe_main
.py", line 7, in
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\typer\main.py", line 214, in call
return get_command(self)(*args, **kwargs)
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
return callback(*args, **kwargs)
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\typer\main.py", line 500, in wrapper
return callback(**use_params) # type: ignore
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktokpy\cli\utils.py", line 8, in wrapper
return asyncio.run(f(*args, **kwargs))
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete
return future.result()
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktokpy\cli_init
.py", line 13, in login
await bot.login_session()
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktokpy\bot_init
.py", line 110, in login_session
await Login().manual_login()
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktokpy\client\login.py", line 25, in manual_login
await page.click('ul[data-e2e="profile-popup"] > li:first-child')
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\async_api_generated.py", line 8317, in click
await self._async(
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright_impl_page.py", line 669, in click
return await self._main_frame.click(**locals_to_params(locals()))
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright_impl_frame.py", line 460, in click
await self._channel.send("click", locals_to_params(locals()))
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright_impl_connection.py", line 39, in send
return await self.inner_send(method, params, False)
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright_impl_connection.py", line 63, in inner_send
result = next(iter(done)).result()
playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for selector "ul[data-e2e="profile-popup"] > li:first-child"
selector resolved to visible <li data-e2e="profile-info" class="tiktok-13cl6pj-Li…>…
attempting click action
waiting for element to be visible, enabled and stable
element was detached from the DOM, retrying
waiting for selector "ul[data-e2e="profile-popup"] > li:first-child"

Exception ignored in: <function BaseSubprocessTransport.del at 0x0000025845952B90>
Traceback (most recent call last):
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\asyncio\base_subprocess.py", line 126, in del
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\asyncio\base_subprocess.py", line 104, in close
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 750, in call_soon
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 515, in _check_closed
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x00000258459785E0>
Traceback (most recent call last):
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in del
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 750, in call_soon
File "C:\Users\Home\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 515, in _check_closed
RuntimeError: Event loop is closed

@1god 1god changed the title Chromium crashes after trying to log in... Chromium crashes after trying to log in... (RuntimeError: Event loop is closed) May 25, 2022
@LianBellocchio
Copy link

Try instaling playwright "npm init playwright@latest" on bash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants