-
Notifications
You must be signed in to change notification settings - Fork 399
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
Headless chrome test fails due to incorrect chromedriver version #1126
Comments
I read chromedriver.rs, and there's a note about chrome version being difficult to determine on windows, which I guess is why the code isn't already doing what I proposed, i.e. detecting the browser version and acting appropriately. With that in mind, I'd propose that
|
I think this is the best approach |
EDIT: I fibbed a bit on a couple of points (
struckoutbelow). Not that it's relevant, but to be clear, chrome is not a snap on Ubuntu, but rather a Debian package (it's chromium that's a snap). Also, I got to wondering why Ubuntu 20.x wasn't on the latest version of chrome, and it turned out I wasn't actually up-to-date after all (whoops). I'm now on 100.0.4896.60, and everything of course works as expected since the driver and browser major versions match.So I guess the question is now if wasm-pack wants to support users who, intentionally or otherwise, aren't on the latest version. I would argue that being able to test on arbitrary browser versions, within reason, is a very sensible thing to support.
🐛 Bug description
I'm following the wasm rust tutorial, which instructs me to run a simple test using
wasm-pack test --chrome --headless
. However, the test fails with:Following #611, I reran with
RUST_LOG=wasm_bindgen_test_runner
, which revealed that the incorrect version ofchromedriver
had been selected:Following the docs, I downloaded the correct version of
chromedriver
and attempted to useCHROMEDRIVER=path/to/chromedriver
, but it seems to be ignored:Possibly I misunderstood if that variable is read byHaving read test.rs, I now see that wasm-pack writeswasm-pack
, seeing as it's in a section entitled "Appendix: Testing in headless browsers without wasm-pack".CHROMEDRIVER
in order to pass tocargo test
rather than reading from it.🤔 Expected Behavior
If I understood #611 correctly, the fix (#703) was, per @alexcrichton, "Let's download the most recent stable version." I don't think that's actually the correct behavior, though. Instead, the browser version should be detected and the correct
chromedriver
downloaded as appropriate.I am using the up-to-date chrome snap on Ubuntu 20.04.4 LTS, which is at version 99.0.4844.84 (also seen in logs above).👟 Steps to reproduce
Attempt to run
wasm-pack test --chrome --headless
for any test on a system with chrome 99.0.4844.84 (and probably any pre-100.x.x.x version) and observe that the incorrectchromedriver
version is used.🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: 0.10.2
rustc version: 1.57.0
chrome version: 99.0.4844.84, which as above, is the up-to-date version from the snap on Ubuntu 20.04.4The text was updated successfully, but these errors were encountered: