DockYard / ember-in-viewport

Detect if an Ember View or Component is in the viewport @ 60FPS
MIT License
245 stars 91 forks source link

Bug in Ember 3.20 #258

Closed jherdman closed 4 years ago

jherdman commented 4 years ago

Version

3.8.0

Test Case

Use the modifier, e.g.

{{in-viewport onEnter=this.didEnterViewport}}

Steps to reproduce

See above

Expected Behavior

It works

Actual Behavior

Uncaught (in promise) Error: Assertion Failed: Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container
jherdman commented 4 years ago
Screen Shot 2020-10-22 at 11 46 55 AM

Assertion stems from here

snewcomer commented 4 years ago

@jherdman Thx for the issue! The dummy app was just updated to 3.22 and all tests were passing with our built in modifier. Is it still reproducing? A nombom didn't fix the issue for you?

jherdman commented 4 years ago

Yeah, it's really easy to reproduce in an app at my company, but I'm struggling to reproduce it outside of it. It's almost exactly the same scenario as the modifier acceptable test.

On Sun, Oct 25, 2020, 17:24 Scott Newcomer notifications@github.com wrote:

@jherdman https://github.com/jherdman Thx for the issue! The dummy app was just updated to 3.22 and all tests were passing with our built in modifier. Is it still reproducing? A nombom didn't fix the issue for you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DockYard/ember-in-viewport/issues/258#issuecomment-716214240, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAZZDBSZWPTGJQ6G2FWA3SMSJRHANCNFSM4S3MFSRA .

jherdman commented 4 years ago

I found it. I can't recall how I ended up down this path, but...

$ yarn why ember-modifier

Returns...

=> Found "ember-modifier@1.0.3"
info Has been hoisted to "ember-modifier"
info Reasons this module exists
   - Hoisted from "ember-sortable#ember-modifier"
   - Hoisted from "ember-on-resize-modifier#ember-modifier"
info Disk size without dependencies: "188KB"
info Disk size with unique dependencies: "892KB"
info Disk size with transitive dependencies: "46.72MB"
info Number of shared dependencies: 167
=> Found "ember-in-viewport#ember-modifier@2.1.1"
info This module exists because "ember-in-viewport" depends on it.
info Disk size without dependencies: "1004KB"
info Disk size with unique dependencies: "4.9MB"
info Disk size with transitive dependencies: "54.02MB"
info Number of shared dependencies: 184
=> Found "ember-resize-observer-component#ember-modifier@2.1.1"
info Reasons this module exists
   - "@precision-nutrition#procoach-profile#ember-resize-observer-component#ember-on-resize-modifier" depends on it
   - Hoisted from "@precision-nutrition#procoach-profile#ember-resize-observer-component#ember-on-resize-modifier#ember-modifier"
info Disk size without dependencies: "1004KB"
info Disk size with unique dependencies: "4.9MB"
info Disk size with transitive dependencies: "54.02MB"
info Number of shared dependencies: 184

Ah, snap... two versions...

Digging in...

https://github.com/adopted-ember-addons/ember-sortable/issues/383

Ah ha!

All the more reason to dependency lint.

I think we can close this.

snewcomer commented 4 years ago

Great! Noting for the future