SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.15k stars 8.1k forks source link

[🐛 Bug]: When Doing HTTP POST Request using Firefox version 101 got no status code and POST Request isn't executed #11795

Closed yksatria closed 1 year ago

yksatria commented 1 year ago

What happened?

Hi, i'm facing the issue that when i want to do sign in on apps using selenium WebDriver somehow when i clicked the button is not returning the status code which is causing the automation fail..

image but when i tested in manually it's working fine and no problem occur, and when i paused the automation using debug mode i try to re-call the request it's working fine..

i saw few times this happened because of the NS_BINDING_ABORTED, but not sure if that's the cause of problem..

and yes i've tried and read all about this error but no luck https://github.com/SeleniumHQ/selenium/issues/10840

How can we reproduce the issue?

package com.example.seleniumfirefox;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;

public class SeleniumFirefox {
    public static void main(String[] args) throws InterruptedException {
        System.setProperty("webdriver.gecko.driver", "C:\\Users\\yosafat.ksatria\\Downloads\\testing_selenium\\geckodriver.exe");

        FirefoxOptions options = new FirefoxOptions();
//      options.addArguments("start-maximized");
//      options.setLogLevel(FirefoxDriverLogLevel.TRACE);

        WebDriver webDriver = new FirefoxDriver(options);
        webDriver.manage().window().maximize();
        webDriver.manage().deleteAllCookies();

//      WebDriverWait wait = new WebDriverWait(webDriver, Duration.ofSeconds(15));
//      wait.until(driver -> "complete".equals(((JavascriptExecutor) driver)
//                      .executeScript("return document.readyState")));

        webDriver.get("https://seller-qa2-gcp.gdn-app.com/sign-in");
        Thread.sleep(5000);
        webDriver.findElement(By.id("email")).sendKeys("seller.usertwo@gdn-commerce.com"); //name locator for text box
        webDriver.findElement(By.id("password")).sendKeys("Password4321");
        Thread.sleep(6000);
//      WebElement btnLogin =
        webDriver.findElement(By.xpath("//*[@id=\"sign-in\"]")).click();
        Thread.sleep(60000);
//      btnLogin.click();
        webDriver.quit();
    }
}

Relevant log output

>SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
1679395089892   geckodriver INFO    Listening on 127.0.0.1:40007
1679395090325   mozrunner::runner   INFO    Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "--marionette" "--remote-debugging-port" "16013" "--remote-allow-hosts" "localhost" "--remote-allow-origins" "http://127.0.0.1:16013/,http://localhost:16013/,http://[::1]:16013/" "-no-remote" "-profile" "C:\\Users\\YOSAFA~1.KSA\\AppData\\Local\\Temp\\rust_mozprofileloIXN2"
1679395090684   Marionette  INFO    Marionette enabled
WebDriver BiDi listening on ws://localhost:16013
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at C:\\Users\\YOSAFA~1.KSA\\AppData\\Local\\Temp\\rust_mozprofileloIXN2\\search.json.mozlz4", (void 0)))
1679395092367   Marionette  INFO    Listening on port 63916
Read port: 63916
1679395092447   RemoteAgent WARN    TLS certificate errors will be ignored for this session
DevTools listening on ws://localhost:16013/devtools/browser/6c3ed90b-0c38-4df2-b5e0-904ce455bbc4
console.error: "Exception when calling onAvailable handler" "Connection closed, pending request to server0.conn0.windowGlobal4294967297/cssPropertiesActor10, type getCSSDatabase failed\n\nRequest stack:\nrequest@resource://devtools/shared/protocol/Front.js:292:14\ngenerateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:46:19\ninitialize@resource://devtools/client/fronts/css-properties.js:58:28\nmanage@resource://devtools/shared/protocol/Front.js:146:19\ngetFront@resource://devtools/shared/protocol/types.js:559:18\ngetFront@resource://devtools/client/fronts/targets/target-mixin.js:332:15\n_getCssProperties@resource://devtools/client/inspector/inspector.js:571:45\n_onTargetAvailable@resource://devtools/client/inspector/inspector.js:275:12\n" (new Error("Connection closed, pending request to server0.conn0.windowGlobal4294967297/cssPropertiesActor10, type getCSSDatabase failed\n\nRequest stack:\nrequest@resource://devtools/shared/protocol/Front.js:292:14\ngenerateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:46:19\ninitialize@resource://devtools/client/fronts/css-properties.js:58:28\nmanage@resource://devtools/shared/protocol/Front.js:146:19\ngetFront@resource://devtools/shared/protocol/types.js:559:18\ngetFront@resource://devtools/client/fronts/targets/target-mixin.js:332:15\n_getCssProperties@resource://devtools/client/inspector/inspector.js:571:45\n_onTargetAvailable@resource://devtools/client/inspector/inspector.js:275:12\n", "resource://devtools/shared/protocol/Front.js", 106))
console.warn: "Error while destroying front:" "cssProperties" (new Error("Connection closed, pending request to server0.conn0.windowGlobal4294967297/cssPropertiesActor10, type getCSSDatabase failed\n\nRequest stack:\nrequest@resource://devtools/shared/protocol/Front.js:292:14\ngenerateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:46:19\ninitialize@resource://devtools/client/fronts/css-properties.js:58:28\nmanage@resource://devtools/shared/protocol/Front.js:146:19\ngetFront@resource://devtools/shared/protocol/types.js:559:18\ngetFront@resource://devtools/client/fronts/targets/target-mixin.js:332:15\n_getCssProperties@resource://devtools/client/inspector/inspector.js:571:45\n_onTargetAvailable@resource://devtools/client/inspector/inspector.js:275:12\n", "resource://devtools/shared/protocol/Front.js", 106))
console.warn: "Error while destroying front:" "accessibility" (new Error("Connection closed, pending request to server0.conn0.windowGlobal4294967297/accessibilityActor15, type getWalker failed\n\nRequest stack:\nrequest@resource://devtools/shared/protocol/Front.js:292:14\ngenerateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:46:19\ninitialize@resource://devtools/client/fronts/accessibility.js:536:46\nmanage@resource://devtools/shared/protocol/Front.js:146:19\ngetFront@resource://devtools/shared/protocol/types.js:559:18\ngetFront@resource://devtools/client/fronts/targets/target-mixin.js:332:15\n_getAccessibilityFront@resource://devtools/client/inspector/inspector.js:575:49\n_onTargetAvailable@resource://devtools/client/inspector/inspector.js:276:12\n", "resource://devtools/shared/protocol/Front.js", 106))
console.error: (new TypeError("this._cssProperties is undefined", "resource://devtools/client/inspector/inspector.js", 534))
JavaScript error: , line 0: uncaught exception: Object
console.error: "Unable to find target with innerWindowId:4294967303"
console.warn: LoginRecipes: "getRecipes: falling back to a synchronous message for:" "https://seller-qa2-gcp.gdn-app.com"
console.warn: LoginRecipes: "getRecipes: falling back to a synchronous message for:" "https://seller-qa2-gcp.gdn-app.com"
JavaScript error: resource://gre/modules/LoginManagerParent.jsm, line 136: TypeError: gRecipeManager is null
JavaScript error: , line 0: uncaught exception: Object
console.error: "Unable to find target with innerWindowId:4294967306"
console.error: "Unable to find target with innerWindowId:4294967306"
console.error: "Unable to find target with innerWindowId:4294967306"
console.error: "Unable to find target with innerWindowId:4294967306"
console.error: "Unable to find target with innerWindowId:4294967306"

Process finished with exit code 130

Operating System

Windows 11

Selenium version

Java 4.8.1

What are the browser(s) and version(s) where you see this issue?

Firefox 101.0

What are the browser driver(s) and version(s) where you see this issue?

geckodriver-v0.31.0-win64

Are you using Selenium Grid?

-

github-actions[bot] commented 1 year ago

@yksatria, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

diemol commented 1 year ago

What happens when you try with Chrome and the most recent version of Firefox?

yksatria commented 1 year ago

trying on the latest version of Chrome is working fine and no problem but on the Firefox version from 101 to 110 still happening

diemol commented 1 year ago

Are you using the latest GeckoDriver and still happens?

yksatria commented 1 year ago

i already did, and this is the latest log (different from previous version of geckodriver) GeckoDriver version: 0.32.2 Firefox version: 111.0.1

Log (Click to expand) SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 1679541895698 geckodriver INFO Listening on 127.0.0.1:44262 1679541896273 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "--marionette" "--remote-debugging-port" "28654" "--remote ... st:28654/,http://[::1]:28654/" "-no-remote" "-profile" "C:\\Users\\YOSAFA~1.KSA\\AppData\\Local\\Temp\\rust_mozprofile0PJp2O" 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 1679541896652 Marionette INFO Marionette enabled Dynamically enable window occlusion 0 1679541896661 Marionette INFO Listening on port 50033 Read port: 50033 WebDriver BiDi listening on ws://127.0.0.1:28654 1679541896798 RemoteAgent WARN TLS certificate errors will be ignored for this session console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at C:\\Users\\YOSAFA~1.KSA\\AppData\\Local\\Temp\\rust_mozprofile0PJp2O\\search.json.mozlz4", (void 0))) DevTools listening on ws://127.0.0.1:28654/devtools/browser/91dad17c-3ad0-4e21-8c45-50eb8b61b6da JavaScript error: https://seller-qa2-gcp.gdn-app.com/frontend/main/1.82.0-16/static/js/vendor.js, line 199: Error: https://accounts.google.com/gsi/client JavaScript error: , line 0: uncaught exception: Object console.warn: LoginRecipes: "Falling back to a synchronous message for: https://seller-qa2-gcp.gdn-app.com." console.warn: LoginRecipes: "Falling back to a synchronous message for: https://seller-qa2-gcp.gdn-app.com." JavaScript error: , line 0: uncaught exception: Object 1679541911355 RemoteAgent INFO Perform WebSocket upgrade for incoming connection from 127.0.0.1:50096 1679541911358 CDP WARN Invalid browser preferences for CDP. Set "fission.webContentIsolationStrategy"to 0 and "fission.bfcacheInParent" to false before Firefox starts. 1679541911443 Marionette INFO Stopped listening on port 50033 Dynamically enable window occlusion 1 WARNING: A blocker encountered an error while we were waiting. Blocker: Waiting for ping task Phase: TelemetryController: Waiting for pending ping activity State: (none) WARNING: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange" WARNING: addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:727:15 addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:523:26 addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:458:15 setupShutdown@resource://gre/modules/osfile/osfile_async_front.jsm:1548:28 @resource://gre/modules/osfile/osfile_async_front.jsm:1568:16 @resource://gre/modules/osfile.jsm:12:30 @resource://gre/modules/TelemetryStorage.sys.mjs:10:28 _checkPendingPings@resource://gre/modules/TelemetrySend.sys.mjs:863:17 setup@resource://gre/modules/TelemetrySend.sys.mjs:803:18 setup@resource://gre/modules/TelemetrySend.sys.mjs:241:30 setupTelemetry/this._delayedInitTask<@resource://gre/modules/TelemetryControllerParent.sys.mjs:828:36 observe@resource://gre/modules/AsyncShutdown.sys.mjs:576:16 console.error: "TelemetryScheduler.shutdown - Already shut down" WARNING: A blocker encountered an error while we were waiting. Blocker: Waiting for ping task Phase: TelemetryController: Waiting for pending ping activity State: (none) WARNING: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange" WARNING: addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:727:15 addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:523:26 addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:458:15 setupShutdown@resource://gre/modules/osfile/osfile_async_front.jsm:1548:28 @resource://gre/modules/osfile/osfile_async_front.jsm:1568:16 @resource://gre/modules/osfile.jsm:12:30 @resource://gre/modules/TelemetryStorage.sys.mjs:10:28 _checkPendingPings@resource://gre/modules/TelemetrySend.sys.mjs:863:17 setup@resource://gre/modules/TelemetrySend.sys.mjs:803:18 setup@resource://gre/modules/TelemetrySend.sys.mjs:241:30 setupTelemetry/this._delayedInitTask<@resource://gre/modules/TelemetryControllerParent.sys.mjs:828:36 observe@resource://gre/modules/AsyncShutdown.sys.mjs:576:16 WARNING: A blocker encountered an error while we were waiting. Blocker: Waiting for ping task Phase: TelemetryController: Waiting for pending ping activity State: (none) WARNING: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange" WARNING: addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:727:15 addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:523:26 addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:458:15 setupShutdown@resource://gre/modules/osfile/osfile_async_front.jsm:1548:28 @resource://gre/modules/osfile/osfile_async_front.jsm:1568:16 @resource://gre/modules/osfile.jsm:12:30 @resource://gre/modules/TelemetryStorage.sys.mjs:10:28 _checkPendingPings@resource://gre/modules/TelemetrySend.sys.mjs:863:17 setup@resource://gre/modules/TelemetrySend.sys.mjs:803:18 setup@resource://gre/modules/TelemetrySend.sys.mjs:241:30 setupTelemetry/this._delayedInitTask<@resource://gre/modules/TelemetryControllerParent.sys.mjs:828:36 observe@resource://gre/modules/AsyncShutdown.sys.mjs:576:16 WARNING: A blocker encountered an error while we were waiting. Blocker: TelemetryController: shutting down Phase: profile-before-change-telemetry State: Error getting state: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange" at addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:727:15 addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:523:26 addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:458:15 setupShutdown@resource://gre/modules/osfile/osfile_async_front.jsm:1548:28 @resource://gre/modules/osfile/osfile_async_front.jsm:1568:16 @resource://gre/modules/osfile.jsm:12:30 @resource://gre/modules/TelemetryStorage.sys.mjs:10:28 _checkPendingPings@resource://gre/modules/TelemetrySend.sys.mjs:863:17 setup@resource://gre/modules/TelemetrySend.sys.mjs:803:18 setup@resource://gre/modules/TelemetrySend.sys.mjs:241:30 setupTelemetry/this._delayedInitTask<@resource://gre/modules/TelemetryControllerParent.sys.mjs:828:36 observe@resource://gre/modules/AsyncShutdown.sys.mjs:576:16 WARNING: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange" WARNING: addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:727:15 addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:523:26 addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:458:15 setupShutdown@resource://gre/modules/osfile/osfile_async_front.jsm:1548:28 @resource://gre/modules/osfile/osfile_async_front.jsm:1568:16 @resource://gre/modules/osfile.jsm:12:30 @resource://gre/modules/TelemetryStorage.sys.mjs:10:28 _checkPendingPings@resource://gre/modules/TelemetrySend.sys.mjs:863:17 setup@resource://gre/modules/TelemetrySend.sys.mjs:803:18 setup@resource://gre/modules/TelemetrySend.sys.mjs:241:30 setupTelemetry/this._delayedInitTask<@resource://gre/modules/TelemetryControllerParent.sys.mjs:828:36 observe@resource://gre/modules/AsyncShutdown.sys.mjs:576:16 JavaScript error: resource://gre/modules/AsyncShutdown.sys.mjs, line 727: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange" JavaScript error: resource://gre/modules/AsyncShutdown.sys.mjs, line 727: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange" JavaScript error: resource://gre/modules/AsyncShutdown.sys.mjs, line 727: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange" JavaScript error: resource://gre/modules/AsyncShutdown.sys.mjs, line 727: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange" JavaScript error: resource://gre/modules/AsyncShutdown.sys.mjs, line 727: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange" JavaScript error: resource://gre/modules/AsyncShutdown.sys.mjs, line 727: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange"
yksatria commented 1 year ago

Update: Turns out this because of the NS_BINDING_ABORTED on request POST

image

but when i tested it manually it works fine and no issue happen

github-actions[bot] commented 9 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.