firebase-js-sdk icon indicating copy to clipboard operation
firebase-js-sdk copied to clipboard

Cross-Origin-Opener-Policy policy would block the window.closed call.

Open dreamjet31 opened this issue 1 year ago • 4 comments

Operating System

Windows 11

Browser Version

124.0.6367.118

Firebase SDK Version

^10.11.1

Firebase SDK Product:

Auth

Describe your project's tooling

React bootstrap app with vite

Describe the problem

I have implemented signIn/signUp using firebase auth. When I try to signIn with email and password, there are no errors consoled. When I try to signInWithGoogle, it was successfully signed in, but it consoled

Cross-Origin-Opener-Policy policy would block the window.closed call.
firebase_auth.js?v=7506f255:6655 

Steps and code to reproduce issue

Here is specific code part in firebase_auth.js that shows the console error:

pollUserCancellation() {
    const poll = () => {
      var _a, _b;
      if ((_b = (_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.window) === null || _b === void 0 ? void 0 : _b.closed) {
        this.pollId = window.setTimeout(
          () => {
            this.pollId = null;
            this.reject(_createError(
              this.auth,
              "popup-closed-by-user"
              /* AuthErrorCode.POPUP_CLOSED_BY_USER */
            ));
          },
          8e3
          /* _Timeout.AUTH_EVENT */
        );
        return;
      }
      this.pollId = window.setTimeout(poll, _POLL_WINDOW_CLOSE_TIMEOUT.get());
    };
    poll();
  }

dreamjet31 avatar May 02 '24 06:05 dreamjet31

Hi @flurryunicorn, thanks for reaching out to us. I’m able to reproduce the error you mentioned. I’ll raise this to our engineering team to see what we can do here and I’ll update this thread if I have any information to share.

jbalidiong avatar May 02 '24 13:05 jbalidiong

thanks, let me know if you have any update about that issue @jbalidiong

dreamjet31 avatar May 03 '24 18:05 dreamjet31

Hi, this blog post talks about workaround for getting rid of the error https://stackoverflow.com/questions/76446840/cross-origin-opener-policy-policy-would-block-the-window-closed-call-error-while

bhparijat avatar May 08 '24 20:05 bhparijat

Hey @flurryunicorn. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar May 15 '24 01:05 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@flurryunicorn if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar May 22 '24 01:05 google-oss-bot