i am using the following simple code, which worked for some days and is now not working -
function signIn() {
// Sign into Firebase using popup auth & Google as the identity provider.
var provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithPopup(provider);
}
document.getElementById("signin").onclick = signIn;
it is giving error -
Uncaught TypeError: e.open is not a function
at Mt (firebase-auth.js:sourcemap:1)
at ii (firebase-auth.js:sourcemap:1)
at zh.t.Xc (firebase-auth.js:sourcemap:1)
at zh.i [as signInWithPopup] (firebase-auth.js:sourcemap:1)
at HTMLButtonElement.signIn (sign-in.js:4)
also when i change the signInWithPopup with signInWithRedirect, it is working. I don't know where the problem is?
I am using following links in head of index.html -
<script src="https://apis.google.com/js/api:client.js"></script>
<!-- update the version number as needed -->
<script defer src="/__/firebase/8.6.2/firebase-app.js"></script>
<!-- include only the Firebase features as you need -->
<script defer src="/__/firebase/8.6.2/firebase-auth.js"></script>
<script defer src="/__/firebase/8.6.2/firebase-database.js"></script>
<script defer src="/__/firebase/8.6.2/firebase-firestore.js"></script>
<script defer src="/__/firebase/8.6.2/firebase-functions.js"></script>
<script defer src="/__/firebase/8.6.2/firebase-messaging.js"></script>
<script defer src="/__/firebase/8.6.2/firebase-storage.js"></script>
<script defer src="/__/firebase/8.6.2/firebase-analytics.js"></script>
<script defer src="/__/firebase/8.6.2/firebase-remote-config.js"></script>
<script defer src="/__/firebase/8.6.2/firebase-performance.js"></script>
<!--
initialize the SDK after all desired features are loaded, set useEmulator to false
to avoid connecting the SDK to running emulators.
-->
<script defer src="/__/firebase/init.js?useEmulator=true"></script>