-
Notifications
You must be signed in to change notification settings - Fork 22
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
java.io.IOException: Got bad status ordinal in StatusSerializer.deserialize() #119
Comments
FTR: The testing framework in question is Scalatest. |
@sbrunk what browser (which Selenium Capabilities) is this occurring with? |
From the top of my head, I have two theories why this might be happening:
|
Thanks for the pointers @gzm0. The browser is Chrome 87 using the following settings: jsEnv in Test := {
val debugging = false // set to true to help debugging
System.setProperty("webdriver.chrome.driver", "target/chromedriver")
new org.scalajs.jsenv.selenium.SeleniumJSEnv(
{
val options = new org.openqa.selenium.chrome.ChromeOptions()
val args = Seq(
"auto-open-devtools-for-tabs", // devtools needs to be open to capture network requests
"no-sandbox",
"allow-file-access-from-files" // change the origin header from 'null' to 'file'
) ++ (if (debugging) Seq.empty else Seq("headless"))
options.addArguments(args: _*)
val capabilities =
org.openqa.selenium.remote.DesiredCapabilities.chrome()
capabilities.setCapability(
org.openqa.selenium.chrome.ChromeOptions.CAPABILITY,
options
)
capabilities
},
org.scalajs.jsenv.selenium.SeleniumJSEnv
.Config()
.withKeepAlive(debugging)
)
} /cc @adamw |
Just to be certain: Does his problem still happen if you remove all the arguments to the chrome driver? |
Potentially related: /issues/105 |
@gzm0 yes, setting jsEnv in Test := {
new org.scalajs.jsenv.selenium.SeleniumJSEnv(new org.openqa.selenium.chrome.ChromeOptions())
} still exhibits the same behavior. I'll try to set it up with Firefox for comparison. |
It seems that our serialization only passes through ASCII characters. So this shouldn't be a problem. Now, maybe null bytes are a problem for certain drivers. |
The tests pass without issues with Firefox/geckodriver using the default settings: jsEnv := new org.scalajs.jsenv.selenium.SeleniumJSEnv(new org.openqa.selenium.firefox.FirefoxOptions()) So the issue seems to be chrome related indeed. |
@sbrunk I'm fine with using firefox instead of chrome, if that would solve the problem, as long as the binaries are automatically downloaded and works on macos/linux :) |
I am transferring this to scala-js-env-selenium. |
Given what I have just found out about #105 (chrome doesn't handle messages containing |
@sbrunk this should be fixed with chrome 89 (no update to scala-js-env-selenium is required). |
@gzm0 thanks for the update. I'll try to confirm that the tapir tests affected by this pass on chrome as soon as chromedriver 89 is available. |
@sbrunk I think chromedriver 89 is now available? if you could verify this with tapir, it would be great :) |
We're seeing
JSEnvRPC$RunTerminatedException
failures in a few tests while running them via scala-js-env-selenium. It seems to be caused by the following exception:I haven't been able to minimize the issue yet, but it's reproducable by checking out the branch to softwaremill/tapir#860 and then running
sbt sttpClientJS/test
(it only occurs when running one of these four tests).Versions: Scala: 2.13.4, Scala.js: 1.3.1, sbt: 1.4.4
Full stack trace:
The text was updated successfully, but these errors were encountered: