I am getting below exception in runtime, could anybody suggest what is wrong?
Microsoft JScript runtime error: Object expected
Exception is coming in very first line:
aspxAddHoverItems('tabMaster',[[['dxtcTabHover_Glass'],[''],['T0','T1','T2','T3'],['','T'],[[''],[''],[''],['']],['Img']],[['dxtcActiveTabHover_Glass'],[''],['AT0','AT1','AT2','AT3'],['','T'],[[''],[''],[''],['']],['Img']]]);
var dxo = new ASPxClientTabControl('tabMaster');
window['tabMaster'] = dxo;
dxo.uniqueID = 'ctl00$tabMaster';
dxo.RegisterServerEventAssigned(['TabClick']);
dxo.emptyHeight = true;
dxo.emptyWidth = true;
dxo.tabCount=4;
dxo.InlineInitialize();
aspxAddHoverItems is simply unrecognized as the error suggests. Be sure to include all necessary references and assemblies in your project.
This may be just what you need: How to: Manually Register DevExpress Extensions to Start Using Them in an MVC Web Application
Some additional reading: Google Search: aspxAddHoverItems is not defined
Related
When starting the app in development mode no problems, on build I get the error...
private record(mediaStream: MediaStream): void {
this.audioContext = new AudioContext();
this.audioContext.audioWorklet.addModule('./../../../assets/js/converter-processor.js').then(() => {
// code
}
// code
}
Checked converter-processor.js for errors (none and does not use external modules).
Seems the file is not found?
Tried different solutions found on StakOverflow, no success ... :(
Yes it seems such error happens when file is not present - it can't load.
This happens because by default the Worklet.addModule() api expects a URL of a JavaScript file with the module to add. Refer to the docs on MDN.
It does not have to be an external URL, we can simply provide a URL path to the static files in our public folder for example -> /assets/audio-level-processor.js. If it can't find it, it will throw the error message below.
ERROR Error: Uncaught (in promise): AbortError: The user aborted a request.
I used "assets" folder and it works.
await this.audioContext.audioWorklet.addModule(
'/assets/audio-level-processor.js'
);
I remember getting this error a lot a while before. Today I wanted to show it to a friend unfamiliar with Javascript. Chrome and Safari instead gave me something like:
> const o = {};
< undefined
> o.doge()
< TypeError: o.doge is not a function (In 'o.doge()',' 'o.doge' is undefined)
Chrome and Firefox seem to be user-friendly as well.
How can I get an original error, without this helpful message?
You will never get that error in a modern browser; the error comes from js engine itself not the browser; and if there are no others other than that Type Error, modern engines will return a more developer friendly error by applying a (similar) /(w+)/ regex on what ever typed before () and placing it in the error message check out:
v8 (chrome) message templates that will make the error string (line 51, 52):
T(CalledNonCallable, "% is not a function")
and SpiderMoneky (mozilla) message templates (at line 51, 54):
MSG_DEF(JSMSG_NOT_FUNCTION, 1, JSEXN_TYPEERR, "{0} is not a function")
non-callable test case in v8 and a SpiderMokney test case .
So the only way to a undefined is not a function error message in a modern browser is doing undefined() :)
undefined()
you can just try to find and download an older version of the browser which logged the original error. (if that version is still publicly available).
I am working in a Bokeh Server Application using the Python library "Bokeh" and I usually get two types of errors.
JavaScript errors on the Chromium console
Python errors on the server side, they appear in the Tornado logger. Bokeh works with the Tornado Web Server
What I could achieve is to create manual exceptions inheriting the Exception class in python. In this way I can write custom messages and run some actions when the error is raised with this class.
class ManualException(Exception):
def __init__(self, value):
self.value = value
# some actions
def __str__(self):
return repr(
'MANUAL ERROR\n' + self.value
)
But if any other exception occurs then I do not know how to capture them to run some custom actions. I have tried this:
try:
n = 9 / 0
except Exception:
tb = sys.exc_info()[2]
raise ManualException('ZERO ERROR').with_traceback(tb)
Here I have to catch any error manually and I raise them with my manual created class, then both appear in the python logger. Is this the proper way to do this?
2017-09-04 17:08:58,872 Error running application handler <bokeh.application.handlers.directory.DirectoryHandler object at 0x0000023E2435C208>: 'MANUAL ERROR\nZERO ERROR'
File "main.py", line 11, in <module>:
n = 9 / 0 Traceback (most recent call last):
File "[...]\main.py", line 11, in <module>
n = 9 / 0
ZeroDivisionError: division by zero
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "[...]\lib\site-packages\bokeh\application\handlers\code_runner.py", line 125, in run
exec(self._code, module.__dict__)
File "[...]\main.py", line 14, in <module>
raise ManualException('ZERO ERROR').with_traceback(tb)
File "[...]\main.py", line 11, in <module>
n = 9 / 0
exceptions.ManualException: 'MANUAL ERROR\n'ZERO ERROR'
Anyway I want avoid this because I want to show all kind of errors to the user, even if I do not use try-except to capture exceptions.
On the other hand if a python error happens, a JavaScript message is shown. So I think the best option is to override some JavaScript method to run some custom js code. How could I achieve this? Is this achievable?
I got an answer in other SO question. Some listeners can be added to the window in order to get the JavaScript error messages
You can handle it as an event listener on window object.
window.onunhandledrejection = function(event) {
console.warn(`UNHANDLED PROMISE REJECTION: ${event.reason}`);
};
window.onerror = function(event) {
console.warn(`UNHANDLED ERROR: ${event.message}`);
};
Or also like this:
window.addEventListener('error', function(event) { ... })
You can read more about the unhandledrejection event on the MDN web docs here and the onerror event on the docs here
I was trying to implement a project using alasql in an IE8 environment but keep getting the same error. The alasql function isnt executing properly.
I get the following error-
Expected identifier
File: alasql.min.js, Line: 7, Column: 9848
i get this error even when trying to run the most basic code possible which is given below -
var res = alasql('select * from xlsx("xlsxURL")',[],function(res){
console.log(res[1])
});
Is there any way to make it IE8 compliant ?
I am using a JavaScript error logging tool to log any JavaScript errors on my mobile site and I am seeing a large number (22,000 in under a month) of this error:
Uncaught TypeError: Cannot read property '_pmh' of null
I can see from the addthis_widget.js code that it is originating from that script.
I can also tell that it only affects mobile Android and Google Chrome browsers, these in particular:
Android 4, Android 4.1, Android 4.2, Chrome 11, Chrome 18, Chrome 25, Chrome 26, Chrome 27, Chrome Mobile 18, Chrome Mobile 25, Chrome Mobile 26
I am using the following external JavaScript include:
http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4b6adff375a64db9
and have the following configuration object set:
<script type="text/javascript">
var addthis_config = {
data_ga_property: 'UA-18721873-1', // real GA profile hidden for privacy purposes
data_ga_social: true
};
</script>
Is there anything I can do to prevent this error from occuring so many times on these browsers?
I have located the cause of this issue and it is down the following code.
if (window.addthis) {
window.addthis = null;
window._adr = null;
window._atc = null;
window._atd = null;
window._ate = null;
window._atr = null;
window._atw = null;
}
This was an attempt to cleanup the objects lying around when moving between pages dynamically to prevent memory issues.
addThis now provide support for this problem, their support department sent me the following link:
http://www.addthis.com/blog/2013/05/07/a-brief-history-of-using-addthis-dynamically/#.Uklx4RCKyas
and the following explanation/information:
Along with other information from my peers and such, I've come up with
the proper code which should be executed when moving from virtual page
to virtual page such as in your mobile application. Rather than
nulling any of the AddThis related objects, they must be left alone.
When the page URL or Title (or any other AddThis configuration option)
that you want to be used by our buttons changes, you should execute
our method:
addthis.update(type, key, value)
It takes the three parameters: type, key, value.
Type is either "share" or "config". The key is the same key you would
set according to our API documentation. What you likely need to know
are just the two keys: "url" and "title". The value is of course the
value you want those options to have.
After you have updated all of the options you need to update using
that method, you need to invoke this method:
addthis.toolbox(cssSelector)
The cssSelector is usually going to be ".addthis_toolbox" but if for
some reason you don't want to refresh all of your toolboxes, you can
be more specific about it.
Once you have made those changes to your code, I believe that our
tools will work properly for you and that there will be no more "null
object" related javascript errors.
You can look at this JSFiddle to see an example of dynamically
changing content: http://jsfiddle.net/j5addthis/r6Utv/
I'm having the same issue, but it appears that there was, at one point, a fix to your specific case above by simply upgrading the script that you're using from addthis to version 3.0 by changing this:
http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4b6adff375a64db9
To this:
http://s7.addthis.com/js/300/addthis_widget.js#username=xa-4b6adff375a64db9
Read more here: http://support.addthis.com/customer/portal/questions/1021465-addthis-widget-js-throwing-cannot-read-property-pmh-of-null-error-on-android-and-chrome
Note though, as I mentioned above, my issue continues to persist even with version 3.0 despite the AddThis help desk stating that should work.