Skip to content
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

Cannot read property 'scope' of null #432

Closed
btecu opened this issue Jul 27, 2015 · 6 comments
Closed

Cannot read property 'scope' of null #432

btecu opened this issue Jul 27, 2015 · 6 comments

Comments

@btecu
Copy link

btecu commented Jul 27, 2015

Using Ember 1.13.5 and Ember Data 1.13.7.

When I open the ember-inspector I get the multiple exceptions:

VM3546:94 Deprecations were detected, see the Ember Inspector deprecations tab for more details.
app.js:27 Error TypeError: Cannot read property 'scope' of null
    at Ember.Object.extend._controllerForNode (<anonymous>:4047:35)
    at Ember.Object.extend._nodeHasOwnController (<anonymous>:4025:19)
    at Ember.Object.extend._shouldShowNode (<anonymous>:3985:45)
    at <anonymous>:3953:18
    at Array.forEach (native)
    at Ember.Object.extend._appendNodeChildren (<anonymous>:3952:18)
    at <anonymous>:3956:16
    at Array.forEach (native)
    at Ember.Object.extend._appendNodeChildren (<anonymous>:3952:18)
    at <anonymous>:3958:16
    at Array.forEach (native)
    at Ember.Object.extend._appendNodeChildren (<anonymous>:3952:18)
    at Ember.Object.extend.viewTree (<anonymous>:3601:14)
    at <anonymous>:3557:25
    at fn (http://localhost/console/Ember/vendor.js:600:20)
    at Queue.invokeWithOnError (http://localhost/console/Ember/vendor.js:1112:18)
    at Object.Queue.flush (http://localhost/console/Ember/vendor.js:1167:11)
    at Object.DeferredActionQueues.flush (http://localhost/console/Ember/vendor.js:967:17)
    at Object.Backburner.end (http://localhost/console/Ember/vendor.js:360:25)
    at Object.Backburner.run (http://localhost/console/Ember/vendor.js:419:18)
    at executeTimers (http://localhost/console/Ember/vendor.js:850:16)
    at http://localhost/console/Ember/vendor.js:839:9

It seems very related to #416.
After looking into it I found that the problem seems to be here:

    _controllerForNode: function(renderNode) {
      return renderNode.lastResult.scope.locals.controller.value();
    }

Sometimes renderNode.lastResult is undefined.
Just adding renderNode.lastResult && seemed to not fix it.

Any other ideas?

@btecu
Copy link
Author

btecu commented Jul 28, 2015

It seems that this issue occurs when using Ember.onerror. Can't seem to be able to replicate it on an empty repo.

@jcope2013 are you using Ember.onerror?

@jcope2013
Copy link

@btecu yeah

@btecu
Copy link
Author

btecu commented Jul 28, 2015

@jcope2013 Can you try commenting Ember.onerror and check if you still have issues with the ember-inspector?

@amedrz
Copy link

amedrz commented Aug 3, 2015

Maybe related: I'm getting Uncaught TypeError: Cannot read property 'responseText' of null when I try to load deprecations lists on EI. Removed ember-cli-sentry (wich AFAIK is the only code that uses Ember.onerror) and nothing new.

Ember 1.13.5
Ember Data 1.13.7

@teddyzeenny
Copy link
Contributor

@amedrz this is a different issue. Can you please open a separate issue for your error so we can track it?

@amedrz
Copy link

amedrz commented Aug 7, 2015

@teddyzeenny after digging deeper I noticed it's caused by ember-offline and filed an issue ahmadsoe/ember-offline/issues/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants