Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

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

Comments

@jsdw
Copy link

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
Copy link
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 as completed Feb 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants