wallabyjs / public

Repository for Wallaby.js questions and issues
http://wallabyjs.com
759 stars 45 forks source link

No Chrome Installations Found #2723

Closed crfrolik closed 3 years ago

crfrolik commented 3 years ago

Issue description or question

Installed wallaby into WebStorm on a new computer (Windows 10). The computer does have nodejs v14 installed and Chrome v91.

However, when I start it I get this error:

wallaby.js started
core v1.0.1089
No Chrome installations found.
Error
    at Generator.next (<anonymous>)
    at new Promise (<anonymous>)
    at Generator.next (<anonymous>)
    at new Promise (<anonymous>)
    at new Promise (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:77:11)

Wallaby diagnostics report

{
  editorVersion: 'WebStorm 2021.1.2',
  pluginVersion: '1.0.216',
  editorType: 'IntelliJ',
  osVersion: 'win32 10.0.19042',
  nodeVersion: 'v14.17.0',
  coreVersion: '1.0.1089',
  checksum: 'MjBhNDg1YzRmNTI2MjQ2YTU4MjAxNjRhYzVhMTBjZjEsMTYzMzM5MjAwMDAwMCww',
  config: {
    diagnostics: {
      angular: {
        workspace: {
          '$schema': './node_modules/@angular/cli/lib/config/schema.json',
          version: 1,
          newProjectRoot: 'projects',
          projects: {
            'atlas-dev-tools': {
              projectType: 'application',
              schematics: {},
              root: '',
              sourceRoot: 'src',
              prefix: 'adt',
              architect: {
                build: {
                  builder: '@angular-devkit/build-angular:browser',
                  options: {
                    outputPath: 'dist',
                    index: 'src/index.html',
                    main: 'src/main.ts',
                    polyfills: 'src/polyfills.ts',
                    tsConfig: 'tsconfig.app.json',
                    aot: true,
                    assets: [ 'src/favicon.ico', 'src/assets', 'src/blank.html', { glob: '**/*', input: './plugins', output: '/plugins/' } ],
                    styles: [ 'src/styles/styles.css', 'node_modules/@beclsautomation/atlas-ui-components/styles/json-formatter.less', 'node_modules/ace-diff/dist/ace-diff.min.css' ],
                    scripts: [ 'node_modules/systemjs/dist/s.js', 'node_modules/systemjs/dist/extras/named-register.js', 'node_modules/systemjs/dist/extras/amd.js' ],
                    allowedCommonJsDependencies: [ 'ace-diff', '@beclsautomation/atlas-client-web', '@beclsautomation/atlas-dev-api', 'css-element-queries', 'js-beautify', 'lodash', 'papaparse', 'showdown' ],
                    webWorkerTsConfig: 'tsconfig.worker.json'
                  },
                  configurations: {
                    production: {
                      budgets: [ { type: 'anyComponentStyle', maximumWarning: '6kb' } ],
                      fileReplacements: [ { replace: 'src/environments/environment.ts', with: 'src/environments/environment.prod.ts' } ],
                      optimization: true,
                      outputHashing: 'all',
                      sourceMap: false,
                      namedChunks: false,
                      aot: true,
                      extractLicenses: true,
                      vendorChunk: false,
                      buildOptimizer: true
                    },
                    profile: {
                      budgets: [ { type: 'anyComponentStyle', maximumWarning: '6kb' } ],
                      fileReplacements: [ { replace: 'src/environments/environment.ts', with: 'src/environments/environment.prod.ts' } ],
                      optimization: false,
                      outputHashing: 'all',
                      sourceMap: false,
                      namedChunks: false,
                      aot: true,
                      extractLicenses: true,
                      vendorChunk: false,
                      buildOptimizer: true
                    },
                    'release-dev': { budgets: [ { type: 'anyComponentStyle', maximumWarning: '6kb' } ], deployUrl: '/script?name=' },
                    'release-prod': {
                      budgets: [ { type: 'anyComponentStyle', maximumWarning: '6kb' } ],
                      deployUrl: '/script?name=',
                      fileReplacements: [ { replace: 'src/environments/environment.ts', with: 'src/environments/environment.prod.ts' } ],
                      optimization: true,
                      outputHashing: 'all',
                      sourceMap: false,
                      namedChunks: false,
                      aot: true,
                      extractLicenses: true,
                      vendorChunk: false,
                      buildOptimizer: true,
                      showCircularDependencies: false
                    }
                  }
                },
                serve: {
                  builder: '@angular-devkit/build-angular:dev-server',
                  options: { browserTarget: 'atlas-dev-tools:build' },
                  configurations: { production: { browserTarget: 'atlas-dev-tools:build:production' }, profile: { browserTarget: 'atlas-dev-tools:build:profile' } }
                },
                'extract-i18n': { builder: '@angular-devkit/build-angular:extract-i18n', options: { browserTarget: 'atlas-dev-tools:build' } },
                test: {
                  builder: '@angular-devkit/build-angular:karma',
                  options: {
                    main: 'src/test.ts',
                    codeCoverage: true,
                    polyfills: 'src/polyfills.ts',
                    tsConfig: 'tsconfig.spec.json',
                    karmaConfig: 'karma.conf.js',
                    assets: [ 'src/favicon.ico', 'src/assets' ],
                    styles: [ 'src/styles/styles.css' ],
                    scripts: []
                  }
                },
                lint: { builder: '@angular-eslint/builder:lint', options: { lintFilePatterns: [ 'src/**/*.ts', 'src/**/*.html' ] } }
              }
            }
          },
          defaultProject: 'atlas-dev-tools'
        },
        main: '// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n' +
          '\n' +
          "import 'zone.js/dist/zone-testing';\n" +
          "import {getTestBed} from '@angular/core/testing';\n" +
          "import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';\n" +
          '\n' +
          'declare const require: any;\n' +
          '\n' +
          '// First, initialize the Angular testing environment.\n' +
          'getTestBed().initTestEnvironment(\n' +
          '  BrowserDynamicTestingModule,\n' +
          '  platformBrowserDynamicTesting()\n' +
          ');\n' +
          '// Then we find all the tests.\n' +
          '\n' +
          '// And load the modules.\n' +
          '\n'
      }
    },
    testFramework: { version: 'jasmine@3.6.0', configurator: 'jasmine@2.1.3', reporter: 'jasmine@2.1.3', starter: 'jasmine@2.1.3', autoDetected: true },
    env: { kind: 'chrome', type: 'browser', params: {}, viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
    files: [
      { pattern: 'src/**/*.spec.ts', ignore: true, trigger: true, load: true },
      { pattern: 'src/polyfills.ts', ignore: true, trigger: true, load: true },
      { pattern: 'src/test.ts', ignore: true, trigger: true, load: true },
      { pattern: 'src/main.ts', ignore: true, trigger: true, load: true },
      { pattern: 'src/index.html', ignore: true, trigger: true, load: true },
      { pattern: 'src/test.base.ts', ignore: true, trigger: true, load: true },
      { pattern: 'src/test.wallaby.ts', ignore: false, trigger: true, load: true, order: 1 },
      { pattern: 'src/**/*.+(ts|js)', load: false, ignore: false, trigger: true, order: 2 },
      { pattern: 'src/**/*.+(css|less|scss|sass|styl|html|json|svg)', instrument: false, load: false, ignore: false, trigger: true, order: 3 }
    ],
    tests: [ { pattern: 'src/**/*.spec.ts', load: false, ignore: false, trigger: true, test: true, order: 4 } ],
    filesWithNoCoverageCalculated: [],
    runAllTestsInAffectedTestFile: false,
    updateNoMoreThanOneSnapshotPerTestFileRun: false,
    addModifiedTestFileToExclusiveTestRun: true,
    compilers: {},
    preprocessors: {},
    maxConsoleMessagesPerTest: 100,
    autoConsoleLog: true,
    delays: { run: 0, edit: 100, update: 0 },
    workers: { initial: 0, regular: 0, recycle: false },
    teardown: undefined,
    hints: {
      ignoreCoverage: '__REGEXP /ignore coverage|istanbul ignore/',
      ignoreCoverageForFile: '__REGEXP /ignore file coverage/',
      commentAutoLog: '?',
      testFileSelection: { include: '__REGEXP /file\\.only/', exclude: '__REGEXP /file\\.skip/' }
    },
    automaticTestFileSelection: true,
    runSelectedTestsOnly: false,
    mapConsoleMessagesStackTrace: false,
    extensions: {},
    reportUnhandledPromises: false,
    throwOnBeforeUnload: true,
    slowTestThreshold: 75,
    lowCoverageThreshold: 80,
    loose: true,
    configCode: 'auto.detect#1313788472'
  },
  packageJSON: {
    dependencies: {
      '@angular/animations': '~11.2.6',
      '@angular/common': '~11.2.6',
      '@angular/core': '~11.2.6',
      '@angular/elements': '^11.2.6',
      '@angular/forms': '~11.2.6',
      '@angular/platform-browser': '~11.2.6',
      '@angular/platform-browser-dynamic': '~11.2.6',
      '@angular/platform-server': '~11.2.6',
      '@angular/router': '~11.2.6',
      '@beclsautomation/atlas-client-web': '^7.4.0',
      '@beclsautomation/atlas-dev-api': '^1.26.0',
      '@beclsautomation/atlas-ui-components': '^3.22.0',
      '@webcomponents/custom-elements': '^1.4.3',
      'ace-builds': '^1.4.12',
      'ace-diff': '^3.0.3',
      'css-element-queries': '^1.2.3',
      'css.escape': '^1.5.1',
      'date-fns': '^2.19.0',
      diff: '^5.0.0',
      esprima: '^4.0.1',
      'fast-json-stable-stringify': '^2.1.0',
      'flat-map-polyfill': '^0.3.8',
      'isomorphic-ws': '^4.0.1',
      'js-beautify': '^1.13.5',
      jspath: '^0.4.0',
      lodash: '^4.17.21',
      papaparse: '^5.3.0',
      rxjs: '^6.6.6',
      'scroll-into-view-if-needed': '^2.2.27',
      showdown: '^1.9.1',
      'smooth-scroll-into-view-if-needed': '^1.1.30',
      systemjs: '^6.8.3',
      tslib: '^2.0.0',
      uuid: '^8.3.2',
      'zone.js': '^0.11.4'
    },
    devDependencies: {
      '@angular-devkit/build-angular': '~0.1102.5',
      '@angular-eslint/builder': '^2.0.2',
      '@angular-eslint/eslint-plugin': '^2.0.2',
      '@angular-eslint/eslint-plugin-template': '^2.0.2',
      '@angular-eslint/schematics': '^2.0.2',
      '@angular-eslint/template-parser': '^2.0.2',
      '@angular/cli': '^11.2.5',
      '@angular/compiler': '^11.2.6',
      '@angular/compiler-cli': '~11.2.6',
      '@angular/language-service': '~11.2.6',
      '@babel/core': '^7.13.10',
      '@babel/preset-env': '^7.13.10',
      '@beclsautomation/atlas-cli': '~2.14.0',
      '@beclsautomation/atlas-cypress-utils': '^0.0.13',
      '@cypress/webpack-preprocessor': '^5.6.0',
      '@ngneat/spectator': '^7.1.0',
      '@types/chai': '^4.2.15',
      '@types/diff': '^5.0.0',
      '@types/esprima': '^4.0.2',
      '@types/jasmine': '~3.6.7',
      '@types/lodash': '^4.14.168',
      '@types/node': '^14.14.35',
      '@types/papaparse': '^5.2.5',
      '@types/resize-observer-browser': '^0.1.5',
      '@types/showdown': '^1.9.3',
      '@types/uuid': '^8.3.0',
      '@typescript-eslint/eslint-plugin': '^4.18.0',
      '@typescript-eslint/parser': '^4.18.0',
      'babel-loader': '^8.2.2',
      commander: '^7.1.0',
      cypress: '^7.3.0',
      'cypress-pipe': '^2.0.0',
      eslint: '^7.22.0',
      'eslint-plugin-import': '^2.22.1',
      'eslint-plugin-jsdoc': '^32.3.0',
      'eslint-plugin-prefer-arrow': '^1.2.3',
      'fs-extra': '^9.1.0',
      gzipper: '^4.4.0',
      'jasmine-core': '~3.7.1',
      'jasmine-reporters': '^2.4.0',
      'jasmine-spec-reporter': '^6.0.0',
      json5: '^2.2.0',
      karma: '^6.2.0',
      'karma-chrome-launcher': '~3.1.0',
      'karma-cli': '^2.0.0',
      'karma-coverage': '^2.0.3',
      'karma-jasmine': '~4.0.0',
      'karma-jasmine-html-reporter': '^1.5.0',
      'karma-junit-reporter': '^2.0.1',
      'karma-spec-reporter': '^0.0.32',
      'ng-packagr': '^11.2.4',
      'node-os-utils': '^1.3.5',
      'postinstall-postinstall': '^2.1.0',
      'prevent-publish': '^0.0.4',
      'source-map-explorer': '^2.4.2',
      'spawn-npm-install': '^1.2.0',
      'ts-loader': '^8.0.18',
      'ts-node': '^9.1.1',
      typedoc: '^0.20.32',
      typescript: '~4.1.5',
      'wallaby-webpack': '^3.9.15',
      webpack: '~4.44.2',
      ws: '^7.4.4',
      xml2js: '^0.4.23'
    }
  },
  fs: { numberOfFiles: 688 },
  debug: [
    '2021-06-04T20:34:47.184Z angular/cli config Detected Angular CLI.\n',
    '2021-06-04T20:34:49.737Z angular/cli karma project config Using virtual D:/Projects/atlas-dev-tools/src/test.ts.\n',
    '2021-06-04T20:34:49.764Z project Wallaby Node version: v14.17.0\n',
    '2021-06-04T20:34:49.764Z project Wallaby config: D:\\Projects\\atlas-dev-tools\\auto.detect\n',
    '2021-06-04T20:34:50.359Z project File cache: C:\\Users\\crfrolik\\AppData\\Local\\JetBrains\\WebStorm2021.1\\wallaby\\projects\\be5926fe9a402529\n',
    '2021-06-04T20:34:50.524Z uiService Listening port 51235\n',
    '2021-06-04T20:34:50.628Z workers Parallelism for initial run: 10, for regular run: 5\n',
    '2021-06-04T20:34:50.628Z workers Starting run worker instance #0\n',
    '2021-06-04T20:34:50.628Z workers Starting run worker instance #1\n',
    '2021-06-04T20:34:50.629Z workers Starting run worker instance #2\n',
    '2021-06-04T20:34:50.629Z workers Starting run worker instance #3\n',
    '2021-06-04T20:34:50.629Z workers Starting run worker instance #4\n',
    '2021-06-04T20:34:50.629Z workers Starting run worker instance #5\n',
    '2021-06-04T20:34:50.629Z workers Starting run worker instance #6\n',
    '2021-06-04T20:34:50.629Z workers Starting run worker instance #7\n',
    '2021-06-04T20:34:50.629Z workers Starting run worker instance #8\n',
    '2021-06-04T20:34:50.629Z workers Starting run worker instance #9\n',
    '2021-06-04T20:34:50.631Z workers Web server is listening at 61399\n',
    '2021-06-04T20:34:50.632Z workers Started run worker instance (immediate) #0\n',
    '2021-06-04T20:34:50.632Z workers Started run worker instance (immediate) #1\n',
    '2021-06-04T20:34:50.632Z workers Started run worker instance (immediate) #2\n',
    '2021-06-04T20:34:50.632Z workers Started run worker instance (immediate) #3\n',
    '2021-06-04T20:34:50.632Z workers Started run worker instance (immediate) #4\n',
    '2021-06-04T20:34:50.632Z workers Started run worker instance (immediate) #5\n',
    '2021-06-04T20:34:50.632Z workers Started run worker instance (immediate) #6\n',
    '2021-06-04T20:34:50.632Z workers Started run worker instance (immediate) #7\n',
    '2021-06-04T20:34:50.632Z workers Started run worker instance (immediate) #8\n',
    '2021-06-04T20:34:50.632Z workers Started run worker instance (immediate) #9\n',
    '2021-06-04T20:34:50.634Z project Stopping process pool\n',
    '2021-06-04T20:34:50.634Z project File cache is up-to-date, starting full test run\n',
    '2021-06-04T20:34:50.636Z project Running postprocessor\n',
    '2021-06-04T20:34:50.643Z postprocessor Processing started.\n',
    '2021-06-04T20:34:50.643Z postprocessor Initializing.\n',
    '2021-06-04T20:34:50.643Z postprocessor Initializing entry.\n',
    '2021-06-04T20:34:50.643Z postprocessor Sanitizing configuration.\n',
    '2021-06-04T20:34:50.643Z postprocessor Adjusting configuration.\n',
    '2021-06-04T20:34:50.643Z postprocessor Creating compiler.\n',
    '2021-06-04T20:34:50.726Z postprocessor Customizing compiler.\n',
    '2021-06-04T20:34:50.727Z postprocessor Compilation started.\n',
    '2021-06-04T20:35:18.761Z postprocessor Compilation finished.\n',
    '2021-06-04T20:35:23.821Z postprocessor Emitting 1456 files.\n',
    '2021-06-04T20:35:23.876Z postprocessor Processing finished.\n',
    '2021-06-04T20:35:23.999Z project Postprocessor execution finished\n',
    '2021-06-04T20:35:23.999Z project Test run started; run priority: 3\n',
    '2021-06-04T20:35:24.010Z project Running all tests\n',
    '2021-06-04T20:35:24.038Z workers Starting test run, priority: 3\n',
    '2021-06-04T20:35:24.038Z chromeRunner Starting sandbox [worker #0, session #4e9rv]\n',
    '2021-06-04T20:35:24.038Z chromeRunner Preparing sandbox [worker #0, session #4e9rv]\n',
    '2021-06-04T20:35:24.040Z browserRunner Total files to load in sandbox: 5\n',
    '2021-06-04T20:35:24.043Z browserRunner Sandbox is generated [worker #0, session #4e9rv]: http://localhost:61399/wallaby_sandbox0.html\n',
    '2021-06-04T20:35:24.043Z chromeRunner Prepared sandbox [worker #0, session #4e9rv]\n',
    '2021-06-04T20:35:24.043Z workers [worker #0, session #4e9rv] Running tests in sandbox\n',
    "2021-06-04T20:35:24.044Z chromeRunner Failed to evaluate code on Chrome Tab: Cannot read property 'Runtime' of undefined\n",
    '2021-06-04T20:35:24.546Z workers [4e9rv] Sandbox is not responsive, recycling worker instance\n',
    '2021-06-04T20:35:24.547Z project Test run finished\n'
  ]
}
crfrolik commented 3 years ago

Not sure if this is relevant; it could be, since it would only impact new Chrome installations: https://www.ghacks.net/2020/06/11/google-chrome-is-soon-going-to-be-installed-in-a-different-directory-on-windows/

smcenlly commented 3 years ago

Can you please tell us:

  1. The location of Google Chrome executable, and
  2. how you installed chrome?

Under the covers, we use chrome-launcher@0.13.4, which appears to be compatible with the new chrome.exe location mentioned in the article.

While we are troubleshooting the issue, you may use the env.runner configuration property to provide an absolute path to your version of Chrome:

Wallaby.js Configuration Example

module.exports = () => ({
  autoDetect: true,

  env: {
    kind: 'chrome',
    runner: 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'
  }
});
crfrolik commented 3 years ago

Looks like it is present here: C:\Program Files\Google\Chrome\Application\chrome.exe

I installed it from here: https://www.google.com/chrome/index.html

crfrolik commented 3 years ago

Thanks for mentioning that you use chrome-launcher; I was able to discover that they will use the CHROME_PATH environment variable if it is set. Setting this resolved my issue.