We cleared and rebuilt our dependency trees yesterday, and we've suddenly starting seeing these types of jasmine errors, mostly on calls to toHaveBeenCalledWith.
20) should call callback on modal success
Email Campaign Preview Controller showSuccess function
TypeError: undefined is not a constructor (evaluating 'allKeys[i].match(/^[0-9]+$/)') in node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 2988)
public/assets/src/emailcampaign/email-campaign-preview.spec.js:200:41
I've upgraded all my jasmine and karma related packages. I'm hoping someone here might've seen something similar in the past.
Bug with array equality checking in jasmine 2.5.0 - take a look at the issue in github: https://github.com/jasmine/jasmine/issues/1195
For now, you can revert jasmine to 2.4.1 in your package.json.
Related
I'm part of a team that's using NativeScript and angular and we keep getting errors that look like:
Error: com.tns.NativeScriptException: Attempt to use cleared object reference id=<some-object-id-number>
From some research it's because we use markingMode: none in order to speed up our application. We want to keep using this so we need to find the source of the errors. From the documentation, it comes from creating a native object then wrapping it in a JS method so the garbage collector removes the native object in the method but since it's still being referenced an error is thrown. The documentation also indicated that this most likely stems from using plugins that haven't adapted to markingMode: none. The plugin I believe that's causing this is the nstudio nativescript-checkbox plugin. So I looked through the source code to try to find the native options that fit the criteria and my issues are the following:
I'm not sure if I'm finding all the native objects.
I don't know where to release them in the code.
I'm not sure if this plugin is the only one that's causing issues (we use a lot of plugins and all of them are pretty integral to our code).
I scoured our code base and couldn't find any instances where this may be a problem, but I could be wrong.
If anyone has experienced this markingMode: none issue, specifically with plugins, I would love to hear how you dealt with it and if you had any tips/suggestions moving forward. Here's the documentation detailing this issue:
https://docs.nativescript.org/core-concepts/android-runtime/advanced-topics/marking-mode-none
The NativeScript developers said it was fixed in this bug fix with an update, but I haven't noticed a change:
https://github.com/NativeScript/NativeScript/issues/7125
UPDATE: I commented out the checkbox plugin and no error, this is definitely being caused by the plugin
Removed all instances of the checkbox component and the side navigation bar and made our own custom components for them.
While using Magento 1.9 (I think that's not very important) I've got following errors in IE9:
SCRIPT438: Object doesn't support property or method 'observe'
validation.js, line 98 character 35
This exception points to an Event.observe call, and there are more exceptions like that.
The prototype version is 1.7.0 and it's loading as first script (by the script src) in header element. All the errors occurs in scripts which should be loaded/initialized after the prototype.js.
I'm debugging it for a few hours without results. The problem does not occur in other browsers.
Do you know how to fix that?
Try upgrading to the latest version of Prototype, and see if that solves the issue. There was a lot of work done in IE compatibility during 1.7.3.
This is a boiled-down repro of a problem I'm having in a much larger app. I can't seem to find a solution for it. If you run this in IE8, the ui-popup directive doesn't work, and the script debugger console has the error message "TypeError: Object doesn't support this property or methodundefined".
I tried to strip away as many directives, controllers, and as much code as possible.
jsFiddle Link
If you downgrade angularjs to 1.0.3 it works in ie8.
Edit
Angular 1.0.5 also works.
I am in the process of converting my existing test scripts that function fine on Firefox 3.6 to work on firefox 4.0. I've noticed a significant number of syntax changes but the one that is plaguing me at the moment is using verify_contains('text').
The same test that functions fine on firefox 3.6 throws the following error on firefox 4.0 when I use the watir-webdriver
test_060contactmgmt(Test_contact_mgmt):
NoMethodError: undefined method `verify_contains' for #.
If this helps any, I ran a gem update and I am using Netbeans IDE 6.9.1.
It looks like that method has been deprecated in watir-webdriver; for more information have a look at this page Comparison with Watir 1.X at GitHub for the project.
You could always extend the class in your own code to include your own version of the method, I have done this to cover some of the missing methods in my test script after converting them from Watir.
I am trying to use the flXHR javascript library for making cross-domain calls.
I got stuck at the begining.
As they say in the docs, I copied the /deploy directory's content to a /scripts directory.
All the dependencies are supposed to be included in the flXHR download.
This is my html, which returns several errors:
the errors:
y.base_path is undefined
y.checkplayer is undefined
y.ua is undefined
E.attachEvent is not a function
thanks
flXHR is tested and works (AFAIK) on all major browsers' latest released versions. I don't revalidate the test-suite every single new release of any browser, but I do so from time to time.
With respect to the "base_path is undefined" error... the problem is not with flXHR (or CheckPlayer), but with how Firebug traps for JS errors.
I have a try/catch block around access of that variable, and if it's not present, then I take an alternate action. From a normal JS perspective, this is not a JS error, because the try/catch block catches it and deals with it. But Firebug still registers it as an error. This error is erroneous, and as far as I know is not going to affect any behavior in the rest of your code.
Again, to my knowledge, flXHR is currently working in all browsers. If you have issues, please visit the flXHR forum on http://flXHR.flensed.com.
I noticed the "y.base_path is undefined" error sometimes, but only when Firebug is open. Try closing firebug (or use a different browser) and see what happens.