rev087 / ng-inspector

The AngularJS inspector pane for your browser
ng-inspector.org
MIT License
782 stars 93 forks source link

ng inspector not working with latest chrome update #158

Open sabbyt opened 8 years ago

sabbyt commented 8 years ago

updated to chrome Version 48.0.2564.109 (64-bit) yesterday and now not working. showing angular app name but tree is populating. app is working normally.

_in chrome the console error: _

Uncaught TypeError: Cannot read property '1' of null (ng-inspector.js:745)

NGI.Utils.Utils.annotate @ chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js:745 Model.setValue @ chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js:1380 Model @ chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js:1451 NGI.Model.Model.instance @ chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js:1458 NGI.ModelMixin.ModelMixin.update @ chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js:1198 Scope @ chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js:1271 NGI.Scope.Scope.instance @ chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js:1334 traverse @ chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js:180

gaieges commented 8 years ago

Getting the same exception. In my case seems to be only problematic when I expose lodash to a view, but works fine without this.

angular.module('App')
  .controller('SearchCtrl', ['$scope', '$state', '$log', ..
    function ($scope, $state, $log, .. ) {
      $scope._ = _;
  })

Exception I get is:

Uncaught TypeError: Cannot read property '1' of null
NGI.Utils.Utils.annotate @ ng-inspector.js:745
Model.setValue @ ng-inspector.js:1380
Model @ ng-inspector.js:1451
NGI.Model.Model.instance @ ng-inspector.js:1458
NGI.ModelMixin.ModelMixin.update @ ng-inspector.js:1198
Scope @ ng-inspector.js:1271
NGI.Scope.Scope.instance @ ng-inspector.js:1334
traverse @ ng-inspector.js:180
AlvaroLarumbe commented 8 years ago

I have Lodash exposed via $rootScope and commit by gztomas fixed the problem.

surnamename commented 7 years ago

I have some problems.. also use lodash.

johnslipper commented 7 years ago

+1 Same here. Removing lodash does remove the error. Using Chrome (OS X) 57.0.2987, lodash 4.17.4 (via CDN) and angular 1.6.3. Any ideas on a fix?

mochsner commented 2 years ago

@johnslipper ever figure this issue out by chance? Running into same issue without lodash (not that I should expect this plugin to still be stable at this point)

mochsner commented 2 years ago

Seems to me this could be related to use of arrow expressions in JS and lack of support for them?

someVar: (arg1) => { // do something }

Fails due to ArgDecl coming back as null: image

Forked this on my personal repo and may look to add this in for my local use. If anyone else still uses this old extension and would benefit from it, let me know and I can figure out a way to get you access.

johnslipper commented 2 years ago

@johnslipper ever figure this issue out by chance? Running into same issue without lodash (not that I should expect this plugin to still be stable at this point)

@mochsner no I didn't, I ended up using other Chrome extensions. The one I'm currently using is ng-inspect for AngularJS which instead shows the scope of the currently selected element inside the developer tools, within an "AngularJS" tab.