We have Selenium-C# automation tests running an internal web application that requires an Outh-2 Bearer token. When I run the tests, set of temp files named scope_dir are created. These files get deleted automatically for some tests. But at some time during the test execution, they just remain without being deleted. After, this point, I receive a 500 error response.
I have tried the following:
Chromedriver not deleting scoped* dir in temp folder after test is complete
https://bugs.chromium.org/p/chromedriver/issues/detail?id=644
https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/303
I drilled down into that scope_dir folder and found the following error:
[0111/171553.822:INFO:CONSOLE(21)] "BSSO Telemetry: >>{"result":"Error","error":"NoExtension","type":"ChromeSsoTelemetry","data":{},"traces":["BrowserSSO Initialized","Creating ChromeBrowserCore provider","Sending message for method CreateProviderAsync","Received message for method CreateProviderAsync","Error: ChromeBrowserCore error NoExtension: Extension is not installed."]}", source: https://aadcdn.msauth.net/ests/2.1.8438.15/content/cdnbundles/oldbssointerrupt_core.min_lg-ochofcwm0-pkfjghldq2.js (21) [0111/171553.878:INFO:CONSOLE(21)] "BSSO Telemetry: {"result":"Error","error":"NoExtension","type":"ChromeSsoTelemetry","data":{},"traces":["BrowserSSO Initialized","Creating ChromeBrowserCore provider","Sending message for method CreateProviderAsync","Received message for method CreateProviderAsync","Error: ChromeBrowserCore error NoExtension: Extension is not installed."]}", source: https://aadcdn.msftauth.net/ests/2.1.8438.15/content/cdnbundles/oldbssointerrupt_core.min_lg-ochofcwm0-pkfjghldq2.js (21) [0111/171553.897:INFO:CONSOLE(21)] "BSSO Telemetry: {"result":"Error","error":"NoExtension","type":"ChromeSsoTelemetry","data":{},"traces":["BrowserSSO Initialized","Creating ChromeBrowserCore provider","Sending message for method CreateProviderAsync","Received message for method CreateProviderAsync","Error: ChromeBrowserCore error NoExtension: Extension is not installed."]}", [0111/171605.329:INFO:CONSOLE(92679)] "Could not find HammerJS. Certain Angular Material components may not work correctly.", source: https://myWebsite.europe.cloudapp.azure.com/vendor.js (92679) [0111/171605.409:INFO:CONSOLE(636)] "Token: null", source:
One of the solution from above links was to delete the scope_dir folders before every test execution, when a test-suite is run. But, the problem is we run four test threads in parallel. Hence, deleting the scope_dir folder stomps on a running chromedriver.exe process causing issues.
Tests are run in Parallel using:
Google Chrome Version 71.0.3578.98
ChromeDriver version 2.45.6
Running tests through Specflow. Initially, our website was hosted in Azure App services, and test execution was smooth. But, for the past couple of weeks, it is being hosted in Service fabric. After this, we were experiencing this problem(However, not sure if this is the problem).