Skip to content

Running tests in headless mode for Firefox is failing with 500 code response but ok in web browser #2261

Closed
@arn-the-long-beard

Description

@arn-the-long-beard

Describe the Bug

Hello guys !

First, I want to say thank you so much for wasm-bindgen. It feel soooo good to use Rust to do web stuff <3 !!!

Now, since today my command wasm-pack test --firefox --headless is failing this way on fresh clone from the tutorial repos and older project when I followed the nice tutorial.

Running headless tests in Firefox on `http://127.0.0.1:35995/`
Try find `webdriver.json` for configure browser's capabilities:
Not found
driver status: signal: 9                          
driver stdout:
    1596024416809	geckodriver	INFO	Listening on 127.0.0.1:35995

Error: non-200 response code: 500                 
{"value":{"error":"unknown error","message":"Invalid Content-Type","stacktrace":""}}
error: test failed, to rerun pass '--test web'
Error: Running Wasm tests with wasm-bindgen-test failed
Caused by: failed to execute `cargo test`: exited with exit code: 1
  full command: "cargo" "test" "--target" "wasm32-unknown-unknown"

If I run just wasm-pack test --firefox and go in my Firefox, everything works as expected.

Am I missing something ? I read the tutorial over and over and I am not sure what is happening or if I should post this issue there : https://github.com/mozilla/geckodriver/issues

Steps to Reproduce

  1. -> git clone https://github.com/rustwasm/wasm_game_of_life.git
  2. -> cd wasm_game_of_life
  3. -> wasm-pack test --firefox --headless

Expected Behavior

Should :

  • detect tests
  • run tests
  • pass tests

example from wasm-pack test --chrome --headless

INFO]: Checking for the Wasm target...
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
[INFO]: Installing wasm-bindgen...
    Finished test [unoptimized + debuginfo] target(s) in 0.01s
     Running target/wasm32-unknown-unknown/debug/deps/wasm_game_of_life-8e78d1069e23af04.wasm
no tests to run!
     Running target/wasm32-unknown-unknown/debug/deps/web-ceee830f7a9d7373.wasm
Set timeout to 20 seconds...
Running headless tests in Chrome on `http://127.0.0.1:34345/`
Try find `webdriver.json` for configure browser's capabilities:
Not found
running 2 tests                                   

test web::test_tick ... ok
test web::pass ... ok

test result: ok. 2 passed; 0 failed; 0 ignored

Actual Behavior

Running headless tests in Firefox on `http://127.0.0.1:35995/`
Try find `webdriver.json` for configure browser's capabilities:
Not found
driver status: signal: 9                          
driver stdout:
    1596024416809	geckodriver	INFO	Listening on 127.0.0.1:35995

Error: non-200 response code: 500                 
{"value":{"error":"unknown error","message":"Invalid Content-Type","stacktrace":""}}
error: test failed, to rerun pass '--test web'
Error: Running Wasm tests with wasm-bindgen-test failed
Caused by: failed to execute `cargo test`: exited with exit code: 1
  full command: "cargo" "test" "--target" "wasm32-unknown-unknown"

Additional Context

On my linux my mozilla is 78.0.2 (64-bit)

Linux Mint 19.3
Ubuntu Bionic

Additional Details

Everything was working good last week. I see that geckodriver got an update on Monday , should I post the issue there maybe ? Is it maybe related ?

Thank you for your feedback & help guys !!!

PS: this is maybe the first big issue I ever posted, every feedback is welcomed to improve my writing style :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions