Closed JayaramaKrishnaGudipati closed 1 year ago
@adrienbrignon, Please review once the below timeout error caused by the plugin and kindly share your thoughts if this can be fixed with any workaround from the config,
Thanks
Hi @adrienbrignon, Could you please confirm on this issue once, was waiting to hear something from you :)
Hi @JayaramaKrishnaGudipati,
Sorry for the late reply.
When this error occurs, it means that your page cannot be rendered by Paged.js. This is probably caused by something in your page breaking the rendering process (incorrect path, JavaScript error...).
To debug this issue, you can either:
paged.polyfill.js
script in the page causing the timeout and check your browser's console for errors
Hi, @adrienbrignon,
As per your suggestion given in Issue #3, I tried with ubuntu image and the playwright installation finally went fine. Now I see the below timeout issue. Please verify and suggest if any config changes can be done for the plugin to avoid this issue,
File "/usr/local/bin/mkdocs", line 8, in
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1130, in call
return self.main(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 760, in invoke
return __callback(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/mkdocs/main.py", line 250, in build_command
build.build(cfg, dirty=not clean)
File "/usr/local/lib/python3.11/dist-packages/mkdocs/commands/build.py", line 332, in build
config.plugins.run_event('post_build', config=config)
File "/usr/local/lib/python3.11/dist-packages/mkdocs/plugins.py", line 522, in run_event
result = method(kwargs)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/mkdocs_exporter/plugins/pdf/plugin.py", line 152, in on_post_build
self.loop.run_until_complete(asyncio.gather(*concurrently(self.tasks, max(1, self.config.concurrency or 1))))
File "/usr/local/lib/python3.11/dist-packages/nest_asyncio.py", line 90, in run_until_complete
return f.result()
^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/tasks.py", line 269, in step
result = coro.throw(exc)
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/mkdocs_exporter/plugins/pdf/plugin.py", line 148, in limit
return await asyncio.create_task(coroutine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/futures.py", line 287, in await
yield self # This tells Task to wait for completion.
^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/tasks.py", line 339, in wakeup
future.result()
File "/usr/lib/python3.11/asyncio/futures.py", line 203, in result
raise self._exception.with_traceback(self._exception_tb)
File "/usr/lib/python3.11/asyncio/tasks.py", line 267, in __step
result = coro.send(None)
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/mkdocs_exporter/plugins/pdf/plugin.py", line 122, in render
pdf = await self.renderer.render(page)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/mkdocs_exporter/plugins/pdf/renderer.py", line 76, in render
return await self.browser.print(html)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/mkdocs_exporter/plugins/pdf/browser.py", line 91, in print
await page.locator('.pagedjs_pages').wait_for(timeout=30000)
File "/usr/local/lib/python3.11/dist-packages/playwright/async_api/_generated.py", line 18010, in wait_for
await self._impl_obj.wait_for(timeout=timeout, state=state)
File "/usr/local/lib/python3.11/dist-packages/playwright/_impl/_locator.py", line 662, in wait_for
await self._frame.wait_for_selector(
File "/usr/local/lib/python3.11/dist-packages/playwright/_impl/_frame.py", line 322, in wait_for_selector
await self._channel.send("waitForSelector", locals_to_params(locals()))
File "/usr/local/lib/python3.11/dist-packages/playwright/_impl/_connection.py", line 61, in send
return await self._connection.wrap_api_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/playwright/_impl/_connection.py", line 482, in wrap_api_call
return await cb()
^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/playwright/_impl/_connection.py", line 97, in inner_send
result = next(iter(done)).result()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/futures.py", line 203, in result
raise self._exception.with_traceback(self._exception_tb)
playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for locator(".pagedjs_pages") to be visible
I see from some online forums this issue can be fixed if we can increase or disable the timeout value, (timeout = 0).
File "/usr/local/lib/python3.11/dist-packages/mkdocs_exporter/plugins/pdf/browser.py", line 91, in print await page.locator('.pagedjs_pages').wait_for(timeout=30000)
Please share your thoughts. Thanks