0

My application works perfectly fine in chrome but while loading the application in Mozilla firefox, it complains about the following while service call in the console............Any help would be highly appreciated

EXCEPTION: Uncaught (in promise): TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
subscribeToResult@http://localhost:4200/vendor.bundle.js:42454:27
["../../../../rxjs/operator/catch.js"]/CatchSubscriber.prototype.error@http://localhost:4200/vendor.bundle.js:30613:22
["../../../../rxjs/Subscriber.js"]/Subscriber.prototype._error@http://localhost:4200/vendor.bundle.js:23676:9
["../../../../rxjs/Subscriber.js"]/Subscriber.prototype.error@http://localhost:4200/vendor.bundle.js:23650:13
XHRConnection/this.response</onError@http://localhost:4200/vendor.bundle.js:111302:17
["../../../../zone.js/dist/zone.js"]/</</ZoneDelegate.prototype.invokeTask@http://localhost:4200/polyfills.bundle.js:6063:17
["../../../core/src/zone/ng_zone.js"]/NgZone.prototype.forkInnerZoneWithAngularBehavior/this.inner<.onInvokeTask@http://localhost:4200/vendor.bundle.js:102996:28
["../../../../zone.js/dist/zone.js"]/</</ZoneDelegate.prototype.invokeTask@http://localhost:4200/polyfills.bundle.js:6062:17
["../../../../zone.js/dist/zone.js"]/</</Zone.prototype.runTask@http://localhost:4200/polyfills.bundle.js:5862:28
ZoneTask/this.invoke@http://localhost:4200/polyfills.bundle.js:6116:28

Here is the code that I am using to call the service. And this call works absolutely fine in Chrome/IE

headers = new Headers();
  constructor(private http:Http) {
    this.headers.append('content-type', 'application/json');
    this.headers.append('Accept', 'q=0.8;application/json;q=0.9');
  }
  getFundingRequestData() {
    return this.http.get(this.Url).map((res:Response) => res.json()).catch((err:any) => err);
  }
DP3
  • 108
  • 6
  • 19
  • You might want to add the Firefox version/OS you are using. You also tagged as twitter-bootstrap. Plus without code this is going to be very hard for people to assist on.. It's just webpack stuff... – JGFMK Aug 02 '17 at 18:09
  • There are similar types of thing here for example: https://stackoverflow.com/questions/43549223/typeerror-you-provided-an-invalid-object-where-a-stream-was-expected-you-can-p – JGFMK Aug 02 '17 at 18:12
  • Can you share your code? – Shashank Aug 03 '17 at 09:23
  • Updated the code where service is being called. the same code works for IE/Chrome but has issues in Mozilla – DP3 Aug 03 '17 at 14:06

0 Answers0