首页 > 解决方案 > 为什么我有 index.js:1 未捕获的错误:您提供的错误不包含堆栈跟踪。?

问题描述

我正在练习 reactjs 和 Firebase。每当我单击登录按钮并使用 Google 按钮登录时,我都会在控制台中看到此错误。但是,我仍然可以成功地将其保存在 firebase firestore db 中。我只是这个 reactjs 和 firebase 的新手

Uncaught Error: The error you provided does not contain a stack trace.
    at L (index.js:1)
    at Y (index.js:1)
    at index.js:1
    at index.js:1
    at o (index.js:1)

onClick 按钮有问题吗?

<Button onClick={signInWithGoogle}>
     <Typography variant="h6" align="center" display="block">
           Sign In With Google
     </Typography>
 </Button>

这是 firebase utils 中的 signInWithGoogle:

const GoogleProvider = new firebase.auth.GoogleAuthProvider();
GoogleProvider.setCustomParameters( {prompt: 'select_account' });
export const signInWithGoogle = () =>auth.signInWithPopup(GoogleProvider);

标签: javascriptreactjsfirebasegoogle-cloud-firestorefirebase-authentication

解决方案


推荐阅读