getgauge / gauge-visualstudio

Visual Studio plugin for Gauge
10 stars 9 forks source link

Unable to debug test in VS 2017 community #261

Closed podupu closed 4 years ago

podupu commented 5 years ago

Error : System.Runtime.Serialization.SerializationException: There was an error deserializing the object of type Gauge.VisualStudio.TestAdapter.TestExecutionEvent. Encountered invalid character ' '. ---> System.FormatException: Encountered invalid character ' '. at System.Runtime.Serialization.Json.XmlJsonReader.ComputeQuotedTextLengthUntilEndQuote(Byte[] buffer, Int32 offset, Int32 offsetMax, Boolean& escaped) at System.Runtime.Serialization.Json.XmlJsonReader.ReadQuotedText(Boolean moveToText) at System.Runtime.Serialization.Json.XmlJsonReader.Read() at System.Xml.XmlBaseReader.ReadElementContentAsString() at System.Runtime.Serialization.XmlReaderDelegator.ReadElementContentAsString() at ReadTestExecutionEventFromJson(XmlReaderDelegator , XmlObjectSerializerReadContextComplexJson , XmlDictionaryString , XmlDictionaryString[] ) at System.Runtime.Serialization.Json.JsonClassDataContract.ReadJsonValueCore(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context) at System.Runtime.Serialization.Json.JsonDataContract.ReadJsonValue(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context) at System.Runtime.Serialization.Json.XmlObjectSerializerReadContextComplexJson.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader) at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract) at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns) at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName) at System.Runtime.Serialization.XmlObjectSerializer.InternalReadObject(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) --- End of inner exception stack trace --- at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(XmlDictionaryReader reader) at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(Stream stream) at Gauge.VisualStudio.TestAdapter.GaugeRunner.OnOutputDataReceived(Object sender, DataReceivedEventArgs args)

gauge -v Gauge version: 1.0.5 Commit Hash: 562f036

Plugins

csharp (0.10.5) html-report (4.0.8) screenshot (0.0.1) xml-report (0.2.1)

sriv commented 5 years ago

hi @PODHUPU - will you be able to share output from your project if it isn't sensitive?

If you can, please run gauge run specs --machine-readable from your command prompt in the project where you see this error, and post the output.

In case you aren't able to share the output, please inspect the output and see which line is not a valid JSON.

podupu commented 5 years ago

gauge run Specs/UrlCheck.spec --machine-readable {"type":"out","message":"Building project: <>\source\repos\csharp-selenium\project.csproj"} {"type":"out","message":"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe <>\source\repos\csharp-selenium\CarHis"} {"type":"out","message":"toryTestAutomation.csproj /t:Build /m /nodeReuse:False /v:q /p:RestorePackages=\"False\" /p:OutputPath=\"<>\source\repos\csharp-selenium\gauge_bin\" /p:Platform=\"Any CPU\" /p:Configuration=\"Debug\" /logger:Fake.MsBuildLogger+ErrorLogger,\"gauge\plugins\csharp\0.10.5\bin\FakeLib.dll\"\r"} {"type":"out","message":""} {"type":"out","message":"Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework\r"} {"type":"out","message":"Copyright (C) Microsoft Corporation. All rights reserved.\r"} {"type":"out","message":"Copyright (C) Microsoft Corporation. All rights reserved.\r"} {"type":"out","message":"\r"} {"type":"out","message":""} {"type":"suiteStart"} {"type":"out","message":"Starting ChromeDriver 76.0.3809.68 (420c9498db8ce8fcd190a954d51297672c1515d5-refs/branch-heads/3809@{#864}) on port 59487\r"} {"type":"out","message":"Only local connections are allowed.\r"} {"type":"out","message":"Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.\r"} {"type":"out","message":""}

luciferankon commented 5 years ago

@PODHUPU Is that the whole log you get by running gauge run specs --machine-readable?

podupu commented 5 years ago

No after that it starts running the spec file

luciferankon commented 5 years ago

@PODHUPU Could you please provide the whole log? If it's not sensitive... If you're not able to share that then check if there is any line which is not a JSON.

nehashri commented 5 years ago

@PODHUPU Please look at the logs and see if any line is not a valid json line after it starts running the spec. If there are any such lines, can you please share a snippet so we can try fix this issue.

Apoorva-GA commented 4 years ago

@PODHUPU Any update on this?

nehashri commented 4 years ago

closing due to inactivity. Please feel free to reopen the issue with more information