[đ Bug]: JSON encoding warning from Ruby Selenium::WebDriver::Remote::Http::Common
Description
What I saw:
Due to a recent change in the JSON module, which is a dependency, when a non UTF-8 value reaches Selenium::WebDriver::Remote::Http::Common then a warning is thrown:
warning: JSON.generate: UTF-8 string passed as BINARY, this will raise an encoding error in json 3.0
What I would expect:
Values are encoded as UTF-8 before being passed on to the JSON.generate call, or otherwise if they fail encoding, an error is raised.
Reproducible Code
Selenium::WebDriver::Driver.execute_script( 'return navigator.userAgent;'.force_encoding( Encoding::BINARY ) )
âšī¸ Last known working version: It is an issue with the JSON dependency, which has changed.
@theDogOfPavlov, thank you for creating this issue. We will troubleshoot it as soon as we can.
Selenium Triage Team: remember to follow the Triage Guide
â ī¸ You reported using Selenium version 4.38, but the latest release is 4.39.
Please verify that this issue still occurs with the latest version. If it no longer applies, you can close this issue or update your comment.
This issue will be marked "awaiting answer" and may be closed automatically if no response is received.
Still affects 4.39