title: error calling Firebase Functions from Angular7: Response is not valid JSON object
body: <p>I am try use firebase functions in angular application.
  I use angularfire2 library
  In result:</p>
  
  <p>{err: Error: Response is not valid JSON object.
      at new HttpsErrorImpl (<a href="http://localhost:4200/vendor.j" rel="noreferrer">http://localhost:4200/vendor.j</a>…}</p>
  
  <pre><code>const functions = require('firebase-functions');
  
  const cors = require('cors')({
      origin: true
    });
  
  exports.helloWorld = functions.https.onRequest((request, response) =&gt; {
      cors(request, response, () =&gt; {
          response.send('Hello from Firebase!');
      });
  
  });
  </code></pre>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { AngularFireFunctions } from 'angularfire2/functions';
  import { Observable } from 'rxjs';
  import { first } from 'rxjs/operators';
  
  @Component({
    selector: 'app-test',
    templateUrl: './test.component.html',
    styleUrls: ['./test.component.css']
  })
  export class TestComponent implements OnInit {
  
    message: Observable&lt;string&gt;;
    message2: string;
  
    constructor(private fns: AngularFireFunctions) {
    }
  
    ngOnInit() {
    }
  
    getfsf() {
  
      this.fns.httpsCallable('helloWorld')({ text: 'Some Request Data' })
        .pipe(first())
        .subscribe(resp =&gt; {
          console.log({ resp });
        }, err =&gt; {
          console.error({ err });
        });
  
    }
  }
  
  </code></pre>