vogler / free-games-claimer

Automatically claims free games on the Epic Games Store, Amazon Prime Gaming and GOG.
GNU Affero General Public License v3.0
2.2k stars 139 forks source link

"Not a valid URL" for the epic store #277

Closed moda20 closed 6 months ago

moda20 commented 6 months ago

Hi, i am having this issue today. i am already on the latest version for the epic store and i keep getting the same error when trying to click the claim button. i increased the timeout but it just sat there until it was over. Here is the error

`[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=anti-tracking-url-decoration&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    `[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=partitioning-exempt-urls&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    `[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=hijack-blocklists&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    `[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=doh-providers&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    `[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=search-telemetry-v2&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    `[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=search-config&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    `[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=top-sites&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    `[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=doh-config&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    `[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=message-groups&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    `[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=cfr&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    `[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=message-groups&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    `[pid=14725][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=whats-new-panel&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n`

....

'[pid=15026][err] 2023-12-27 17:15:49.475 plugin-container[15030:101958] nil host used in call to allowsAnyHTTPSCertificateForHost:\n' +
    '[pid=15026][err] 2023-12-27 17:15:49.476 plugin-container[15030:101958] nil host used in call to allowsSpecificHTTPSCertificateForHost\n' +
    '[pid=15026][err] 2023-12-27 17:15:49.476 plugin-container[15030:101958] nil host used in call to allowsAnyHTTPSCertificateForHost:\n' +
    '[pid=15026][err] 2023-12-27 17:15:49.477 plugin-container[15030:101980] nil host used in call to allowsSpecificHTTPSCertificateForHost\n' +
    '[pid=15026][err] 2023-12-27 17:15:49.477 plugin-container[15030:101980] nil host used in call to allowsAnyHTTPSCertificateForHost:\n' +
    `[pid=15026][out] console.error: (new SyntaxError("XMLHttpRequest.open: '/buckets/monitor/collections/changes/changeset?collection=url-classifier-skip-urls&bucket=main&_expected=0' is not a valid URL.", (void 0), 133))\n` +
    '[pid=15026][err] 2023-12-27 17:15:54.797 plugin-container[15049:102384] nil host used in call to allowsSpecificHTTPSCertificateForHost\n' +
    '[pid=15026][err] 2023-12-27 17:15:54.797 plugin-container[15049:102384] nil host used in call to allowsAnyHTTPSCertificateForHost:\n' +
    '[pid=15026][err] 2023-12-27 17:15:54.798 plugin-container[15049:102384] nil host used in call to allowsSpecificHTTPSCertificateForHost\n' +
    '[pid=15026][err] 2023-12-27 17:15:54.798 plugin-container[15049:102384] nil host used in call to allowsAnyHTTPSCertificateForHost:\n' +
    '[pid=15026][err] 2023-12-27 17:15:54.799 plugin-container[15049:102404] nil host used in call to allowsSpecificHTTPSCertificateForHost\n' +
    '[pid=15026][err] 2023-12-27 17:15:54.799 plugin-container[15049:102404] nil host used in call to allowsAnyHTTPSCertificateForHost:\n' +
    '[pid=15026] <gracefully close start>'

here is the call log :

Call log:
  - waiting for locator('[data-testid="purchase-cta-button"]')
  -   locator resolved to <button class="css-1ppwb5u" data-testid="purchase-cta-bu…>…</button>
  - attempting click action
  -   waiting for element to be visible, enabled and stable
  -   element is visible, enabled and stable
  -   scrolling into view if needed
  -   done scrolling
  -   performing click action
vogler commented 6 months ago

How do you run it? Can confirm for the default SHOW=0. When showing the browser, it worked:

$ SHOW=1 node epic-games.js
2023-12-28 16:51:45.774 started checking epic-games
startup: 3.773s
Signed in as ...
login: 683.407ms
Free games: [ 'https://store.epicgames.com/en-US/p/cursed-to-golf-a6bc22' ]
Current free game: Cursed to Golf
  Not in library yet! Click GET.
  Claimed successfully!
claim game: 14.840s
claim all games: 15.099s

Using RECORD=1 I noticed that the browser size/viewport is somehow cropped for SHOW=0:

image

vs. SHOW=1:

image

The issue may be that Playwright can't scroll the 'GET' button into view.

vogler commented 6 months ago

Some regression in Playwright. Was wondering why screenshots were messed up...