Skip to content

fix: report undefined evaluate_script results as text - #2783

Closed
kevin9327 wants to merge 1 commit into
ChromeDevTools:mainfrom
kevin9327:fix/evaluate-script-undefined-json
Closed

kevin9327 wants to merge 1 commit into
ChromeDevTools:mainfrom
kevin9327:fix/evaluate-script-undefined-json

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

Summary

evaluate_script documents that results are JSON. JSON.stringify(undefined) is undefined, so a script with no return value was printed inside a json fence as the invalid token undefined.

When the serialized result is missing, report that the script returned undefined instead of wrapping non-JSON.

Testing

  • npm run test tests/tools/script.test.ts
  • npm run typecheck
  • npm run check-format

AI-assisted (Grok)

@google-cla

google-cla Bot commented Sep 20, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@rooKywooKy rooKywooKy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review failed
github API request failed (422): GitHub API request failed (422 Unprocessable Entity): Unprocessable Entity: [request_id=8666:1AC6C0:1398234F:130799B1:6AB01692]

@OrKoN

OrKoN commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Closing as stale (CLA not signed).

@OrKoN OrKoN closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants