Skip to content
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

NullReferenceException exception thrown when getting browser logs #7323

Closed
richja opened this issue Jun 24, 2019 · 4 comments
Closed

NullReferenceException exception thrown when getting browser logs #7323

richja opened this issue Jun 24, 2019 · 4 comments

Comments

@richja
Copy link

richja commented Jun 24, 2019

🐛 Bug Report

When trying to get AvailableLogTypes from logs. the NullReferenceException is thrown.

Same happens on Chrome and Firefox.
Basically same issue as reported while ago #5842.

To Reproduce

Try to get log types driver.Manage().Logs.AvailableLogTypes
or browser logs directly driver.Manage().GetLog(LogType.Browser)

Expected behavior

Do not throw an exception.

Test script or set of commands reproducing this issue

ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.SetLoggingPreference(LogType.Browser, LogLevel.All);
_driver = new ChromeDriver(chromeOptions);
_driver.Url = "https://github.com";
var logs = _driver.Manage().Logs;
var logTypes = logs.AvailableLogTypes; //NullReferenceException thrown here

Environment

OS: Windows 10
Browser: Chrome, Firefox
Browser version: Chrome 75.0.3770.100, Firefox 67.0.2
Browser Driver version: ChromeDriver 75.0.3770.90, GeckoDriver 0.24
Language Bindings version: C# 3.141

@jimevans
Copy link
Member

Duplicate of #5842. Fixed in 02203c8 (to be released in the forthcoming 4.0alpha02, release date TBD, no further information available on release time frame).

@alex-jitbit
Copy link

driver.Manage().Logs.GetLog(LogType.Browser) also throws NullReference exception, I guess it is the same. Any news about the release date?

@mmerrell
Copy link
Contributor

mmerrell commented Jul 14, 2019 via email

@jimevans
Copy link
Member

Having said that, 4.0-alpha2 was released last week, and you can find it via NuGet or at http://selenium-release.storage.googleapis.com

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants