TikTok-Api icon indicating copy to clipboard operation
TikTok-Api copied to clipboard

[BUG] - playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.

Open ml0-1337 opened this issue 2 years ago • 2 comments

User data fetching function not working, I get the following error. It was working until yesterday and today I did not modify any code. I also cloned the repository again to check what is wrong but I got the same error. Is there any way to handle this error like by changing the Timeout from 3000ms? Or would it solve if I used proxy?

log: TikTok-Api/venv/bin/python TikTok-Api/examples/user_example.py Traceback (most recent call last): File "TikTok-Api/examples/user_example.py", line 23, in asyncio.run(user_example()) File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "TikTok-Api/examples/user_example.py", line 12, in user_example await api.create_sessions(ms_tokens=[ms_token], num_sessions=1, sleep_after=3) File "TikTok-Api/TikTokApi/tiktok.py", line 249, in create_sessions await asyncio.gather( File "TikTok-Api/TikTokApi/tiktok.py", line 181, in __create_session await page.goto(url) File "TikTok-Api/venv/lib/python3.11/site-packages/playwright/async_api/_generated.py", line 9251, in goto await self._impl_obj.goto( File "TikTok-Api/venv/lib/python3.11/site-packages/playwright/_impl/_page.py", line 479, in goto return await self._main_frame.goto(**locals_to_params(locals())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TikTok-Api/venv/lib/python3.11/site-packages/playwright/_impl/_frame.py", line 147, in goto await self._channel.send("goto", locals_to_params(locals())) File "TikTok-Api/venv/lib/python3.11/site-packages/playwright/_impl/_connection.py", line 61, in send return await self._connection.wrap_api_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TikTok-Api/venv/lib/python3.11/site-packages/playwright/_impl/_connection.py", line 482, in wrap_api_call return await cb() ^^^^^^^^^^ File "TikTok-Api/venv/lib/python3.11/site-packages/playwright/_impl/_connection.py", line 97, in inner_send result = next(iter(done)).result() ^^^^^^^^^^^^^^^^^^^^^^^^^ playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. =========================== logs =========================== navigating to "https://www.tiktok.com/", waiting until "load"

Process finished with exit code 1

ml0-1337 avatar Aug 23 '23 14:08 ml0-1337

try adding timeout=0 at goto, like await page.goto(url, timeout=0)

yokuse avatar Sep 06 '23 13:09 yokuse

anyone found any solution?

AbubakrChan avatar May 02 '24 18:05 AbubakrChan