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

Error: Frame was detached #3

Closed
alexreg opened this issue Jan 25, 2023 · 0 comments · Fixed by #4
Closed

Error: Frame was detached #3

alexreg opened this issue Jan 25, 2023 · 0 comments · Fixed by #4
Labels
bug Something isn't working

Comments

@alexreg
Copy link
Contributor

alexreg commented Jan 25, 2023

First, thanks for this very handy library.

There seems to be a sporadic bug that occurs because the captcha submits successfully and the page navigates away (removing the frame) before the solver_recaptcha method finishes. Here's the backtrace.

Traceback (most recent call last):
  File "/opt/homebrew/bin/familysearch-downloader", line 8, in <module>
    sys.exit(app())
  File "/Users/alex/Software/typer/typer_cloup/main.py", line 327, in __call__
    return get_command(self)(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/alex/Software/typer/typer_cloup/main.py", line 720, in wrapper
    return callback(**use_params)  # type: ignore
  File "/Users/alex/Software/familysearch-downloader/familysearch_downloader/main.py", line 102, in main
    downloader.login()
  File "/Users/alex/Software/familysearch-downloader/familysearch_downloader/downloader.py", line 71, in login
    token = solver.solve_recaptcha()
  File "/opt/homebrew/lib/python3.10/site-packages/playwright_recaptcha/recaptchav2/sync_solver.py", line 236, in solve_recaptcha
    self._submit_audio_text(recaptcha_frame, recaptcha_checkbox, text)
  File "/opt/homebrew/lib/python3.10/site-packages/playwright_recaptcha/recaptchav2/sync_solver.py", line 184, in _submit_audio_text
    ).is_visible()
  File "/opt/homebrew/lib/python3.10/site-packages/playwright/sync_api/_generated.py", line 16322, in is_visible
    self._sync(self._impl_obj.is_visible(timeout=timeout))
  File "/opt/homebrew/lib/python3.10/site-packages/playwright/_impl/_sync_base.py", line 104, in _sync
    return task.result()
  File "/opt/homebrew/lib/python3.10/site-packages/playwright/_impl/_locator.py", line 450, in is_visible
    return await self._frame.is_visible(
  File "/opt/homebrew/lib/python3.10/site-packages/playwright/_impl/_frame.py", line 353, in is_visible
    return await self._channel.send("isVisible", locals_to_params(locals()))
  File "/opt/homebrew/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 44, in send
    return await self._connection.wrap_api_call(
  File "/opt/homebrew/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 419, in wrap_api_call
    return await cb()
  File "/opt/homebrew/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 79, in inner_send
    result = next(iter(done)).result()
playwright._impl._api_types.Error: Frame was detached
@Xewdy444 Xewdy444 added the bug Something isn't working label Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants