From what I could find the window.open will return null when it fails to open. Something may be keeping the browser from opening additional windows a couple of times; maybe it is a popup blocker.

The actual loading of the url and creation of the window are done asynchronously.

https://developer.mozilla.org/en-US/docs/Web/API/Window.open

Answer from Joshua5822 on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › Window › open
Window: open() method - Web APIs | MDN
If the Cross-Origin-Opener-Policy ... object will indicate that the opened window is closed (closed is true). null is returned if the browser fails to open the new browsing context, for example because it was blocked by a browser popup blocker....
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 996153 › window-open-api-returns-null-although-the-window-i
window.open API returns null although the window is launched. - Microsoft Q&A
September 6, 2022 - Also if instead of giving "blank.html" if we specify the jsp page itself then window.open does not return null and works fine.
🌐
Medium
ffan0811.medium.com › window-open-returns-null-in-safari-and-firefox-after-allowing-pop-up-on-the-browser-4e4e45e7d926
window.open returns null in Safari and Firefox after allowing pop-up on the browser | by Mijeong | Medium
December 12, 2021 - const onClick = async () => { const { popupUrl } = await requestPopupUrl(); const popup = window.open(popupUrl); setInterval(() => { console.log(popup); // returns null every one second }, 1000); };
🌐
GitHub
github.com › SeleniumHQ › selenium › issues › 4936
window.open returns null when invoked via Selenium · Issue #4936 · SeleniumHQ/selenium
July 30, 2017 - When invoked via Selenium, it fails - the window handle returned is null. This runs fine when invoked with a manual @click. // open a new window and set it as the target of the form submission win = window.open("/BlankWithIndicator.jsp", "dynamicSortWindowName", "width=450,height=325,left=575,top=191"); win.focus(); win variable has null from window.open(...) call and then fails on the next line win.focus() I am invoking the function containing these lines via click of a button using ·
Author   lalitrnagpal
🌐
GitHub
github.com › dart-lang › sdk › issues › 16830
window.open always returns null · Issue #16830 · dart-lang/sdk
November 21, 2013 - You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window.
Author   DartBot
🌐
Mozilla Bugzilla
bugzilla.mozilla.org › show_bug.cgi
Bug 50894 - window.open returns null
to reproduce, load mail, close all browser windows. Select multiple search engines in the search sidebar panel (right click on the tree to enable advanced search options that let you pick more than one search engine if you have not enabled this mode already), and run a search on anything. In the js console, you should see a message like this: *** navWindow = null the value is the value returned by a call to open() (or openDialog, both give the same results) attempting to load a new navigator window.
🌐
Mozilla Bugzilla
bugzilla.mozilla.org › show_bug.cgi
1613898 - window.open return null
When we call window.open from extension with url where scheme is https, we should have Window object and opened widnow shoud have parent window object in window.opener. just like this happens in Firefox outside of extension. Sounds like a duplicate of bug 1466347. ... Sounds like a duplicate of bug 1466347. I think yes. can close. ... But in Chrome is working as we expected and window object alway will return for both case.
Find elsewhere
🌐
CEF Forum
magpcss.org › ceforum › viewtopic.php
CEF Forum • window.open() returns null with Chromium 128
Hi, our javascript application ... window.open() just returns null and the documentation does not say much about that: null is returned if the browser fails to open the new browsing context, for example because it was blocked by a browser popup blocker....
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 2150098 › window-open-api-returns-null-although-the-browser
window.open API returns null although the browser is launched. - Microsoft Q&A
It works well when the code runs in the browser. Most of time, window.open will return the object. It returns null when there is a pop-up blocker.
🌐
GitHub
github.com › AzureAD › microsoft-authentication-library-for-js › issues › 1705
Error - error opening popup empty_window_error: window.open returned null or undefined window object. · Issue #1705 · AzureAD/microsoft-authentication-library-for-js
May 25, 2020 - : 1.0.0-beta.2 : Error - error opening popup empty_window_error: window.open returned null or undefined window object.
Published   May 25, 2020
Author   DarkLite1
🌐
CEF Forum
magpcss.org › ceforum › viewtopic.php
CEF Forum • js window.open return null ILifeSpanHandler:OnBeforePopup
Hello, I have a similar problem ... and I cannot change it) var myWindow = window.open("", "MsgWindow", "width=200,height=100"); The return value of "window.open" is null when I implement the method ILifeSpanHandler:OnBeforePopup () When I tried to set a value to the parameter ...
🌐
GitHub
github.com › whatwg › html › issues › 10751
Way to close stale window with null reference that browser opens after a blocked popup was allowed by user · Issue #10751 · whatwg/html
August 14, 2024 - What is the issue with the HTML Standard? window.open() Returns null Reference after a Popup is allowed by user gesture Currently there is no api to check for popup blocker is active, or quering popup/redirect Permissions are given In or...
Author   tathastu871
🌐
GitHub
github.com › OfficeDev › office-js › issues › 1525
window.open from add-in in Windows Outlook using WebView1 returns null window · Issue #1525 · OfficeDev/office-js
October 27, 2020 - Calling window.open from an add-in on versions of Windows Outlook that use WebView1 (old Edge, specifically Office for 365 16.0.13328.20350) is seen to return null rather than a reference to the newly opened window. The new window is opened however no reference is returned to it.
Author   westconference
🌐
Microsoft Learn
learn.microsoft.com › en-us › archive › msdn-technet-forums › eeae3e8e-38d4-49bf-ab43-0da00e38693e
window.open() returning null | Microsoft Learn
I had no problems executing your code, other than trying to emulate what your Resources.Dictionary.Print puts out. I think that you are confused as to what the second argument to window.open is. That is the ID of the new window and 99% of the time should be a unique ID for the new window.
🌐
Stack Overflow
stackoverflow.com › questions › 24268278 › window-open-returning-null-after-launching-the-url
window.open returning null after launching the URL
<html> <head> <title>Test for Window Already Open</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script> var gmyWin=null; function myOpenWindow(winURL,winName,winFeatures,winObj) { var theWin; theWin = window.open(winURL,winName,winFeatures); // here theWin variable is null return theWin; } </script> </head> <body> <h1>Click this link to open the new window:</h1> <p><a href='javascript:;' onClick='javascript:gmyWin=myOpenWindow("http://example:7001/tester/helloworld.jsp","myWin","height=630,width=1100",gmyWin);return false'>open new window</a> </p> </body>