ember-router-scroll: Getting error "Cannot read property 'afterContentPaint' of null" when running tests
Occasionally on our build server, I get a failing test with the following error: Cannot read property 'afterContentPaint' of null
There are only 2 hits on Google for afterContentPaint, and one of them is this issue: https://github.com/sreedhar7/ember-app-scheduler/issues/9
This addon seems to be the only thing using that library. Have you ran into this error while using ember-router-scroll?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 23 (11 by maintainers)
Commits related to this issue
- Update ember-app-scheduler to 0.2.0 (fixes #72) (#73) * Update ember-app-scheduler to 0.2.0 * Fix ESLint error — committed to DockYard/ember-router-scroll by YoranBrondsema 7 years ago
- Update ember-router-scroll This fixes a known issue where you can get random failing tests. See https://github.com/dollarshaveclub/ember-router-scroll/issues/72 — committed to san650/ember-cli-addon-docs by san650 6 years ago
- Update ember-router-scroll This fixes a known issue where you can get randomly failing tests. See https://github.com/dollarshaveclub/ember-router-scroll/issues/72 — committed to san650/ember-cli-addon-docs by san650 6 years ago
- Update ember-router-scroll This fixes a known issue where you can get randomly failing tests. See https://github.com/dollarshaveclub/ember-router-scroll/issues/72 — committed to san650/ember-cli-addon-docs by san650 6 years ago
- Update ember-router-scroll This fixes a known issue where you can get randomly failing tests. See https://github.com/dollarshaveclub/ember-router-scroll/issues/72 — committed to san650/ember-cli-addon-docs by san650 6 years ago
I believe we’re still seeing this, and the root cause is the issue in ember-app-scheduler. If it’s still an issue (and wasn’t fixed by #73), could we have this issue re-opened to make the communication & updates easier to follow?
Nevermind, I got it wrong… I figured out later that this addon uses an old version of
ember-app-scheduler. PR #73 updates it to the latest version and that fixed the problem for me.@ryanto @bantic Whenever you have a chance, mind giving this branch a spin? I tried it and seems to work great. Just probably need another approval and we can merge and release a new version!
https://github.com/dollarshaveclub/ember-router-scroll/pull/139
@snewcomer/@ryanto heads up the issue actually seems to lie in the
flushQueuefrom Ember App Scheduler which runs even though router-scroll isn’t directly using it. Since the service is still injected and initialized these lifecycles are still happening.I have made a PR https://github.com/ember-app-scheduler/ember-app-scheduler/pull/45 to address this and check for service lifecycles.
I encountered the same issue after an upgrade to Ember.js 2.15. I dug a bit deeper into it and I may have found out the cause. I don’t think the error is in
ember-router-scrollbut rather inember-app-scheduler.I provide more explanation here: https://github.com/sreedhar7/ember-app-scheduler/issues/11.