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

ember test crashes on run when fingerprinting is enabled in tests in ember-cli 3.4+ #8088

Open
bryanhickerson opened this Issue Oct 4, 2018 · 21 comments

Comments

Projects
None yet
6 participants
@bryanhickerson
Copy link

bryanhickerson commented Oct 4, 2018

After updating to ember-cli 3.4 via ember-cli-update, ember tests crash on run. The only notable error that I see is: Uncaught TypeError: Cannot read property 'afterTests' of undefined. I'm able to install the other updated dependencies in package.json (ember-source, ember-data, etc.), but when I also update ember-cli I get this crash. I'm unsure how I would go about creating a minimal reproduction for this issue.

These are the dependencies in my package.json:

  "devDependencies": {
    "@ember/jquery": "^0.5.2",
    "@ember/optional-features": "^0.7.0",
    "@opentok/client": "^2.14.8",
    "autosize": "^4.0.0",
    "bootstrap-sass": "^3.3.7",
    "bowser": "^1.9.4",
    "broccoli-asset-rev": "^3.0.0",
    "dotenv-flow": "^0.1.0-beta.1",
    "ember-ajax": "^3.1.1",
    "ember-auto-import": "^1.2.13",
    "ember-awesome-macros": "^3.0.0",
    "ember-bootstrap": "^2.0.0",
    "ember-chrome-devtools": "^0.2.0",
    "ember-cli": "~3.4.3",
    "ember-cli-app-version": "^3.2.0",
    "ember-cli-autoprefixer": "^0.8.1",
    "ember-cli-babel": "^7.1.2",
    "ember-cli-code-coverage": "1.0.0-beta.3",
    "ember-cli-dependency-checker": "^3.0.0",
    "ember-cli-deprecation-workflow": "^1.0.0",
    "ember-cli-eslint": "^4.2.3",
    "ember-cli-htmlbars": "^3.0.0",
    "ember-cli-htmlbars-inline-precompile": "^1.0.3",
    "ember-cli-inject-live-reload": "^1.8.2",
    "ember-cli-moment-shim": "^3.7.1",
    "ember-cli-qunit": "^4.3.2",
    "ember-cli-rails-addon": "^0.10.0",
    "ember-cli-sass": "^8.0.1",
    "ember-cli-sentry": "^3.0.0",
    "ember-cli-shims": "^1.2.0",
    "ember-cli-sri": "^2.1.1",
    "ember-cli-string-helpers": "^1.9.0",
    "ember-cli-stylelint": "^2.2.0",
    "ember-cli-template-lint": "^1.0.0-beta.1",
    "ember-cli-uglify": "^2.1.0",
    "ember-cli-update": "^0.27.0",
    "ember-component-css": "^0.6.5",
    "ember-composable-helpers": "^2.0.3",
    "ember-concurrency": "^0.8.21",
    "ember-data": "^3.4.2",
    "ember-data-factory-guy": "^3.4.0",
    "ember-export-application-global": "^2.0.0",
    "ember-faker": "^1.3.0",
    "ember-feature-flags": "^5.0.0",
    "ember-font-awesome": "^4.0.0-rc.4",
    "ember-freestyle": "^0.9.0",
    "ember-infinity": "1.0.0-beta.2",
    "ember-inflector": "^3.0.0",
    "ember-intercom-api": "^0.3.2",
    "ember-linkify": "^4.0.0",
    "ember-load-initializers": "^1.1.0",
    "ember-math-helpers": "^2.7.0",
    "ember-maybe-import-regenerator": "^0.1.6",
    "ember-metrics": "^0.12.1",
    "ember-moment": "^7.8.0",
    "ember-notify": "^5.1.0",
    "ember-percy": "1.5.0",
    "ember-prop-types": "^8.0.0",
    "ember-qunit-nice-errors": "^1.1.2",
    "ember-radio-button": "^1.2.4",
    "ember-resolver": "^5.0.1",
    "ember-responsive": "^3.0.0-beta.3",
    "ember-route-action-helper": "^2.0.6",
    "ember-simple-auth": "^1.7.0",
    "ember-source": "~3.4.0",
    "ember-svg-jar": "^1.2.2",
    "ember-test-selectors": "^1.0.0",
    "ember-truth-helpers": "^2.1.0",
    "ember-uploader": "^2.0.0",
    "ember-watson": "^0.9.1",
    "ember-web-app": "^2.1.0",
    "ember-web-app-rename": "^1.0.0",
    "emberx-file-input": "^1.1.2",
    "eslint-plugin-ember": "^5.2.0",
    "eslint-plugin-ember-best-practices": "^1.1.1",
    "fullcalendar": "^3.9.0",
    "glob": "^7.1.3",
    "liquid-fire": "^0.29.5",
    "loader.js": "^4.7.0",
    "lottie-web": "^5.3.3",
    "morgan": "^1.9.1",
    "pubnub": "^4.21.5",
    "qunit-dom": "^0.8.0",
    "rails-timezone": "^1.0.0",
    "sass": "^1.14.1",
    "uuid": "^3.3.2"
  },

Output from ember version --verbose && npm --version && yarn --version:

ember-cli: 3.4.3
http_parser: 2.8.0
node: 8.11.1
v8: 6.2.414.50
uv: 1.19.1
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.25.0
openssl: 1.0.2o
icu: 60.1
unicode: 10.0
cldr: 32.0
tz: 2017c
os: darwin x64
6.0.1
1.10.1
@rwjblue

This comment has been minimized.

Copy link
Contributor

rwjblue commented Oct 4, 2018

What’s the full stack trace? Which of those addons do something with afterTests? Is the error in the build or after a successful build in browser?

@bryanhickerson

This comment has been minimized.

Copy link
Author

bryanhickerson commented Oct 5, 2018

It error happens after the build. Apparently it's happening in ember-percy. I'm actually unsure if that error is the cause of the crash in headless chrome because I see the same error when running ember test --serve and the tests finish successfully. I'm going to edit that code locally to see if it fixes the issue. This is the full console output, it's super noisy:

DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.4 located: /Users/bryan/dev/betterup-app/frontend/node_modules/ember-notify/node_modules/ember-cli-babel
Environment: test
[API] Warning: The .read and .rebuild APIs will stop working in the next Broccoli version
[API] Warning: Use broccoli-plugin instead: https://github.com/broccolijs/broccoli-plugin
[API] Warning: Plugin uses .read/.rebuild API: Flatiron
[API] Warning: Plugin uses .read/.rebuild API: SnippetFinder
[percy][WARNING] Percy is disabled, no PERCY_TOKEN environment variable found.
cleaning up...
Built project successfully. Stored in "/Users/bryan/dev/betterup-app/frontend/tmp/class-tests_dist-F4lvL8tD.tmp".
not ok 1 Chrome - [undefined ms] - error
    ---
        message: >
            Error: Browser failed to connect within 30s. testem.js not loaded?
            Stderr:
             [1005/085813.899533:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/lp/3cqrqfjs34s5zj7j75lvhmt80000gn/T/: Operation not permitted (1)
            [1005/085813.902286:ERROR:file_io.cc(89)] ReadExactly: expected 8, observed 0
            [1005/085813.904268:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/lp/3cqrqfjs34s5zj7j75lvhmt80000gn/T/: Operation not permitted (1)
            [1005/085813.945462:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context.

            DevTools listening on ws://127.0.0.1:51117/devtools/browser/68cffbd8-b74a-47f0-8d9b-e45e9fe77279
            [1005/085814.886068:ERROR:adm_helpers.cc(73)] Failed to query stereo recording.
            [1005/085814.898771:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 104 to 127
            [1005/085814.898806:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 106 to 125
            [1005/085814.898823:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 110 to 124
            [1005/085814.898880:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 103 to 123
            [1005/085814.898903:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 105 to 122
            [1005/085814.898935:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 109 to 121
            [1005/085814.915234:INFO:CONSOLE(23604)] "DEBUG: -------------------------------", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)
            [1005/085814.915320:INFO:CONSOLE(23604)] "DEBUG: Ember             : 3.4.4", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)
            [1005/085814.915352:INFO:CONSOLE(23604)] "DEBUG: Ember Data        : 3.4.2", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)
            [1005/085814.915376:INFO:CONSOLE(23604)] "DEBUG: jQuery            : 3.3.1", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)
            [1005/085814.915399:INFO:CONSOLE(23604)] "DEBUG: Ember Bootstrap   : 2.0.0", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)
            [1005/085814.915421:INFO:CONSOLE(23604)] "DEBUG: Ember Simple Auth : 1.7.0", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)
            [1005/085814.915443:INFO:CONSOLE(23604)] "DEBUG: -------------------------------", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)
            [1005/085815.146929:INFO:CONSOLE(216628)] "Uncaught TypeError: Cannot read property 'afterTests' of undefined", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (216628)
            [1005/085824.179609:INFO:CONSOLE(216257)] "ember-moment: an empty value (null, undefined, or "") was passed to ember-moment helper", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (216257)
            [1005/085827.465748:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23807)
            [1005/085837.686613:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23807)
            [1005/085837.778205:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23807)


        Log: |
            { type: 'error',
              text: 'Error: Browser failed to connect within 30s. testem.js not loaded?' }
            { type: 'error',
              text: '[1005/085813.899533:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/lp/3cqrqfjs34s5zj7j75lvhmt80000gn/T/: Operation not permitted (1)\n[1005/085813.902286:ERROR:file_io.cc(89)] ReadExactly: expected 8, observed 0\n[1005/085813.904268:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/lp/3cqrqfjs34s5zj7j75lvhmt80000gn/T/: Operation not permitted (1)\n[1005/085813.945462:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context.\n\nDevTools listening on ws://127.0.0.1:51117/devtools/browser/68cffbd8-b74a-47f0-8d9b-e45e9fe77279\n[1005/085814.886068:ERROR:adm_helpers.cc(73)] Failed to query stereo recording.\n[1005/085814.898771:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 104 to 127\n[1005/085814.898806:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 106 to 125\n[1005/085814.898823:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 110 to 124\n[1005/085814.898880:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 103 to 123\n[1005/085814.898903:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 105 to 122\n[1005/085814.898935:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 109 to 121\n[1005/085814.915234:INFO:CONSOLE(23604)] "DEBUG: -------------------------------", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)\n[1005/085814.915320:INFO:CONSOLE(23604)] "DEBUG: Ember             : 3.4.4", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)\n[1005/085814.915352:INFO:CONSOLE(23604)] "DEBUG: Ember Data        : 3.4.2", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)\n[1005/085814.915376:INFO:CONSOLE(23604)] "DEBUG: jQuery            : 3.3.1", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)\n[1005/085814.915399:INFO:CONSOLE(23604)] "DEBUG: Ember Bootstrap   : 2.0.0", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)\n[1005/085814.915421:INFO:CONSOLE(23604)] "DEBUG: Ember Simple Auth : 1.7.0", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)\n[1005/085814.915443:INFO:CONSOLE(23604)] "DEBUG: -------------------------------", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23604)\n[1005/085815.146929:INFO:CONSOLE(216628)] "Uncaught TypeError: Cannot read property \'afterTests\' of undefined", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (216628)\n[1005/085824.179609:INFO:CONSOLE(216257)] "ember-moment: an empty value (null, undefined, or "") was passed to ember-moment helper", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (216257)\n[1005/085827.465748:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23807)\n[1005/085837.686613:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23807)\n[1005/085837.778205:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-0316b775b7eddc86e11ae9bee2f468c7.js (23807)\n' }
    ...

1..1
# tests 1
# pass  0
# skip  0
# fail  1
Testem finished with non-zero exit code. Tests failed.

@bryanhickerson bryanhickerson changed the title Uncaught TypeError: Cannot read property 'afterTests' of undefined in ember-cli 3.4 headless chrome crashes when running ember test in ember-cli 3.4 Oct 5, 2018

@bryanhickerson

This comment has been minimized.

Copy link
Author

bryanhickerson commented Oct 5, 2018

@rwjblue I fixed the ember-percy error locally, and verified that I still get a crash:

DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.4 located: /Users/bryan/dev/betterup-app/frontend/node_modules/ember-notify/node_modules/ember-cli-babel
Environment: test
[API] Warning: The .read and .rebuild APIs will stop working in the next Broccoli version
[API] Warning: Use broccoli-plugin instead: https://github.com/broccolijs/broccoli-plugin
[API] Warning: Plugin uses .read/.rebuild API: Flatiron
[API] Warning: Plugin uses .read/.rebuild API: SnippetFinder
[percy][WARNING] Percy is disabled, no PERCY_TOKEN environment variable found.
cleaning up...
Built project successfully. Stored in "/Users/bryan/dev/betterup-app/frontend/tmp/class-tests_dist-R4JCduy4.tmp".
not ok 1 Chrome - [undefined ms] - error
    ---
        message: >
            Error: Browser failed to connect within 30s. testem.js not loaded?
            Stderr:
             [1005/094042.383388:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/lp/3cqrqfjs34s5zj7j75lvhmt80000gn/T/: Operation not permitted (1)
            [1005/094042.387255:ERROR:file_io.cc(89)] ReadExactly: expected 8, observed 0
            [1005/094042.388946:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/lp/3cqrqfjs34s5zj7j75lvhmt80000gn/T/: Operation not permitted (1)
            [1005/094042.428619:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context.

            DevTools listening on ws://127.0.0.1:61657/devtools/browser/24f1e6d6-f495-4597-94b0-b27c9a8afc00
            [1005/094043.248852:ERROR:adm_helpers.cc(73)] Failed to query stereo recording.
            [1005/094043.258903:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 104 to 127
            [1005/094043.258931:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 106 to 125
            [1005/094043.258943:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 110 to 124
            [1005/094043.258992:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 103 to 123
            [1005/094043.259012:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 105 to 122
            [1005/094043.259046:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 109 to 121
            [1005/094043.275860:INFO:CONSOLE(23604)] "DEBUG: -------------------------------", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)
            [1005/094043.275929:INFO:CONSOLE(23604)] "DEBUG: Ember             : 3.4.4", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)
            [1005/094043.275955:INFO:CONSOLE(23604)] "DEBUG: Ember Data        : 3.4.2", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)
            [1005/094043.275978:INFO:CONSOLE(23604)] "DEBUG: jQuery            : 3.3.1", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)
            [1005/094043.276000:INFO:CONSOLE(23604)] "DEBUG: Ember Bootstrap   : 2.0.0", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)
            [1005/094043.276020:INFO:CONSOLE(23604)] "DEBUG: Ember Simple Auth : 1.7.0", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)
            [1005/094043.276041:INFO:CONSOLE(23604)] "DEBUG: -------------------------------", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)
            [1005/094043.503945:INFO:CONSOLE(216632)] "Uncaught TypeError: Cannot read property 'on' of undefined", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (216632)
            [1005/094052.590788:INFO:CONSOLE(216257)] "ember-moment: an empty value (null, undefined, or "") was passed to ember-moment helper", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (216257)
            [1005/094055.898032:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23807)
            [1005/094106.095114:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23807)
            [1005/094106.187842:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23807)


        Log: |
            { type: 'error',
              text: 'Error: Browser failed to connect within 30s. testem.js not loaded?' }
            { type: 'error',
              text: '[1005/094042.383388:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/lp/3cqrqfjs34s5zj7j75lvhmt80000gn/T/: Operation not permitted (1)\n[1005/094042.387255:ERROR:file_io.cc(89)] ReadExactly: expected 8, observed 0\n[1005/094042.388946:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/lp/3cqrqfjs34s5zj7j75lvhmt80000gn/T/: Operation not permitted (1)\n[1005/094042.428619:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context.\n\nDevTools listening on ws://127.0.0.1:61657/devtools/browser/24f1e6d6-f495-4597-94b0-b27c9a8afc00\n[1005/094043.248852:ERROR:adm_helpers.cc(73)] Failed to query stereo recording.\n[1005/094043.258903:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 104 to 127\n[1005/094043.258931:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 106 to 125\n[1005/094043.258943:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 110 to 124\n[1005/094043.258992:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 103 to 123\n[1005/094043.259012:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 105 to 122\n[1005/094043.259046:WARNING:mediasession.cc(356)] Duplicate id found. Reassigning from 109 to 121\n[1005/094043.275860:INFO:CONSOLE(23604)] "DEBUG: -------------------------------", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)\n[1005/094043.275929:INFO:CONSOLE(23604)] "DEBUG: Ember             : 3.4.4", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)\n[1005/094043.275955:INFO:CONSOLE(23604)] "DEBUG: Ember Data        : 3.4.2", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)\n[1005/094043.275978:INFO:CONSOLE(23604)] "DEBUG: jQuery            : 3.3.1", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)\n[1005/094043.276000:INFO:CONSOLE(23604)] "DEBUG: Ember Bootstrap   : 2.0.0", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)\n[1005/094043.276020:INFO:CONSOLE(23604)] "DEBUG: Ember Simple Auth : 1.7.0", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)\n[1005/094043.276041:INFO:CONSOLE(23604)] "DEBUG: -------------------------------", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23604)\n[1005/094043.503945:INFO:CONSOLE(216632)] "Uncaught TypeError: Cannot read property \'on\' of undefined", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (216632)\n[1005/094052.590788:INFO:CONSOLE(216257)] "ember-moment: an empty value (null, undefined, or "") was passed to ember-moment helper", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (216257)\n[1005/094055.898032:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23807)\n[1005/094106.095114:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23807)\n[1005/094106.187842:INFO:CONSOLE(23807)] "DEPRECATION: Use ember-copy addon instead of copy method and Copyable mixin. [deprecation id: ember-runtime.deprecate-copy-copyable] See https://emberjs.com/deprecations/v3.x/#toc_ember-runtime-deprecate-copy-copyable for more details.", source: http://localhost:7357/frontend/assets/vendor-097297da15d1c7831c66f0f3fa2466c6.js (23807)\n' }
    ...

1..1
# tests 1
# pass  0
# skip  0
# fail  1
Testem finished with non-zero exit code. Tests failed.
@bryanhickerson

This comment has been minimized.

Copy link
Author

bryanhickerson commented Oct 17, 2018

I'm still hitting this error with ember-cli 3.5. It seems as though we'll be stuck on 3.3 until I can find a way around it. I'd be happy to provide additional debugging information, I just need some guidance on what to collect or where to look.

@bryanhickerson

This comment has been minimized.

Copy link
Author

bryanhickerson commented Oct 17, 2018

@ncoden It's possible that this is related to that testem issue, but I already have all the options that are mentioned in those links:

        '--crash-dumps-dir=/tmp',
        '--disable-dev-shm-usage',
        '--disable-gpu',
        '--disable-software-rasterizer',
        '--headless',
        '--incognito',
        '--mute-audio',
        '--no-sandbox',
        '--proxy-bypass-list=*',
        "--proxy-server='direct://'",
        '--remote-debugging-port=0',
        '--window-size=1440,900'
@ncoden

This comment has been minimized.

Copy link

ncoden commented Oct 17, 2018

@bryanhickerson Give a non-zero port to --remote-debugging-port

@bryanhickerson

This comment has been minimized.

Copy link
Author

bryanhickerson commented Oct 17, 2018

@ncoden I used 9222 like in that stackoverflow discussion with the same result.

@yads

This comment has been minimized.

Copy link

yads commented Oct 19, 2018

I am having the exact same issue with ember-cli 3.4 and 3.5. Downgrading to ember-cli 3.3 is able to connect to the browser. I've tried this with Chrome, Firefox, and Safari. Consistent behaviour, ember-cli 3.3 works fine, ember-cli 3.4/3.5 fails with the issue referenced here and in testem/testem#1021

@janwerkhoven

This comment has been minimized.

Copy link

janwerkhoven commented Oct 20, 2018

I've been seeing similar timeouts when running ember test in Ember CLI 3.5.0.

All tests in localhost:4200/tests are passing though...

I can confirm that when this project was still on Ember CLI 3.1.3 the timeouts did not occur.

For minimal reproduction I did:

ember new foo --yarn
cd foo/
ember test
[passes]

All tests pass in fresh install. 💪

That implies it must be something specific to my project. I've then started adding my packages and configs one by one to the fresh install until tests would start timing out. I found this:

// ember-cli-build.js

fingerprint: {
  enabled: true,
  extensions: ['js', 'css']
}

This times out ember test. 🔥

ember test
Visit https://ember-cli.com/user-guide/#watchman for more info.
Environment: test
cleaning up...
Built project successfully. Stored in "/Users/jw/Code/foo/tmp/class-tests_dist-F8nepXHD.tmp".
not ok 1 Chrome - [undefined ms] - error
    ---
        message: >
            Error: Browser failed to connect within 30s. testem.js not loaded?
            Stderr:
             [1020/175120.476382:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/__/r9ghy9cn0j95ny3q_f604dsr0000gn/T/: Operation not permitted (1)
            [1020/175120.477585:ERROR:file_io.cc(89)] ReadExactly: expected 8, observed 0
            [1020/175120.478440:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/__/r9ghy9cn0j95ny3q_f604dsr0000gn/T/: Operation not permitted (1)
            [1020/175120.511147:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context.

            DevTools listening on ws://127.0.0.1:53980/devtools/browser/b98846a1-64ea-4fa7-9414-c570455ea6fa
            [1020/175120.834934:INFO:CONSOLE(12521)] "DEBUG: -------------------------------", source: http://localhost:7357/assets/vendor-055193532090a78f333a5245953abf2b.js (12521)
            [1020/175120.835000:INFO:CONSOLE(12521)] "DEBUG: Ember      : 3.5.0", source: http://localhost:7357/assets/vendor-055193532090a78f333a5245953abf2b.js (12521)
            [1020/175120.835036:INFO:CONSOLE(12521)] "DEBUG: Ember Data : 3.5.0", source: http://localhost:7357/assets/vendor-055193532090a78f333a5245953abf2b.js (12521)
            [1020/175120.835069:INFO:CONSOLE(12521)] "DEBUG: jQuery     : 3.3.1", source: http://localhost:7357/assets/vendor-055193532090a78f333a5245953abf2b.js (12521)
            [1020/175120.835102:INFO:CONSOLE(12521)] "DEBUG: -------------------------------", source: http://localhost:7357/assets/vendor-055193532090a78f333a5245953abf2b.js (12521)


        Log: |
            { type: 'error',
              text: 'Error: Browser failed to connect within 30s. testem.js not loaded?' }
            { type: 'error',
              text: '[1020/175120.476382:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/__/r9ghy9cn0j95ny3q_f604dsr0000gn/T/: Operation not permitted (1)\n[1020/175120.477585:ERROR:file_io.cc(89)] ReadExactly: expected 8, observed 0\n[1020/175120.478440:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/__/r9ghy9cn0j95ny3q_f604dsr0000gn/T/: Operation not permitted (1)\n[1020/175120.511147:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context.\n\nDevTools listening on ws://127.0.0.1:53980/devtools/browser/b98846a1-64ea-4fa7-9414-c570455ea6fa\n[1020/175120.834934:INFO:CONSOLE(12521)] "DEBUG: -------------------------------", source: http://localhost:7357/assets/vendor-055193532090a78f333a5245953abf2b.js (12521)\n[1020/175120.835000:INFO:CONSOLE(12521)] "DEBUG: Ember      : 3.5.0", source: http://localhost:7357/assets/vendor-055193532090a78f333a5245953abf2b.js (12521)\n[1020/175120.835036:INFO:CONSOLE(12521)] "DEBUG: Ember Data : 3.5.0", source: http://localhost:7357/assets/vendor-055193532090a78f333a5245953abf2b.js (12521)\n[1020/175120.835069:INFO:CONSOLE(12521)] "DEBUG: jQuery     : 3.3.1", source: http://localhost:7357/assets/vendor-055193532090a78f333a5245953abf2b.js (12521)\n[1020/175120.835102:INFO:CONSOLE(12521)] "DEBUG: -------------------------------", source: http://localhost:7357/assets/vendor-055193532090a78f333a5245953abf2b.js (12521)\n' }
    ...

1..1
# tests 1
# pass  0
# skip  0
# fail  1

So what I've done is:

const isProduction = EmberApp.env() === 'production';

module.exports = function(defaults) {
  var app = new EmberApp(defaults, {
    fingerprint: {
      enabled: isProduction,
      extensions: ['js', 'css']
    },
    ...

And now ember test works again. :godmode:

I hope this is helpful for your project.

@bryanhickerson

This comment has been minimized.

Copy link
Author

bryanhickerson commented Oct 20, 2018

@janwerkhoven That workaround totally solves the issue for me. I would have never guessed it was the finger printing, thanks for sharing!

@rwjblue

This comment has been minimized.

Copy link
Contributor

rwjblue commented Oct 20, 2018

Hmph. In general we do not fingerprint when testing, any particular reason you enabled that?

@bryanhickerson

This comment has been minimized.

Copy link
Author

bryanhickerson commented Oct 20, 2018

From what I can tell there was a fingerprinting issue that we weren't able to detect in CI related to: rickharrison/broccoli-asset-rev#48

@janwerkhoven

This comment has been minimized.

Copy link

janwerkhoven commented Oct 21, 2018

@bryanhickerson

TIL: Fingerprinting defaults to enabled: app.env === 'production'.

Read: https://ember-cli.com/asset-compilation#fingerprinting-and-cdn-urls

That means you can remove the enabled: isProduction I've proposed:

fingerprint: {
  extensions: ['js', 'css']
},

😊

@janwerkhoven

This comment has been minimized.

Copy link

janwerkhoven commented Oct 21, 2018

@rwjblue That's a good question...

It was enabled because my lack of understanding. Having consumed the docs I now understand that fingerprints are disabled in tests and enabled in production by default.

Tests indeed have no use for fingerprints.

🙇

@bryanhickerson

This comment has been minimized.

Copy link
Author

bryanhickerson commented Oct 21, 2018

I set it to env != test, so we’d still have fingerprinting in dev.

@rwjblue

This comment has been minimized.

Copy link
Contributor

rwjblue commented Oct 21, 2018

Gotcha. So in that case it’s probably timing out because the launched chrome instance is not finding /testem.js (because it’s trying to load a fingerprinted asset now. The only way testem hooks into the test framework is by providing /testem.js...

@bryanhickerson

This comment has been minimized.

Copy link
Author

bryanhickerson commented Oct 21, 2018

@rwjblue, I’m curious why this broke in ember-cli 3.4, was testem.js not being fingerprinted before?

@rwjblue

This comment has been minimized.

Copy link
Contributor

rwjblue commented Oct 21, 2018

Yeah we should confirm, but I suspect that is the case.

@yads

This comment has been minimized.

Copy link

yads commented Oct 22, 2018

@bryanhickerson we had to do the same thing. We needed fingerprinting in 'development' so I think I just set it to true originally.

@buschtoens

This comment has been minimized.

Copy link
Contributor

buschtoens commented Oct 23, 2018

Holy 🐄. I would haver never figured out that fingerprinting was to blame. 😂

In case you need fingerprinting to happen in dev / test mode, you can exclude testem.js. Here's our config:

    fingerprint: {
      enabled: true,
      generateAssetMap: true,
      prepend,
      exclude: ['testem.js'],
      replaceExtensions: ['html', 'css', 'js', 'ts', 'scss'],
      extensions: ['js', 'css', 'png', 'jpg', 'gif', 'map', 'svg', 'ico', 'ttf', 'woff'],
      // there is a bug in broccoli-asset-rewrite forcing us to append a hash
      customHash: isProductionLike ? undefined : () => 'dev'
    },

@bryanhickerson bryanhickerson changed the title headless chrome crashes when running ember test in ember-cli 3.4 ember test crashes on run when fingerprinting is enabled in tests in ember-cli 3.4+ Oct 23, 2018

simonihmig added a commit to kaliber5/ember-responsive-image that referenced this issue Dec 26, 2018

simonihmig added a commit to kaliber5/ember-responsive-image that referenced this issue Dec 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment