New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

This comment has been minimized.

Show comment
Hide comment
@Narretz

Narretz Feb 3, 2016

Contributor

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.

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