Skip to content

Karma tests fail on M1 Macs #2374

Closed
@mattjennings

Description

@mattjennings

Relavant discussion - #2372

The karma test suite currently fails on Macs using M1 chips due to various webgl errors. Switching from Chrome to Chromium fixes this.

Steps to Reproduce

Run npm run test on a Mac with M1 chip

Expected Result

tests to pass

Actual Result

about ~80 tests fail with an error like:

Chrome Headless 99.0.4844.0 (Mac OS 10.15.7) A VertexBuffer can bind a buffer FAILED
        Error: Failed to retrieve webgl context from browser
            at new ExcaliburGraphicsContextWebGL (/var/folders/zf/t18x1b8s31s64l4hcxgdbl240000gn/T/_karma_webpack_504653/commons.js:2507:67239)
            at UserContext.<anonymous> (/var/folders/zf/t18x1b8s31s64l4hcxgdbl240000gn/T/_karma_webpack_504653/commons.js:25443:22)
            at <Jasmine>
        Error: Attempted gl access before init
            at Function.get gl [as gl] (/var/folders/zf/t18x1b8s31s64l4hcxgdbl240000gn/T/_karma_webpack_504653/commons.js:2779:3191)
            at new VertexBuffer (/var/folders/zf/t18x1b8s31s64l4hcxgdbl240000gn/T/_karma_webpack_504653/commons.js:2847:8327)
            at UserContext.<anonymous> (/var/folders/zf/t18x1b8s31s64l4hcxgdbl240000gn/T/_karma_webpack_504653/commons.js:25468:21)
            at <Jasmine>

Environment

  • browsers and versions: Chrome Headless 99.0.4844.0 & Node 16
  • operating system: macOS 12.4
  • Excalibur versions: 0.26
  • (anything else that may be relevant)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions