You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using ngHttp.HTTP_BINDINGS in SFX build causes InvalidBindingError in alpha.35 #3898
When using ngHttp.HTTP_BINDINGS in angular's 2.0.0_alpha.35 sfx.dev build it's throwing the following error:
InvalidBindingError {message: "Invalid binding - only instances of Binding and Type are allowed, got: [object Object]", _originalException: undefined, _originalStack: undefined, _context: undefined, stack: "Error↵ at InvalidBindingError.BaseException (ht….org/2.0.0-alpha.35/angular2.sfx.dev.js:20107:38)"}
Error
at InvalidBindingError.BaseException (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:11539:25)
at new InvalidBindingError (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:12886:65)
at _resolveBindings (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:32901:15)
at _resolveBindings (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:32897:20)
at Function.System.register.execute.Injector.resolve (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:33554:36)
at Injector.System.register.execute.Injector.resolveAndCreateChild (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:33325:45)
at _createAppInjector (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:36509:26)
at https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:36475:27
at Zone.run (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:136:17)
at Zone.System.register.execute.NgZone._createInnerZone.zone.fork.fork.$run [as run] (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:20107:38)
Looks like ngHttp module is using a somehow incompatible binding mechanism to generate HTTP_BINDINGS.
If I'm making something wrong any advice is welcome. Also if you think I can give you a hand to resolve this give me some tips and I'll PR with a solution.
Hey @alfonso-presa thanks for opening the issue, and sorry for the trouble. I didn't thoroughly test the http sfx bundle when I added it. The SFX http bundle will not exist in future releases, and since this has already been fixed in master, I will go ahead and close this.
Problems apart, I really liked the thinking behind the two separate bundles. I though it might be some strategy thing and that it would be extended to some other modules like the router for example. I wish you could give this separation of modules another chance latter on... but first things first of course :-)
BTW, you might also want to close #3890 as I'm quite sure it's also caused by the two separate bundles.
Thanks!
angular-automatic-lock-bot commented on Sep 7, 2019
Activity
alfonso-presa commentedon Aug 30, 2015
Looks like the BindingBuilder class is duplicated in both bundles. Changing line
11020inhttp.sfx.dev.jsfor the following also did the trick:I guess it's because both bundles are built with
angular2/src/di/binding.tsembedded and they are conflicting one with the other.alfonso-presa commentedon Aug 30, 2015
@jeffbcross. Looking at this issue more in detail I have come to this other: #2680
Looks like the http sfx build was done here:
5a40501#diff-b9e12334e9eafd8341a6107dd98510c9R1017
And it seems to be undone here:
8ed22ce#diff-b9e12334e9eafd8341a6107dd98510c9L1118
Alpha 35 was released in between so it does have the sfx package for http... wich is causing the problem reported in this issue.
Seen that it has been undone... ¿should I close this issue? Or is
http.sfx.dev.jsgoing to come back again in the near future :-).Thanks!
edit: It looks like the cause for this other issue too: #3890
0x-r4bbit commentedon Aug 31, 2015
@alfonso-presa oh wow, thank you for your research on this. I vote for keeping this open once a fix landed in alpha.36+
alfonso-presa commentedon Aug 31, 2015
Thank for you response Pascal!
I'll keep it open then.
jeffbcross commentedon Aug 31, 2015
Hey @alfonso-presa thanks for opening the issue, and sorry for the trouble. I didn't thoroughly test the http sfx bundle when I added it. The SFX http bundle will not exist in future releases, and since this has already been fixed in master, I will go ahead and close this.
alfonso-presa commentedon Aug 31, 2015
@jeffbcross, no problem at all :-).
Problems apart, I really liked the thinking behind the two separate bundles. I though it might be some strategy thing and that it would be extended to some other modules like the router for example. I wish you could give this separation of modules another chance latter on... but first things first of course :-)
BTW, you might also want to close #3890 as I'm quite sure it's also caused by the two separate bundles.
Thanks!
angular-automatic-lock-bot commentedon Sep 7, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.