Can't use firebase, firestore Initialize throwing CORS error:

Note: Just a beginner, so the question may sound stupid to you.

The Firestore (or Firebase in general) never throws any error, but strangely enough, the simple initialize request is causing this.

Error at tab1:1

Access to XMLHttpRequest at ‘ &zx=il9z8prfbzqm&t=1’ from origin ‘http://localhost:8100’ has been blocked by CORS policy: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

I have included the firebase config in environment file and have initialized it like this in app.module.ts

import { AngularFireModule } from '@angular/fire';
import { AngularFirestoreModule, FirestoreSettingsToken } from '@angular/fire/firestore';
imports: [

My ionic info:


   Ionic CLI                     : 5.4.2 (C:\Users\username\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.11.5
   @angular-devkit/build-angular : 0.801.3
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.1.1


   cordova-res : 0.8.0
   native-run  : 0.2.8


   NodeJS : v10.16.3 (C:\Program Files\nodejs\node.exe)
   npm    : 6.9.0
   OS     : Windows 10

It’s embarrassing that I can’t even get started with a simple crud app.

You can refer to these 2 articles for solving CORS issue

  1. :- using gsutil tool to set ur firebase config
  2. :- Article by Josh Morony