question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'options' of undefined

See original GitHub issue

Html

<h1>FirebaseUI-Angular Sample</h1>
<firebase-ui></firebase-ui> <!-- this error point-->
<button (click)="logout()">Logout</button>

Chrome console

core.js:6185 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'options' of undefined
TypeError: Cannot read property 'options' of undefined
    at new Ao (esm.js:359)
    at new FirebaseuiAngularLibraryService (firebaseui-angular.js:16)
    at Object.FirebaseuiAngularLibraryService_Factory [as factory] (firebaseui-angular.js:21)
    at R3Injector.hydrate (core.js:16865)
    at R3Injector.get (core.js:16617)
    at NgModuleRef$1.get (core.js:36024)
    at Object.get (core.js:33773)
    at getOrCreateInjectable (core.js:5805)
    at Module.ɵɵdirectiveInject (core.js:20861)
    at NodeInjectorFactory.FirebaseuiAngularLibraryComponent_Factory [as factory] (firebaseui-angular.js:108)
    at resolvePromise (zone-evergreen.js:798)
    at resolvePromise (zone-evergreen.js:750)
    at zone-evergreen.js:860
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:41344)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)
    at Zone.runTask (zone-evergreen.js:167)
    at drainMicroTaskQueue (zone-evergreen.js:569)

esm.js359 error point

... a=firebase.initializeApp({apiKey:a.app.options.apiKey,authDomain:a.app.options.authDomain} ... 

My package.json dependencies…

  "dependencies": {
    "@angular/animations": "~9.1.0",
    "@angular/common": "~9.1.0",
    "@angular/compiler": "~9.1.0",
    "@angular/core": "~9.1.0",
    "@angular/fire": "^6.0.0",
    "@angular/forms": "~9.1.0",
    "@angular/material": "^9.2.0",
    "@angular/platform-browser": "~9.1.0",
    "@angular/platform-browser-dynamic": "~9.1.0",
    "@angular/router": "~9.1.0",
    "firebase": "^7.13.2",
    "firebaseui": "^4.5.0",
    "firebaseui-angular": "^4.1.0",
    "rxjs": "~6.5.5",
    "tslib": "^1.11.1",
    "zone.js": "~0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.901.0",
    "@angular/cli": "~9.1.0",
    "@angular/compiler-cli": "~9.1.0",
    "@angular/language-service": "~9.1.0",
    "@babel/core": "^7.9.0",
    "@storybook/addon-actions": "^5.3.18",
    "@storybook/addon-links": "^5.3.18",
    "@storybook/addon-notes": "^5.3.18",
    "@storybook/addons": "^5.3.18",
    "@storybook/angular": "^5.3.18",
    "@types/jasmine": "~3.5.10",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^13.11.0",
    "babel-loader": "^8.1.0",
    "codelyzer": "^5.2.2",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~5.0.1",
    "karma": "~4.4.1",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~2.1.0",
    "karma-jasmine": "~3.1.1",
    "karma-jasmine-html-reporter": "^1.5.3",
    "protractor": "~5.4.3",
    "ts-node": "~8.8.1",
    "tslint": "~6.1.1",
    "typescript": "~3.8.3",
    "@angular-devkit/architect": "0.901.0",
    "firebase-tools": "^8.0.1",
    "fuzzy": "^0.1.3",
    "inquirer": "^7.1.0",
    "inquirer-autocomplete-prompt": "^1.0.1"
  }

I just followed https://github.com/RaphaelJenni/FirebaseUI-Angular. What is the problem? Help me.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
RaphaelJennicommented, Apr 8, 2020

I have a possible fix, please check if this works for you: npm i firebaseui-angular@5.0.0-beta.0

3reactions
doublep563commented, Apr 6, 2020

Looks like angularfire 6.0.0 introduced the problem. Went back to 5.4.2 to fix this problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'options' of undefined
Your problem is that element.config is undefined . You can either go with Basem's anwser ( ...
Read more >
Javascript error "Cannot read property 'options' of undefined"
Problem/Motivation I had this javascript error on a page where entity browser is used (as a dialog) : Uncaught TypeError: Cannot read ......
Read more >
TypeError: Cannot read property 'options' of undefined #599
Expected behavior No exceptions Actual behavior Daily, but fairly low rate of TypeError: Cannot read property 'options' of undefined ...
Read more >
Uncaught TypeError: Cannot read property ... - Google Groups
Uncaught TypeError: Cannot read property 'options' of undefined. Seems to be line 87 of the "jquery.fileupload-ui.js" file, which reads:
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError: Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found