question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

page.evaluate hangs on Args key has unicode char

See original GitHub issue

Steps to reproduce

Calling await page.evaluate() hangs on Args key has unicode char Tell us about your environment:

  • Puppeteer version: 1.16.0
  • Platform / OS version: windows10 1809
  • URLs (if applicable):
  • Node.js version: 8.16.0

What steps will reproduce the problem?

const puppeteer = require("puppeteer");

(async () => {
    const browser = await puppeteer.launch()
    try {
        const page = await browser.newPage();
        console.log("wait evaluate");
        await page.evaluate(() => { }, {"中文字符": 1 })
    } finally {
        browser.close();
    }
})()

What is the expected result? await page.evaluate(() => { }, {"中文字符": 1 }) should resolve quickly !

What happens instead? Script hangs on line 8

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
powdercloudcommented, May 18, 2019

I think it’s because v8 hasn’t rolled into Chromium yet, so if you just checkout Chromium it won’t have the fix for v8. However, you can checkout Chromium, change into it’s src/v8, and in there, checkout master, run git pull - building headless_shell with that should do the trick. Thanks a lot for adding a puppeteer test. I’ll play with it on Monday (by then, v8 inside Chromium should be up to date).

1reaction
powdercloudcommented, May 18, 2019

I have a fix for it. Will need to roll it into Chromium / V8. https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1618460

Read more comments on GitHub >

github_iconTop Results From Across the Web

puppeteer page.evaluate cannot exposeFunction with args
On the node side, that object won't have a getBoundingClientRect function. ... await page.evaluate(() => { window.do_many_operations ...
Read more >
puppeteer-core 1.17.0 on Node.js NPM - NewReleases.io
No API Changes. Bug Fixes. #4424 - puppeteer from html to pdf arabic fonts are not showing; #4443 - page.evaluate hangs on Args...
Read more >
Overcoming frustration: Correctly using unicode in python2
Anytime you call a function you need to evaluate whether that function will do the right thing with str or unicode values. Sending...
Read more >
Unicode support requirements and limitations
Unicode support requirements and limitations. This is a list of BigFix Platform V9.5 requirements and limitations when using non-ASCII characters:.
Read more >
Unicode Strings | Operators and Expressions in Python
The default encoding is set in the site module and can be queried using ... If a Unicode object is passed as one...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found