question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Attempting to use -firefox with -chromium installed results in TypeError

See original GitHub issue

I have just starting playing with jest + playwright and was trying to run multiple browser configurations when I ran into this issue.

The error I am getting is

 FAIL   browser: firefox  tests/basic.test.ts
  ● Test suite failed to run

    TypeError: Cannot read property 'launch' of undefined

      at getBrowserPerProcess (node_modules/jest-playwright-preset/lib/PlaywrightEnvironment.js:24:41)
      at PlaywrightEnvironment.setup (node_modules/jest-playwright-preset/lib/PlaywrightEnvironment.js:62:41)

 FAIL   browser: firefox  tests/basic.test.js
  ● Test suite failed to run

    TypeError: Cannot read property 'launch' of undefined

      at getBrowserPerProcess (node_modules/jest-playwright-preset/lib/PlaywrightEnvironment.js:24:41)
      at PlaywrightEnvironment.setup (node_modules/jest-playwright-preset/lib/PlaywrightEnvironment.js:62:41)

Test Suites: 2 failed, 2 total
Tests:       0 total
Snapshots:   0 total
Time:        0.339 s
Ran all test suites.

jest.config.js

module.exports = {
  preset: 'jest-playwright-preset'
};

jest-playwright.config.js

module.exports = {
  browsers: [
    //  "chromium",
      "firefox"
    ]
};

basic.test.js

describe('basic test', () => {
    it('should load google.com', async () => {
        await page.goto('https://google.com/');
        expect(await page.title()).toBe("Google");
    });

    it('should also load google.com', async () => {
        await page.goto('https://google.com/');
        expect(await page.title()).toBe("Google");
    })
});

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nartholliscommented, Jun 15, 2020

Thats working! Thanks very much.

0reactions
mmarkelovcommented, Jun 15, 2020

@narthollis sorry for late response. I just published 0.2.4, that should fix your issue. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript Application error: TypeError: text is undefined
This issue can be caused by an extension that isn't working properly. Start Firefox in Diagnose Firefox issues using Troubleshoot Mode to check ......
Read more >
Could not find expected browser chrome locally - Stack Overflow
Error: Could not find expected browser (chrome) locally. Run npm install to download the correct Chromium revision (884014). Tried "npm install" ...
Read more >
[bug] "firefox" browser was not found. · Issue #477 - GitHub
playwright playwright==1.8.0a1 playwright install Run my script with firefox erro.. webkit and chrome still work "firefox" browser was not ...
Read more >
Failed to assume control of Edge or Chrome or Firefox error
The Microsoft Edge, Google Chrome, or Firefox web extension isn't installed properly or enabled. Verifying issue for cause 1. Execution of a ...
Read more >
Zoom Web SDK Firefox Crash on clicking "Join" button
Description Hello, I would like to integrate Zoom Web SDK into my website, and I was trying to figure out how it works...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found