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

Unexpected Cookie/opensearch.xml error in console #16114

Open
3 tasks done
pereorga opened this issue Jul 15, 2024 · 3 comments
Open
3 tasks done

Unexpected Cookie/opensearch.xml error in console #16114

pereorga opened this issue Jul 15, 2024 · 3 comments
Assignees

Comments

@pereorga
Copy link

pereorga commented Jul 15, 2024

FAQ

URL

https://pccd.dites.cat/

What happened?

When I run Lighthouse via Node.js in a site that advertises an opensearch.xml file, I don't get 100% scores on "best-practices", and instead a Cookie/opensearch.xml-related console error is triggered. I can't find anything on the console (the browser closes just after it, and no logging or verbose options can give more details on what the issue with "errors-in-console" is), nor I can reproduce this manually on Chrome (tested both Canary and Stable)

This is the latest Lighthouse using Chrome Canary (edit: it happens with v127 stable too):

npx lighthouse "https://pccd.dites.cat/" --quiet --no-enable-error-reporting --only-categories="best-practices" --view

Message:

Issues logged to the Issues panel in Chrome Devtools indicate unresolved problems. They can come from network request failures, insufficient security controls, and other browser concerns. Open up the Issues panel in Chrome DevTools for more details on each issue.

Screenshot:
SCR-20240715-nrdt

What did you expect?

I expected to get 100% scores, like in the past. I have an opensearch.xml file, but there is nothing wrong in it, nor I am using cookies with it. This issue started happening a few weeks ago, approximately.

What have you tried?

No response

How were you running Lighthouse?

CLI, node

Lighthouse Version

11.7.1

Chrome Version

Using Chromium 128.0.0.0 with cli

Node Version

v20.15.0

OS

Mac

Relevant log output

No response

@connorjclark
Copy link
Collaborator

I've no idea what's causing this, but I did confirm I see the same from the CLI, but never when using Chrome canary / devtools directly.

Here's the issue we get from CDP about this cookie thing:

{
  "cookie": {
    "name": "_ga",
    "path": "/",
    "domain": ".dites.cat"
  },
  "cookieWarningReasons": [
    "WarnSameSiteUnspecifiedCrossSiteContext"
  ],
  "cookieExclusionReasons": [
    "ExcludeSameSiteUnspecifiedTreatedAsLax"
  ],
  "operation": "ReadCookie",
  "cookieUrl": "https://pccd.dites.cat/opensearch.xml"
}

When I re-use the same chrome profile with CLI, it only happens the first time.

@pereorga
Copy link
Author

I can reproduce this specific issue in any other website that references an OpenSearch XML file, such as:

Removing <link rel="search" type="application/opensearchdescription+xml" ...> line from the HTML removes the error message.

@pereorga
Copy link
Author

pereorga commented Aug 8, 2024

I've found a URL that has an OpenSearch XML file where this does not happen:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants