Skip to content
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

Tests have started failing on Firefox #1904

Closed
samhed opened this issue Oct 9, 2024 · 8 comments
Closed

Tests have started failing on Firefox #1904

samhed opened this issue Oct 9, 2024 · 8 comments

Comments

@samhed
Copy link
Member

samhed commented Oct 9, 2024

Describe the bug
Two out of 11 test-runs fail on GitHub, as seen on pr #1428:

  • Test / test (windows-latest, FirefoxHeadless) (pull_request):
FAILED TESTS:
  H.264 Decoder Functional Test
    ✖ should handle H.264 rect
      Firefox 130.0 (Windows 10)
    Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

    ✖ should handle specific context reset
      Firefox 130.0 (Windows 10)
    Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

    ✖ should handle global context reset
      Firefox 130.0 (Windows 10)
    Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  • Test / test (ubuntu-latest, FirefoxHeadless) (pull_request):
FAILED TESTS:
  H.264 Decoder Functional Test
    ✖ should handle H.264 rect
      Firefox 130.0 (Ubuntu 0.0.0)
    Failed to decode frame: Operation is not supported
    _handleError@core/decoders/h264.js:145:15
    error@core/decoders/h264.js:152:34
    

    ✖ should handle specific context reset
      Firefox 130.0 (Ubuntu 0.0.0)
    Failed to decode frame: Operation is not supported
    _handleError@core/decoders/h264.js:145:15
    error@core/decoders/h264.js:152:34
    

    ✖ should handle global context reset
      Firefox 130.0 (Ubuntu 0.0.0)
    Failed to decode frame: Operation is not supported
    _handleError@core/decoders/h264.js:145:15
    error@core/decoders/h264.js:152:34

Additional context

It seems all failed tests have something to do with H.264 on Firefox, @any1 could it be that Firefox now has support for this? Perhaps the unit tests need to be modified somehow.

I cannot reproduce the issue myself on Linux, all unit tests work on my workstation, both in Firefox 131 and Chrome 129.

But in Firefox on Windows 11, I get this error instead:

FAILED TESTS:
    Protocol Initialization States
      Authentication
        RSA-AES Authentication (type 6) Handler
          ✖ "before all" hook for "should fire the serververification event"
            Firefox 131.0 (Windows 10)
          Trying to stub property 'generateKey' of undefined
          throwOnFalsyObject@http://samuel.lkpg.cendio.se:9876node_modules/sinon/pkg/sinon-esm.js:4146:15
          stub@http://samuel.lkpg.cendio.se:9876node_modules/sinon/pkg/sinon-esm.js:3959:24
          stub@http://samuel.lkpg.cendio.se:9876node_modules/sinon/pkg/sinon-esm.js:3435:39
          @http://samuel.lkpg.cendio.se:9876tests/test.rfb.js:1445:27
          

          ✖ "after all" hook for "should send credentials to server"
            Firefox 131.0 (Windows 10)
          window.crypto.subtle is undefined
          @http://samuel.lkpg.cendio.se:9876tests/test.rfb.js:1449:21
          

        ARD Authentication (type 30) Handler
          ✖ should return properly encrypted credentials and public key
            Firefox 131.0 (Windows 10)
          Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
@samhed samhed added the infra label Oct 9, 2024
@any1
Copy link
Contributor

any1 commented Oct 14, 2024

Maybe an additional feature check is required.

@CendioOssman
Copy link
Member

I can reproduce the issue on Ubuntu when I run it headless, but not when running it "normal". On Fedora, I cannot reproduce the issue either way. The difference seems to be which H.264 decoder is used. On Ubuntu, I'm getting OpenH264, whilst I have FFMPEG on the Fedora.

So it would seem there is some bug with OpenH264 in headless mode. I'll try to report a bug to Firefox about it.

The reason it's breaking the noVNC tests is because the call to isConfigSupported() is incorrect. It returns an Object, not a simple boolean.

If I change that, things start working on Ubuntu (as far as it now skips those tests in headless). However, it still breaks when run in GitHub actions. I'm getting a different error though: "The given encoding is not supported.".

Will need to dig further.

@any1
Copy link
Contributor

any1 commented Nov 20, 2024

The reason it's breaking the noVNC tests is because the call to isConfigSupported() is incorrect. It returns an Object, not a simple boolean.

Oh, wow, I guess I just assumed that a function named like isSomethingTheCase() would return a boolean, but yeah, my bad.

@CendioOssman
Copy link
Member

Hmm... So the snap Firefox included in Ubuntu works with that fix. But the .deb Firefox installed from Mozilla gives that new error. The Mozilla one even gives that error in "normal" mode.

@CendioOssman
Copy link
Member

@CendioOssman
Copy link
Member

I've worked around that issue by simply doing a test decode in the H.264 check.

Unfortunately, there is still yet another bug in Firefox. This time on Windows.

@CendioOssman
Copy link
Member

Windows bug reported:

https://bugzilla.mozilla.org/show_bug.cgi?id=1932579

@CendioOssman
Copy link
Member

Finally. A bunch of workarounds later and I'm now getting everything to run through.

H.264 is often skipped on Firefox, though, but I don't think we can do much about that. We'll have to wait for them to fix things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants