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

Firefox begin update when karma launch it #85

Open
Mingun opened this issue Apr 4, 2018 · 3 comments
Open

Firefox begin update when karma launch it #85

Mingun opened this issue Apr 4, 2018 · 3 comments

Comments

@Mingun
Copy link

Mingun commented Apr 4, 2018

Of course because of it tests are not runned. I think, there shall be a method to forbid auto update of the browser when test starts. I get following output to the console:

D:\Projects\other\structured-diff>npm run browser

> structured-diff@1.0.0 browser D:\Projects\other\structured-diff
> karma start

04 04 2018 22:34:36.038:DEBUG [config]: Loading config D:\Projects\other\structured-diff\karma.conf.js
04 04 2018 22:34:36.082:DEBUG [plugin]: Loading karma-* from D:\Projects\other\structured-diff\node_modules
04 04 2018 22:34:36.095:DEBUG [plugin]: Loading plugin D:\Projects\other\structured-diff\node_modules/karma-browserify.
04 04 2018 22:34:36.500:DEBUG [plugin]: Loading plugin D:\Projects\other\structured-diff\node_modules/karma-chrome-launcher.
04 04 2018 22:34:36.547:DEBUG [plugin]: Loading plugin D:\Projects\other\structured-diff\node_modules/karma-firefox-launcher.
04 04 2018 22:34:36.562:DEBUG [plugin]: Loading plugin D:\Projects\other\structured-diff\node_modules/karma-mocha.
04 04 2018 22:34:36.576:DEBUG [plugin]: Loading plugin D:\Projects\other\structured-diff\node_modules/karma-mocha-reporter.
04 04 2018 22:34:36.821:DEBUG [plugin]: Loading plugin D:\Projects\other\structured-diff\node_modules/karma-opera-launcher.
04 04 2018 22:34:36.833:DEBUG [plugin]: Loading plugin D:\Projects\other\structured-diff\node_modules/karma-sauce-launcher.
04 04 2018 22:34:38.608:DEBUG [framework.browserify]: created browserify bundle: C:\Users\mingun\AppData\Local\Temp\39d0116d299ec0c95803c09842d37005.browserify
04 04 2018 22:34:38.731:DEBUG [framework.browserify]: add bundle to config.files at position 0
04 04 2018 22:34:38.762:DEBUG [web-server]: Instantiating middleware
04 04 2018 22:34:38.770:DEBUG [reporter]: Trying to load reporter: mocha
04 04 2018 22:34:38.785:DEBUG [reporter]: Trying to load color-version of reporter: mocha (mocha_color)
04 04 2018 22:34:38.792:DEBUG [reporter]: Couldn't load color-version.

START:
04 04 2018 22:34:39.065:DEBUG [framework.browserify]: building bundle
04 04 2018 22:34:39.073:DEBUG [framework.browserify]: updating lib\diff.js in bundle
04 04 2018 22:34:39.077:DEBUG [framework.browserify]: updating lib\hunk.js in bundle
04 04 2018 22:34:39.114:DEBUG [framework.browserify]: updating lib\inline.js in bundle
04 04 2018 22:34:39.118:DEBUG [framework.browserify]: updating lib\object.js in bundle
04 04 2018 22:34:39.195:DEBUG [framework.browserify]: updating lib\word-diff.js in bundle
04 04 2018 22:34:39.249:DEBUG [framework.browserify]: updating lib\unified.js in bundle
04 04 2018 22:34:39.262:DEBUG [framework.browserify]: updating test\diff.js in bundle
04 04 2018 22:34:39.269:DEBUG [framework.browserify]: updating test\hunk.js in bundle
04 04 2018 22:34:39.314:DEBUG [framework.browserify]: updating test\inline.js in bundle
04 04 2018 22:34:39.318:DEBUG [framework.browserify]: updating test\unified.js in bundle
04 04 2018 22:34:40.040:DEBUG [framework.browserify]: bundling
04 04 2018 22:34:44.039:INFO [framework.browserify]: bundle built
04 04 2018 22:34:44.095:INFO [karma]: Karma v2.0.0 server started at http://0.0.0.0:9876/
04 04 2018 22:34:44.104:INFO [launcher]: Launching browser Firefox with unlimited concurrency
04 04 2018 22:34:44.146:INFO [launcher]: Starting browser Firefox
04 04 2018 22:34:44.158:DEBUG [temp-dir]: Creating temp dir at C:\Users\mingun\AppData\Local\Temp\karma-11747892
04 04 2018 22:34:44.168:DEBUG [launcher]: D:\Полезные программы\Mozilla Firefox\firefox.exe http://localhost:9876/?id=11747892 -profile C:\Users\mingun\AppData\Local\Temp\karma-11747892 -no-remote
04 04 2018 22:34:44.999:DEBUG [launcher]: Process Firefox exited with code 0
04 04 2018 22:34:45.001:ERROR [launcher]: Cannot start Firefox

04 04 2018 22:34:45.002:ERROR [launcher]: Firefox stdout:
04 04 2018 22:34:45.002:ERROR [launcher]: Firefox stderr:
04 04 2018 22:34:45.005:DEBUG [temp-dir]: Cleaning temp dir C:\Users\mingun\AppData\Local\Temp\karma-11747892
04 04 2018 22:34:45.026:INFO [launcher]: Trying to start Firefox again (1/2).
04 04 2018 22:34:45.029:DEBUG [launcher]: Restarting Firefox
04 04 2018 22:34:45.030:DEBUG [temp-dir]: Creating temp dir at C:\Users\mingun\AppData\Local\Temp\karma-11747892
04 04 2018 22:34:45.035:DEBUG [launcher]: D:\Полезные программы\Mozilla Firefox\firefox.exe http://localhost:9876/?id=11747892 -profile C:\Users\mingun\AppData\Local\Temp\karma-11747892 -no-remote
04 04 2018 22:34:46.194:DEBUG [launcher]: Process Firefox exited with code 0
04 04 2018 22:34:46.196:ERROR [launcher]: Cannot start Firefox

04 04 2018 22:34:46.197:ERROR [launcher]: Firefox stdout:
04 04 2018 22:34:46.198:ERROR [launcher]: Firefox stderr:
04 04 2018 22:34:46.199:DEBUG [temp-dir]: Cleaning temp dir C:\Users\mingun\AppData\Local\Temp\karma-11747892
04 04 2018 22:34:46.219:INFO [launcher]: Trying to start Firefox again (2/2).
04 04 2018 22:34:46.221:DEBUG [launcher]: Restarting Firefox
04 04 2018 22:34:46.223:DEBUG [temp-dir]: Creating temp dir at C:\Users\mingun\AppData\Local\Temp\karma-11747892
04 04 2018 22:34:46.228:DEBUG [launcher]: D:\Полезные программы\Mozilla Firefox\firefox.exe http://localhost:9876/?id=11747892 -profile C:\Users\mingun\AppData\Local\Temp\karma-11747892 -no-remote
04 04 2018 22:34:47.817:DEBUG [launcher]: Process Firefox exited with code 0
04 04 2018 22:34:47.820:ERROR [launcher]: Cannot start Firefox

04 04 2018 22:34:47.822:ERROR [launcher]: Firefox stdout:
04 04 2018 22:34:47.823:ERROR [launcher]: Firefox stderr:
04 04 2018 22:34:47.826:DEBUG [temp-dir]: Cleaning temp dir C:\Users\mingun\AppData\Local\Temp\karma-11747892
04 04 2018 22:34:47.836:ERROR [launcher]: Firefox failed 2 times (cannot start). Giving up.

Finished in 0 secs / 0 secs @ 22:34:47 GMT+0500 (Уральское время (зима))

04 04 2018 22:34:47.846:DEBUG [karma]: Run complete, exiting.
04 04 2018 22:34:47.849:DEBUG [launcher]: Disconnecting all browsers
04 04 2018 22:34:47.852:DEBUG [framework.browserify]: cleaning up

npm ERR! Windows_NT 6.0.6001
npm ERR! argv "D:\\Scripts\\JavaScript\\node.exe" "D:\\Scripts\\JavaScript\\node_modules\\npm\\bin\\npm-cli.js" "run" "browser"
npm ERR! node v5.12.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! structured-diff@1.0.0 browser: `karma start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the structured-diff@1.0.0 browser script 'karma start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the structured-diff package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     karma start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs structured-diff
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls structured-diff
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\Projects\other\structured-diff\npm-debug.log

D:\Projects\other\structured-diff>
@mschaaf
Copy link
Contributor

mschaaf commented Feb 18, 2020

Setting the launcher prefs 'app.update.enabled': false should prevent Firefox from updating.

@birtles
Copy link
Collaborator

birtles commented Apr 14, 2020

Looks like this is now app.update.disabledForTesting as of bug 1420514 but, as the name suggests, it only applies when either the browser is being run in automation or marionette:

Digging into the definition of IsInAutomation:

it looks like it's based on whether or not security has been turned off. That's probably why the patches that introduced this pref also flipped security.turn_off_all_security_so_that_viruses_can_take_over_this_computer on in a number of places:

e.g.

So presumably we need to flip those two prefs. I'm not entirely sure if that's desirable. I mean, viruses are bad.

@birtles
Copy link
Collaborator

birtles commented Apr 14, 2020

Oh wait, according to https://bugzilla.mozilla.org/show_bug.cgi?id=1420514#c48 the MOZ_DISABLE_NONLOCAL_CONNECTIONS environment variable also needs to be set. I'm guessing we don't want to set that for karma-runner however.

So, there might be nothing we can do here. Basically, the pref is gone. The only other option is to try to set an enterprise policy but that sounds complicated.

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

3 participants