QIN2DIM / epic-awesome-gamer

🍷 Gracefully claim weekly free games and monthly content from Epic Store.
https://echosec.notion.site/Epic-7c74f1e29117420dbac5551e4b031f82?pvs=4
GNU General Public License v3.0
886 stars 364 forks source link

超时无法执行 #226

Closed hansaes closed 10 months ago

hansaes commented 10 months ago

环境是本地 centos7 amd64

我观看了webm的内容 我发现他一直停留在登录界面没有操作

2023-10-28 10:57:29 | ERROR    | __main__:run:155 | An error has been caught in function 'run', process 'MainProcess' (7), thread 'MainThread' (139778795686784): - {}
Traceback (most recent call last):
  File "/home/epic/src/claim.py", line 159, in <module>
    asyncio.run(run())
  File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
> File "/home/epic/src/claim.py", line 155, in run
    await agent.stash()
  File "/home/epic/src/claim.py", line 148, in stash
    await self.claim_epic_games(context)
  File "/home/epic/src/claim.py", line 120, in claim_epic_games
    await epic.claim_weekly_games(page, single_promotions)
  File "/home/epic/src/epic_games/agent.py", line 248, in claim_weekly_games
    await expect(cta_btn).to_have_text("View In Cart")
  File "/usr/local/lib/python3.10/site-packages/playwright/async_api/_generated.py", line 20080, in to_have_text
    await self._impl_obj.to_have_text(
  File "/usr/local/lib/python3.10/site-packages/playwright/_impl/_assertions.py", line 455, in to_have_text
    await self._expect_impl(
  File "/usr/local/lib/python3.10/site-packages/playwright/_impl/_assertions.py", line 70, in _expect_impl
    raise AssertionError(f"{out_message}\nActual value: {actual} {log}")
AssertionError: Locator expected to have text 'View In Cart'
Actual value: None 
Call log:
LocatorAssertions.to_have_text with timeout 5000ms
waiting for locator("xpath=//aside//button[@data-testid='add-to-cart-cta-button']")
QIN2DIM commented 10 months ago

我看一下完整的日志