angular / batarang

AngularJS WebInspector Extension for Chrome
MIT License
2.43k stars 338 forks source link

Hint.js is causing error(s) in the NG application, seems to be injecting an extra ")" char (??) #261

Closed rhaag71 closed 9 years ago

rhaag71 commented 9 years ago

In receiving errors like this (see bottom of post), and after much "Undo action" and banging head against wall, I realized that I "enabled" the batarang extension right before receiving the errors (there are actually two occurances of this error, both involving ng-repeat if that helps). When I turn of (or just uncheck "enable") the error goes away. Seems evident that somehow the extension is causing the error, but I'm not exactly sure how/why... (yet).

Also, before I realized that I suspect the extension, I was able to make the error go aways by removing (in the case of the error posted below) this code from my Jade template:

  a(ng-click="getStateData(states.indexOf(state))"){{state.state}}

It will be reproducible on my machine and I can provide more info if you like.

This error throws 51 times, same amount of times in the ng-repeat that is getting hit by the error.

Error: [$parse:syntax] Syntax Error: Token ')' is an unexpected token at column 13 of the expression [getStateData)] starting at [)].
http://errors.angularjs.org/1.3.15/$parse/syntax?p0=)&p1=is%20an%20unexpected%20token&p2=13&p3=getStateData)&p4=)
    at http://ss.localhost:4000/tabledata/shared/monkeynaut/dist/js/bundle-full.js:5256:12
    at Parser.throwError (http://ss.localhost:4000/tabledata/shared/monkeynaut/dist/js/bundle-full.js:17263:11)
    at Parser.parse (http://ss.localhost:4000/tabledata/shared/monkeynaut/dist/js/bundle-full.js:17216:12)
    at $parse (http://ss.localhost:4000/tabledata/shared/monkeynaut/dist/js/bundle-full.js:17930:39)
    at chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:1707:17
    at Array.forEach (native)
    at ngEventHandler (chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:1702:20)
    at invokeLinkFn (http://ss.localhost:4000/tabledata/shared/monkeynaut/dist/js/bundle-full.js:13451:9)
    at nodeLinkFn (http://ss.localhost:4000/tabledata/shared/monkeynaut/dist/js/bundle-full.js:12961:11)
    at compositeLinkFn (http://ss.localhost:4000/tabledata/shared/monkeynaut/dist/js/bundle-full.js:12310:13) <a ng-click="getStateData(states.indexOf(state))" class="ng-binding">
SomeKittens commented 9 years ago

Assigning @erwinmombay to this, he's tackled this area of the code before. Thanks for the report

erwinmombay commented 9 years ago

will look into this

erwinmombay commented 9 years ago

this should be fixed when we do a new release.

/cc @btford

erwinmombay commented 9 years ago

actually, @rhaag71 would you mind letting me know what batarang version you are using? as I can't seem to to replicate it blowing up on master with your scenario (granted batarang isnt working either, so it probably just got suppressed)

erwinmombay commented 9 years ago

@rhaag71 nevermind, got it to blow up (i had the fix in my local, my bad). but yes a new release should prevent batarang from blowing up the users app when parsing error occurs. my apologies

rhaag71 commented 9 years ago

Awesome, no worries either.. glad you guys had a fix for it. BTW, when will the fixed version release?

SomeKittens commented 9 years ago

It's all rolled up, just needs to go out. Not sure where in the system the breakdown occurred.

SomeKittens commented 9 years ago

Update's out! (It make take up to an hour for it to propagate everywhere). Please reopen if this isn't fixed.

erwinmombay commented 9 years ago

yep should be fixed. let us know if it still blows up! appreciate the detailed report!