Search code examples
c#seleniumselenium-chromedriverselenium-firefoxdriverrenderer

StdOut is spammed with 'C:\fakepath' warnings integer divides may be much slower, try using uints if possible using Selenium through C#


I am using Selenium Firefox Web Driver. It is working properly but when I worked command line with "dotnet run", some warning logs that I did not solve, arose on the command line. How can I solve this issue?

console warning logs

var options = new FirefoxOptions();
            options.AddArguments("--headless");
            IWebDriver driver = new FirefoxDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), options);
            var link = "ANY LINK";

            driver.Navigate().GoToUrl(link);
            driver.FindElement(By.ClassName("ANY CLASS NAME")).Click(); 
            driver.Dispose();

Here is some warnings because of broken image link

1578640820834   addons.webextension.screenshots@mozilla.org     WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1578640820834   addons.webextension.screenshots@mozilla.org     WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1578640820834   addons.webextension.screenshots@mozilla.org     WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1578640820834   addons.webextension.screenshots@mozilla.org     WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
WARN: compileToBinary(259):
C:\fakepath(337,18-133): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(343,62-116): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(360,75-84): warning X3556: integer divides may be much slower, try using uints if possible.
C:\fakepath(363,50-59): warning X3556: integer modulus may be much slower, try using uints if possible.
C:\fakepath(383,33-90): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(174,1-6): warning X4000: use of potentially uninitialized variable (dyn_index_vec4_float4)
C:\fakepath(289,25-29): error X4576: Input array signature parameter  cannot be indexed dynamically.

WARN: compileToBinary(259):
C:\fakepath(337,18-133): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(343,62-116): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(360,75-84): warning X3556: integer divides may be much slower, try using uints if possible.
C:\fakepath(363,50-59): warning X3556: integer modulus may be much slower, try using uints if possible.
C:\fakepath(383,33-90): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(174,1-6): warning X4000: use of potentially uninitialized variable (dyn_index_vec4_float4)
C:\fakepath(289,25-29): error X4576: Input array signature parameter  cannot be indexed dynamically.

WARN: compileToBinary(259):
C:\fakepath(360,75-84): warning X3556: integer divides may be much slower, try using uints if possible.
C:\fakepath(363,50-59): warning X3556: integer modulus may be much slower, try using uints if possible.
C:\fakepath(174,1-6): warning X4000: use of potentially uninitialized variable (dyn_index_vec4_float4)
C:\fakepath(225,1): warning X4000: use of potentially uninitialized variable (f_distance_aa)
C:\fakepath(262,1): warning X4000: use of potentially uninitialized variable (f_do_clip)

[Child 7840, Chrome_ChildThread] WARNING: pipe error: 109: file z:/task_1572401533/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[Ch1578640823372        Marionette      INFO    Listening on port 58853
1578640829566   Marionette      INFO    Stopped listening on port 58853
[Parent 18380, Gecko_IOThread] WARNING: pipe error: 109: file z:/task_1572401533/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[Child 23108, Chrome_ChildThread] WARNING: pipe error: 109: file z:/task_1572401533/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[GPU
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

Solution

  • These warning messages...

    WARN: compileToBinary(259):
    C:\fakepath(337,18-133): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
    C:\fakepath(343,62-116): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
    C:\fakepath(360,75-84): warning X3556: integer divides may be much slower, try using uints if possible.
    C:\fakepath(363,50-59): warning X3556: integer modulus may be much slower, try using uints if possible.
    C:\fakepath(383,33-90): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
    C:\fakepath(174,1-6): warning X4000: use of potentially uninitialized variable (dyn_index_vec4_float4)
    C:\fakepath(289,25-29): error X4576: Input array signature parameter  cannot be indexed dynamically.
    .
    WARN: compileToBinary(259):
    C:\fakepath(360,75-84): warning X3556: integer divides may be much slower, try using uints if possible.
    C:\fakepath(363,50-59): warning X3556: integer modulus may be much slower, try using uints if possible.
    C:\fakepath(174,1-6): warning X4000: use of potentially uninitialized variable (dyn_index_vec4_float4)
    C:\fakepath(225,1): warning X4000: use of potentially uninitialized variable (f_distance_aa)
    C:\fakepath(262,1): warning X4000: use of potentially uninitialized variable (f_do_clip)
    

    ...is the result of StdOut being spammed with C:\fakepath when Webrender is enabled.


    Analysis

    When Firefox is opened with WebRender enabled and if the stdout is captured thiese warning messeges were observed. These warning messages were the result of some shader change in WebRender in GPU -> ANGLE module.

    We have analyzed and discussed this issue at length in the following threads:

    Finally, this issue was solved through this merge / commit


    Solution

    Ensure that:

    • Upgrade JDK to recent levels JDK 8u222.
    • Upgrade Selenium to current levels Version 3.141.59.
    • Upgrade GeckoDriver to GeckoDriver v0.26.0 level.
    • GeckoDriver is present in the desired location.
    • GeckoDriver is having executable permission for non-root users.
    • Upgrade Firefox version to Firefox v70.0 levels.
    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • (WindowsOS only) Use CCleaner tool to wipe off all the OS chores before and after the execution of your Test Suite.
    • (LinuxOS only) Free Up and Release the Unused/Cached Memory in Ubuntu/Linux Mint before and after the execution of your Test Suite.
    • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
    • Take a System Reboot.
    • Execute your Test as a non-root user.
    • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.