Skip to content

If a site has no popups or CMPs, and the config allows for retries then AutoConsent gets stuck in indefinitely #1034

@mihirk

Description

@mihirk

https://github.com/duckduckgo/autoconsent/blob/main/lib/web.ts#L325

So if I understand correctly, this particular line, if no CMPs were found, and retries are remaining then we wait for 500ms "and" for any mutation to occur.

But when a page looks like say this

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Page 1</title>
</head>
<body>
<h1>This is page 1</h1>
</body>
</html>

and I run it with a config of detectRetries: 1 then auto-consent just hangs here indefinitely, as its a Promise.all and no mutation will occur.

Let me know if I am misunderstanding something and blaming the wrong part of the code, but yeah this is the issue I am facing right now with the page above in my test-suite with playwright. (this repo has more context: https://github.com/searchmcp/autoconsent-playwright/)

Happy to submit a PR changing it to a Promise.any

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions