-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firefox is already running, but is not responding. The old Firefox process must be closed to open a new window. #2179
Comments
Could you please attach a trace-level log from geckodriver? Read more about reporting actionable bugs in our contribution guidelines. |
I have updated the stracktrace @whimboo . I am also receiving this |
The first launch of Firefox somehow failed and maybe these WebGL warnings indicate a problem. After that Firefox gets started a second time and not Marionette runs successfully. I'm not sure why its failing first and why it's started a 2nd time. The code above doesn't indicate that. Also the profile manager dialog should never be seen given that geckodriver doesn't make use of the |
@whimboo I am adding the new user profile selenium creates into profiles.ini, and I launch my desktop app manually after running the code above. Reason for updating profiles.ini is that my desktop app follows the user's default browser settings and user profile to redirect user to the login url screen. However, I receive the "Firefox - Choose User Profile" upon launching my app |
If you are launching Firefox manually with more than a profile available then you will indeed get the profile manager shown. There you will have to select the newly created / added profile. Is this window empty? If yes, then check the updated Further you most likely need the |
@whimboo Should I be removing the I understand Selenium creates a user profile (for example, Here is my profiles.ini (I make sure to delete Profile1 after running the code above every time so there are no duplicate profiles):
Is this a possible approach to ensure my login url is launched in the existing firefox instance that I start with selenium webdriver? Update: I removed -no-remote manually from the command and ran it to launch the Firefox browser like so
Here is the browser options (that I believe is set by selenium webdriver by default) since it's not in the code: |
It's still not clear to me how the order of steps are. You said that you are using the script and geckodriver to create a Firefox profile that you are using manually afterward. But now it's about connecting to an existing Firefox instance. Note that you cannot replace the underying profile while Firefox is running. Also I do not know how well Selenium actually supports this use case. Usually automation or tests create their own Firefox instance. |
No further feedback from reporter. As such I'm going to close this issue. |
System
Testcase
Stacktrace
1714986617679 geckodriver INFO Listening on 127.0.0.1:64390
1714986620687 mozrunner::runner INFO Running command: "C:\Program Files\Mozilla Firefox\firefox.exe" "--marionette" "-profile" "C:\Users\ngm1admin\AppData\Roaming\Mozilla\Firefox\Profiles\4qeq4qz4.Default" "-no-remote"
Read port: 55353
console.warn: services.settings: Ignoring preference override of remote settings server
console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment
1714986621150 Marionette INFO Marionette enabled
1714986621195 Marionette INFO Listening on port 64403
Read port: 64403
1714986622852 RemoteAgent WARN TLS certificate errors will be ignored for this session
JavaScript warning: resource://gre/modules/Troubleshoot.sys.mjs, line 759: WebGL context was lost.
JavaScript warning: resource://gre/modules/Troubleshoot.sys.mjs, line 726: WebGL warning: : AllowWebgl2:false restricts context creation on this system.
JavaScript warning: resource://gre/modules/Troubleshoot.sys.mjs, line 726: Failed to create WebGL context: WebGL creation failed:
JavaScript error: resource://gre/modules/PromiseWorker.sys.mjs, line 75: Error: Could not get children of `C:\Users\ngm1admin\AppData\Roaming\Mozilla\Firefox\Profiles\4qeq4qz4.Default\thumbnails': directory does not exist (NS_ERROR_FILE_NOT_FOUNJavaScript warning: resource://gre/modules/Troubleshoot.sys.mjs, line 759: WebGL context was lost.
JavaScript warning: resource://gre/modules/Troubleshoot.sys.mjs, line 726: WebGL warning: : AllowWebgl2:false restricts context creation on this system.
JavaScript warning: resource://gre/modules/Troubleshoot.sys.mjs, line 726: Failed to create WebGL context: WebGL creation failed:
1714986833087 Marionette INFO Stopped listening on port 64403
JavaScript error: chrome://remote/content/marionette/cert.sys.mjs, line 47: NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsICertOverrideService.setDisableAllSecurityChecksAndLetAttackersInterceptMyData]
1714988730424 geckodriver INFO Listening on 127.0.0.1:64722
1714988733431 geckodriver::browser DEBUG Backing up prefs to "C:\Users\ngm1admin\AppData\Roaming\Mozilla\Firefox\Profiles\4qeq4qz4.Default\user.geckodriver_backup_2"
1714988733446 mozrunner::runner INFO Running command: "C:\Program Files\Mozilla Firefox\firefox.exe" "--marionette" "-profile" "C:\Users\ngm1admin\AppData\Roaming\Mozilla\Firefox\Profiles\4qeq4qz4.Default" "-no-remote"
1714988733631 geckodriver::marionette DEBUG Waiting 60s to connect to browser on 127.0.0.1
Read port: 64477
console.warn: services.settings: Ignoring preference override of remote settings server
console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment
1714988733994 Marionette INFO Marionette enabled
1714988733995 RemoteAgent DEBUG Setting recommended pref browser.tabs.warnOnClose to false
1714988733995 RemoteAgent DEBUG Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false
1714988733995 RemoteAgent DEBUG Setting recommended pref dom.max_chrome_script_run_time to 0
1714988733995 RemoteAgent DEBUG Setting recommended pref network.http.prompt-temp-redirect to false
1714988733995 RemoteAgent DEBUG Setting recommended pref privacy.trackingprotection.enabled to false
1714988733997 Marionette TRACE Received observer notification final-ui-startup
1714988734011 Marionette INFO Listening on port 64735
1714988734011 Marionette DEBUG Marionette is listening
1714988734618 Marionette TRACE Received observer notification browser-idle-startup-tasks-finished
1714988735666 geckodriver::marionette TRACE Retrying in 100ms
Read port: 64735
1714988735773 Marionette DEBUG Accepted connection 0 from 127.0.0.1:64741
1714988735774 geckodriver::marionette DEBUG Connection to Marionette established on 127.0.0.1:64735.
1714988735779 Marionette DEBUG 0 -> [0,1,"WebDriver:NewSession",{"acceptInsecureCerts":true,"browserName":"firefox"}]
1714988735781 RemoteAgent WARN TLS certificate errors will be ignored for this session
1714988735781 Marionette DEBUG Waiting for initial application window
1714988735784 RemoteAgent TRACE [3] ProgressListener Start: expectNavigation=false resolveWhenStarted=false unloadTimeout=5000 waitForExplicitStart=false
1714988735784 RemoteAgent TRACE [3] ProgressListener Setting unload timer (5000ms)
1714988735784 RemoteAgent TRACE [3] Document already finished loading: about:blank
1714988735784 RemoteAgent TRACE [3] ProgressListener Stop: has error=false
1714988735789 Marionette DEBUG 0 <- [1,1,null,{"sessionId":"8d6e0192-7663-42a1-b9ac-8a331231523e","capabilities":{"browserName":"firefox","browserVersion":"125.0.3","platformName":"windows","acceptInsecureCerts":true,"pageLoadStrategy":"normal","setWindowRect":true,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"strictFileInteractability":false,"unhandledPromptBehavior":"dismiss and notify","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0","moz:accessibilityChecks":false,"moz:buildID":"20240425211020","moz:headless":false,"moz:platformVersion":"10.0","moz:processID":12992,"moz:profile":"C:\Users\ngm1admin\AppData\Roaming\Mozilla\Firefox\Profiles\4qeq4qz4.Default","moz:shutdownTimeout":60000,"moz:webdriverClick":true,"moz:windowless":false,"proxy":{}}}]
1714988735793 webdriver::server DEBUG <- 200 OK {"value":{"sessionId":"8d6e0192-7663-42a1-b9ac-8a331231523e","capabilities":{"acceptInsecureCerts":true,"browserNam ... avior":"dismiss and notify","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0"}}}
Receiving this error:
Firefox is already running, but is not responding. The old Firefox process must be closed to open a new window.
My desktop app redirects user to a login screen on Firefox, and I want to automate it using Selenium. My current workflow:
The text was updated successfully, but these errors were encountered: