Error converting value "verbose" to type 'PuppeteerSharp.ConsoleType'. Path 'params.entry.level'. ---> System.ArgumentException: Requested value 'verbose' was not found.
See original GitHub issueBefore you file a bug, have you:
- Tried upgrading to newest version of PuppeteerSharp, to see if your issue has already been resolved and released?
- Checked existing open and closed issues, to see if the issue has already been reported?
- Tried reproducing your problem in a new isolated project?
- Considered if this is a general question and not a bug?. For general questions please use StackOverflow.
Description
When connecting to a website using GoToAsync(), the code doesn’t go through because it throws this exception:
Unhandled Exception: Newtonsoft.Json.JsonSerializationException: Error converting value "verbose" to type 'PuppeteerSharp.ConsoleType'. Path 'params.entry.level'. ---> System.ArgumentException: Requested value 'verbose' was not found.
at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult)
at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObject[T]()
at PuppeteerSharp.Page.Client_MessageReceived(Object sender, MessageEventArgs e)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
Complete minimal example reproducing the issue
This will take too much time for me. The actual solution would be to add “Verbose” in the ConsoleType Enum. Sadly, I don’t even know what/how to do it myself, but that could solve the issue.
Expected behavior:
The code will keep going
Actual behavior:
It crashes
Versions
-
Which version of PuppeteerSharp are you using? 1.4.0
-
Which .NET runtime and version are you targeting? E.g. .NET framework 4.6.1 or .NET Core 2.0. netcoreapp2.1
Additional Information
I’m trying with home router login pages. The error seems to happen when a console message wants/needs to be output with “verbose” level, which makes PuppeteerSharp crash.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Error converting value "verbose" to type 'PuppeteerSharp. ...
Error converting value "verbose" to type 'PuppeteerSharp.ConsoleType'. Path 'params.entry.level'. ---> System.ArgumentException: Requested value 'verbose' ...
Read more >Requested value '1px' was not found. PDF Sharp. Is this a ...
I need some help interrupting this exception. Exception thrown: 'System.ArgumentException' in mscorlib.dll Additional information: Requested ...
Read more >Use PuppeteerSharp.WaitTask.Dispose in Puppeteer ...
Use the Dispose method in PuppeteerSharp package in your next Puppeteer-sharp project ... If no element matches the selector, the return value resolve...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Cool, we’ll fix it.
@dredav we have only the Workers feature left (https://github.com/kblok/puppeteer-sharp/projects/20) I soon as we finish that feature we’ll release 1.5. Could be this weekend or early next week.