createInternalInjector.instantiate fails at args.unshift(null) in PhantomJS 1.9.8 (Angular 1.5.0-rc2) #13939

Closed
jsdw opened this Issue Feb 3, 2016 · 1 comment

Projects

None yet

2 participants

@jsdw
jsdw commented Feb 3, 2016

Our test suite started failing with:

[$injector:pget] Provider '$$sanitizeUri' must define $get factory method.

When I upgraded to angular 1.5.0-rc2. I tracked the error down to the line

args.unshift(null);

In angular.js, in the function instantiate, which is returned from createInternalInjector. With null, the object returned from providerInjector.instantiate(provider_) (where provider_ was the function $$SanitizeUriProvider) is empty. I imagine PhantomJS, being based on quite an old engine, handles new/bind a little differently.

The fix for me was simply changing the null to an {}.

Not sure if the version of phantom this fails on is supported but thought I'd bring it up just in case! :)

@Narretz
Contributor
Narretz commented Feb 3, 2016

This sounds similar to #13794 We don't officially support PhantomJS as a browser, but the good news is that you can simply upgrade to PhantomJS 2 or use a polyfil for whatever is missing. I think it's the same as in the other issue.

@Narretz Narretz closed this Feb 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment