I'm getting an error message in a fairly complex app, but Angular does not provide a filename or line number indicating where the error was thrown initially. I have gotten used to this with Angular and I've been able to find the cause of errors nonetheless in the past, but not this time. This is the error:
Error: [$injector:strictdi] http://errors.angularjs.org/1.6.1/$injector/strictdi?p0=function(%24compile)
at angular.js:38
at Function.eb.$$annotate (angular.js:4072)
at e (angular.js:4799)
at Object.invoke (angular.js:4834)
at angular.js:7943
at q (angular.js:357)
at Object.<anonymous> (angular.js:7941)
at Object.invoke (angular.js:4842)
at Object.$get (angular.js:4676)
at Object.invoke (angular.js:4842)
We're using $compile in a lot of different places in our app, including a number of third party directives/modules. My question is: is there any way to find the piece of code that's causing this error? I have been searching for '$compile' in my source code, but that gives me so many results that it doesn't really help.
Is there any way to enable better stack traces including my own source, not just AngularJS functions? If this does not exist, I'd like to know it too and I'll have to find another way to fix this, but I hope I'm not missing something here.
Related
im trying to mess with nural networks and i decided to use ml5, everything is great except i cant get the model to predict without it making an error.
ive tried putting the prediction inside an async function ad resolving its promise but it didnt help at all, tried messing with the inputs, still nothing changes
the eror in question:
TypeError: Cannot read properties of undefined (reading 'undefined')
at isOneHotEncodedOrNormalized (webpack://ml5/src/NeuralNetwork/index.js:449:33)
at this.isOneHotEncodedOrNormalized (webpack://ml5/src/NeuralNetwork/index.js:401:20)
at this.isOneHotEncodedOrNormalized (webpack://ml5/src/NeuralNetwork/index.js:400:31)
at _input.every (webpack://ml5/src/NeuralNetwork/index.js:432:18)
at predictInternal (webpack://ml5/src/NeuralNetwork/index.js:923:27)
at tryCatch (webpack://ml5/node_modules/#babel/runtime/node_modules/regenerator-runtime/runtime.js:63:14)
at context.dispatchException (webpack://ml5/node_modules/#babel/runtime/node_modules/regenerator-runtime/runtime.js)
at define (webpack://ml5/node_modules/#babel/runtime/node_modules/regenerator-runtime/runtime.js)
at asyncGeneratorStep (webpack://ml5/node_modules/#babel/runtime/helpers/asyncToGenerator.js)
im using https://unpkg.com/ml5#latest/dist/ml5.min.js if this helps, i dont know if the error was caused by my code or the ml5 code or what
When embedding a dashboard or a tile in Javascript I get this strange error from PowerBI.
The error comes from> dashBoardEmbed minified javascript
ERROR Error: Uncaught (in promise): Esri is not supported in Embedded scenario.
at _ (powerbiportal.dependencies.externals.bundle.min.65d4a96bc46ec2fd3787.js:5)
at powerbiportal.dependencies.externals.bundle.min.65d4a96bc46ec2fd3787.js:5
at powerbiportal.dependencies.externals.bundle.min.65d4a96bc46ec2fd3787.js:5
at t.invoke (powerbiportal.dependencies.externals.bundle.min.65d4a96bc46ec2fd3787.js:5)
at Object.onInvoke (dashboardEmbed.min.4a4b3b318b2bc635d2a5.js:1)
at t.invoke (powerbiportal.dependencies.externals.bundle.min.65d4a96bc46ec2fd3787.js:5)
at e.run (powerbiportal.dependencies.externals.bundle.min.65d4a96bc46ec2fd3787.js:5)
at powerbiportal.dependencies.externals.bundle.min.65d4a96bc46ec2fd3787.js:5
at t.invokeTask (powerbiportal.dependencies.externals.bundle.min.65d4a96bc46ec2fd3787.js:5)
at Object.onInvokeTask (dashboardEmbed.min.4a4b3b318b2bc635d2a5.js:1)
Is there anything I can do to not show this error? Or at least understand it?
I googled about Esri it seems that it is about ArcGIS Maps, but my dashboard or tile embedding scenario, doesnt contain any of this maps. Only contains a simple tile like this>
This error doesnt stop from embedding or even cause any bad experience for the user, but I just dont like too see this errors in the console. At most, I like to understand it :D
Anyone had this before?
I suspect your report to contain an argis module. Try to create a new page and remove the actual one. If the problem persists, desactivate the argis integration from the pbix.
This is more of a general question, but I imagine others have encountered this problem as well -- see for instance this SO question: Ember.js: how to analyze error in vendor.js
I am working on a larger Ember-based application, where, if errors occur, I sometimes get rather cryptic stack traces, similar to this sample:
TypeError: e.indexOf is not a function
at e.func (https://XXX/assets/vendor-c3ea8aab9a11f79411cf3b32532ea544.js:13:6039)
at e.get (https://XXX/assets/vendor-c3ea8aab9a11f79411cf3b32532ea544.js:11:29357)
at Object.o [as isPath] (https://XXX/assets/vendor-c3ea8aab9a11f79411cf3b32532ea544.js:13:5640)
at Object.u [as set] (https://XXX/assets/vendor-c3ea8aab9a11f79411cf3b32532ea544.js:13:10630)
at n.set (https://XXX/assets/vendor-c3ea8aab9a11f79411cf3b32532ea544.js:16:725)
at n.cancel (https://XXX/assets/YYY-707bc84342df7a5350ea91fcc2b9bf53.js:1:20788)
at o.join (https://XXX/assets/vendor-c3ea8aab9a11f79411cf3b32532ea544.js:7:6400)
at Function.u.join (https://XXX/assets/vendor-c3ea8aab9a11f79411cf3b32532ea544.js:13:12315)
at https://XXX/assets/vendor-c3ea8aab9a11f79411cf3b32532ea544.js:9:30923
at Object.h [as flaggedInstrument] (https://XXX/assets/vendor-c3ea8aab9a11f79411cf3b32532ea544.js:12:18911)
Since everything refers to /assets/vendor-*.js files, it is very laborious to find out exactly where the error has occurred.
At the moment, I try to deduce where the error has occurred based on the endpoint accessed and my knowledge of the software. However, this is highly unreliable and unstructured, since the errors are very often highly vague, given the size of my code base.
For instance here, it is obvious that an object on which indexOf() is called (presumably an array) is probably undefined or null and, as such, calling indexOf() on it doesn't work, hence the error. But guess how many arrays use indexOf() in a couple of hundred large-ish source files ;-)
Is there a better, more structured approach that I can use to debug in such situations?
You may be able to see the library js file used by putting 'pause on exceptions' in chromium debugger and checking what's the library that has the line of failure. After that, you may change the library reference in ember-cli-build.js from libraryx.js to libraryx.src.js or equivalent for the particular library.
I have an error coming up in React.js that only occurs under very specific circumstances.
When I create the error, an error prints to the JS console in Chrome, but it's not particularly semantic.
What are the best practices, tips, and tricks that you use for tracking down the offending line or function in a React.js context?
The value at line 61 doesn't seem to make a lot of sense due to the 10247 prefix – is this truly referring to line 61 or is this just junk due to a botched source map or something?
Unhandled rejection TypeError: Cannot set property 'value' of undefined
at http://localhost:4000/js/analytics.js:10247:61
at Array.forEach (native)
at http://localhost:4000/js/analytics.js:10246:16
at Array.forEach (native)
at updatePoints (http://localhost:4000/js/analytics.js:10245:29)
at module.exports.createClass.classData.componentWillReceiveProps (http://localhost:4000/js/analytics.js:10195:9)
at 43.ReactCompositeComponentMixin.updateComponent (http://localhost:4000/js/vendor.js:42736:14)
at 82.ReactPerf.measure.wrapper [as updateComponent] (http://localhost:4000/js/vendor.js:49431:21)
at 43.ReactCompositeComponentMixin.receiveComponent (http://localhost:4000/js/vendor.js:42623:10)
at Object.89.ReactReconciler.receiveComponent (http://localhost:4000/js/vendor.js:50301:22)
at Object.__REACT_INSPECTOR_RUNTIME__0_13_1.React.ReactReconciler.receiveComponent (<anonymous>:118:43)
at 43.ReactCompositeComponentMixin._updateRenderedComponent (http://localhost:4000/js/vendor.js:42865:23)
at 43.ReactCompositeComponentMixin._performComponentUpdate (http://localhost:4000/js/vendor.js:42843:10)
at 43.ReactCompositeComponentMixin.updateComponent (http://localhost:4000/js/vendor.js:42759:12)
at 82.ReactPerf.measure.wrapper [as updateComponent] (http://localhost:4000/js/vendor.js:49431:21)
at 43.ReactCompositeComponentMixin.receiveComponent (http://localhost:4000/js/vendor.js:42623:10)
Thanks in advance for your help!
Yupe, split your code into individual files and try using browserify (or webpack) with the debug flag set to true in order to map your big file with a sourcemap and ease the debugging in Chrome and friends.
Check my current stack here:
https://github.com/coma/domno?files=1
It turned out that it was an issue with Reconciliation in React.js.
React essentially uses heuristics to decide what to re-render on updates, and the react-chartjs library wasn't playing well with that.
More information can be found here: https://facebook.github.io/react/docs/reconciliation.html
The fix I used was essentially to clear the state data that is passed into chart and force an update, thus making React re-render the whole element:
this.state.countries = {
labels: []
}
this.forceUpdate()
I am trying to trouble shoot my initial site that uses persistence.js, and I keep coming up with these two errors:
Uncaught ReferenceError: require is not defined
(persistence.store.mysql.js:7)
Uncaught ReferenceError: exports is not defined
(persistence.store.config.js:1)
No matter which load order I try these two errors come up. I am hoping that these two errors are causing some of my other issues, but I cannot seem to find where they are (should be) pointing to.
I am new to JS in general, so if these are high level js variables please let me know.