-
Notifications
You must be signed in to change notification settings - Fork 27.4k
1.5.0-rc.1 fails to load in PhantomJS 1.x + Karma environment #13794
Comments
Phantom 1.x doesn't have Function.prototype.bind. Just use Phantom 2.x or a polyfill. |
Using a polyfill fixed the issue for me. Interestingly we already had a Switching to this polyfill worked. Should this be announced more widely? I'm not sure whether this is necessarily a breaking change, but there's enough usage of Phantom 1.x + Karma out there that I'd guess this will hit a lot of folks. |
PhantomJs isn't among the officially supported browsers. Also, Phantom JS 1 is very old. We'll rely on the social channels here to spread the word. I'm leaving this issue open for a bit because of that. |
It was hard for me to figure out how to use PhantomJS2 as an alternative to polyfill. Here are the steps I used, in case it helps others:
|
@gillius Thanks, this is good info. I'm gonna close this issue, as there's nothing more we can do about this. |
PhantomJS 1 is fails to load in angular 1.5+ due to missing function prototypes. Can revert to karma-phantomjs-launcher once it officially supports PhantomJS2 No fix from the angular project because phantomjs is not one of the officially supported browsers See: angular/angular.js#13794
Why is this not in the changelog? |
Because we don't support PhamtomJS officially |
This fixes the current build, which is broken on angular 1.5.0 due to angular/angular.js#13794.
This fixes the current build, which is broken on angular 1.5.0 due to angular/angular.js#13794.
This fixes the current build, which is broken on angular 1.5.0 due to angular/angular.js#13794.
FYI: karma-phantomjs2-launcher is deprecated. If you update karma-phantomjs-launcher to "1.0.0" you get the same effect (PhantomJS 2.1.1) and you don't need to edit karma.conf. |
Angular 1.5 relies on “Function.prototype.bind.apply” which isn’t supported by PhantomJS 1. The comments here had good info: angular/angular.js#13794 Updated karma-phantomjs-launcher, and added phantomjs-prebuilt because it’s a peer-dependency (which isn’t installed automatically by npm 3). Included Angular 1.5 in the tests.
Angular 1.5 relies on “Function.prototype.bind.apply” which isn’t supported by PhantomJS 1. The comments here had good info: angular/angular.js#13794 Updated karma-phantomjs-launcher, and added phantomjs-prebuilt because it’s a peer-dependency (which isn’t installed automatically by npm 3). Included Angular 1.5 in the tests. Fixes #45
- feat add automatic availibility date - update dependencies (because of angular 1.5.0's [issue#13794](angular/angular.js#13794))
This fixes the test failure with AngularJS 1.5 which is not compatible with PhantomJS 1: angular/angular.js#13794 BREAKING CHANGES: The minimal AngularJS version is now 1.2.x. The branches 1.0.x et 1.1.x are no longer supported. Closes #135
This fixes the test failure with AngularJS 1.5 which is not compatible with PhantomJS 1: angular/angular.js#13794 BREAKING CHANGES: The minimal AngularJS version is now 1.2.x. The branches 1.0.x et 1.1.x are no longer supported. Closes #135
Some tests are failing with PhantomJS 1.x and Angular 1.5. See [this AngularJS issue](angular/angular.js#13794).
Fixes the breaking build as detailed here angular/angular.js#13794
possible reason behind crash when testing: 1.5.0-rc.1 fails to load in PhantomJS 1.x + Karma environment angular/angular.js#13794 crash log: ``` PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR Error: [$injector:modulerr] Failed to instantiate module ng due to: TypeError: 'undefined' is not an object (evaluating 'Function.prototype.bind.apply') at ... at /Users/shahwarcoder/loopback-sdk-angular/test.e2e/given.js:19 ```
… Funtion.prototype.bind Ref: angular/angular.js#13794
PhantomJS 1.x doesn't have Function.prototype.bind which latest Angular seems to be using. And upgrade to the launcher ensures that we use PhantomJS 2.x Ref: angular/angular.js#13794
PhantomJS 1.x doesn't have Function.prototype.bind which latest Angular seems to be using. And upgrade to the launcher ensures that we use PhantomJS 2.x Ref: angular/angular.js#13794
angular/angular.js#13794 The 0.0.1 polyfill for PhantomJS no longer worked so I'm replacing it. We should consider upgrading to PhantomJS 2.x, though.
angular/angular.js#13794 The 0.0.1 polyfill for PhantomJS no longer worked so I'm replacing it. We should consider upgrading to PhantomJS 2.x, though.
angular/angular.js#13794 The 0.0.1 polyfill for PhantomJS no longer worked so I'm replacing it. We should consider upgrading to PhantomJS 2.x, though.
angular/angular.js#13794 The 0.0.1 polyfill for PhantomJS no longer worked so I'm replacing it. We should consider upgrading to PhantomJS 2.x, though.
angular/angular.js#13794 The 0.0.1 polyfill for PhantomJS no longer worked so I'm replacing it. We should consider upgrading to PhantomJS 2.x, though.
I have an application which I just updated to 1.5.0-rc.1, and all our tests began to fail. It appears that the latest releases of Karma and PhantomJS are incompatible with rc1, though I'm not sure what's changed.
Tested with
[email protected]
and[email protected]
, see the gist'spackage.json
for more specifics.To reproduce, clone and see the files in this gist: https://gist.github.com/mattdsteele/33f9b237fd13e9edc222
The error I'm seeing:
The tests pass if I do any of the following:
angular
andangular-mocks
to1.5.0-rc.0
PhantomJS
toChrome
The tests do not pass if I:
Tested on Windows 7 and OS X.
The text was updated successfully, but these errors were encountered: