Angularfire: Angular10 - Loading chunk firebase-analytics failed

Created on 25 Aug 2020  Â·  6Comments  Â·  Source: angular/angularfire

Version info

Angular: 10.0.5 / 10.0.1 / 10.0.0

Firebase: 7.19.0 / 7.15.1

AngularFire: 6.0.2 / 6.0.3-canary.93912bc

Other (e.g. Ionic/Cordova, Node, browser, operating system): Any browser, Mac

How to reproduce these conditions

  • Create a new Angular project via CLI (ng new test-project) (Angular CLI 10.0.4)
  • Install firebase and Angular/fire
  • Import to app.modules, and to a constructor the analytics service.
  • (optional) add to angular.json "allowedCommonJsDependencies": [ "firebase/app", "@firebase/auth"] to disable ES module / commonjs module warning at the console.

Additional:
I tried to use npm i @angular/fire@canarywithout any success, following #2526, and even downgrading the versions of both Angular and firebase.

I also tried to disable vendor-chunk and common-chunk, and some multiple other options.

Debug output

Screen Shot 2020-08-25 at 10 56 48

Screen Shot 2020-08-25 at 10 58 33

Expected behavior

Imports and works ?!

Actual behavior

Error at the console, can't use the service.

Most helpful comment

Had the same issue. In my case, I found out that my AdBlock was preventing the library from downloading the firebase-analytics file.

All 6 comments

Had the same issue. In my case, I found out that my AdBlock was preventing the library from downloading the firebase-analytics file.

@HugoSart Wow I can't believe it, it is indeed AdBlock, it works when disabled. Now I don't know what to do, as I can't control that

i have the same problem :( , thank for the answer, i disable adblocker for my page and this works.. the error disapier

I'm not sure that there is much that the library can do to avoid ad blockers. Most likely any update would be met with a change to the ad blocker to make sure that it breaks loading again.

Thanks for You reply

El jue., 24 de septiembre de 2020 5:04 p. m., Michael Prentice <
[email protected]> escribió:

I'm not sure that there is much that the library can do to avoid ad
blockers. Most likely any update would be met with a change to the ad
blocker to make sure that it breaks loading again.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/angular/angularfire/issues/2575#issuecomment-698612882,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQAEQKGLG5YCQPHE7H5GLMDSHO7ALANCNFSM4QKXQIGQ
.

Does it mean that firebase analytics won't be able to send data from user using adBlock/uBlock Origin ?
Or this issue only occur during debug / development mode ?

Was this page helpful?
0 / 5 - 0 ratings