ember-cli: ember test crashes on run when fingerprinting is enabled in tests in ember-cli 3.4+
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
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (6 by maintainers)
Commits related to this issue
- Fix testem failure Due to https://github.com/ember-cli/ember-cli/issues/8088 — committed to simonihmig/ember-responsive-image by simonihmig 6 years ago
- Fix testem failure Due to https://github.com/ember-cli/ember-cli/issues/8088 — committed to simonihmig/ember-responsive-image by simonihmig 6 years ago
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
excludetestem.js. Here’s our config:I’ve been seeing similar timeouts when running
ember testin Ember CLI 3.5.0.All tests in
localhost:4200/testsare 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:
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:
This times out
ember test. 🔥So what I’ve done is:
And now
ember testworks again. :godmode:I hope this is helpful for your project.
I set it to env != test, so we’d still have fingerprinting in dev.
@janwerkhoven That workaround totally solves the issue for me. I would have never guessed it was the finger printing, thanks for sharing!