ng-inspector icon indicating copy to clipboard operation
ng-inspector copied to clipboard

ng inspector not working with latest chrome update

Open sabbyt opened this issue 8 years ago • 7 comments

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

sabbyt avatar Feb 11 '16 23:02 sabbyt

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

gaieges avatar Feb 15 '16 18:02 gaieges

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

AlvaroLarumbe avatar Oct 06 '16 07:10 AlvaroLarumbe

I have some problems.. also use lodash.

surnamename avatar Apr 06 '17 12:04 surnamename

+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?

johnslipper avatar Apr 27 '17 05:04 johnslipper

@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 avatar Nov 29 '21 17:11 mochsner

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.

mochsner avatar Nov 29 '21 18:11 mochsner

@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.

johnslipper avatar Nov 30 '21 01:11 johnslipper