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

Uncaught TypeError: Cannot read property 'deleteSession' of null #236

Open
Krinkle opened this issue Dec 30, 2020 · 2 comments
Open

Uncaught TypeError: Cannot read property 'deleteSession' of null #236

Krinkle opened this issue Dec 30, 2020 · 2 comments

Comments

@Krinkle
Copy link

Krinkle commented Dec 30, 2020

Environment:

  • GitHub Actions, ubuntu-20.04
  • Node.js 14.15.1 (latest LTS, also affects Node.js 12 and Node.js 10)
  • [email protected] (latest, also affects 4.3.3 and 4.3.2)
  • [email protected] (latest)

Example at https://github.com/Krinkle/kiwix-js/runs/1620210786?check_suite_focus=true

Tue, 29 Dec 2020 04:22:39 GMT > karma start tests/karma.conf.saucelabs.js

Tue, 29 Dec 2020 04:23:40 GMT … WARN [launcher]: firefox   on SauceLabs have not captured in 60000 ms, killing.
Tue, 29 Dec 2020 04:23:40 GMT … ERROR [SaucelabsLauncher]: Could not quit the Saucelabs selenium connection.
  Failure message:
  TypeError: Cannot read property 'deleteSession' of null
    at SaucelabsLauncher.<anonymous> (/home/runner/work/kiwix-js/kiwix-js/node_modules/karma-sauce-launcher/dist/launcher/launcher.js:139:26)
    at Generator.next (<anonymous>)
    at /home/runner/work/kiwix-js/kiwix-js/node_modules/karma-sauce-launcher/dist/launcher/launcher.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/runner/work/kiwix-js/kiwix-js/node_modules/karma-sauce-launcher/dist/launcher/launcher.js:4:12)
    at SaucelabsLauncher.<anonymous> (/home/runner/work/kiwix-js/kiwix-js/node_modules/karma-sauce-launcher/dist/launcher/launcher.js:131:31)
    at SaucelabsLauncher.emit (events.js:315:20)
    at SaucelabsLauncher.EventEmitter.emit (domain.js:486:12)
    at SaucelabsLauncher.emitAsync (/home/runner/work/kiwix-js/kiwix-js/node_modules/karma/lib/events.js:52:10)
    at SaucelabsLauncher.BaseLauncher.kill (/home/runner/work/kiwix-js/kiwix-js/node_modules/karma/lib/launchers/base.js:61:27)

Tue, 29 Dec 2020 04:23:40 GMT … WARN [launcher]: chrome   on SauceLabs have not captured in 60000 ms, killing.
…

Tue, 29 Dec 2020 04:23:40 GMT … WARN [launcher]: MicrosoftEdge 15.15063  on SauceLabs have not captured in 60000 ms, killing.
…

Tue, 29 Dec 2020 04:23:40 GMT … WARN [launcher]: MicrosoftEdge 18.17763  on SauceLabs have not captured in 60000 ms, killing.
…

It works fine from my machine with Node.js 10.15.2 on Debian 9 Stretch (via Docker for Mac), and it used to work fine on Travis CI, but now on GitHub Actions I can't get it work.

I've tried everything I could think of, including different Node.js versions and the latest versions of dependencies, and verifying that credentials are making it through.

As you can see from the timestamps, it happens immediately upon startup, so contrary to the warning, it is not a timeout. (The error message itself might be a secondary problem, as that led to some additional confusion initially.)

@Krinkle
Copy link
Author

Krinkle commented Dec 30, 2020

Nevermind. I eventually figured out that the issue was that the connection wasn't being estalished in the first place because the SAUCE_ACCESS_KEY was missing. I mistakenly assumed that GitHub Actions would work similarly to Travis CI and allow forked repositories to provide their own secrets. But, despite GitHub happily allowing you to configure secrets in a forked repo, these are completely ignored.

It might be good if karma-sauce-launcher would give a better error message since there is nothing in the above that suggests incorrect or missing credentials, or indeed anything about the connection not being established.

The two errors shown are both "wrong", there is no 60s timeout reached, and there is no issue in quiting the connection. There was never a connection in the first place.

If that's a valid issue and not an upstream issue, great. Otherwise, feel free to close this :)

@sakshiiii38
Copy link

I want to work on this issue as I am new so please guide me through.

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

No branches or pull requests

2 participants