gauge icon indicating copy to clipboard operation
gauge copied to clipboard

Error when executing service method 'StartExecution'. System.InvalidOperationException: Cannot locate Gauge.CSharp.Lib.ScreenshotFilesCollector in Gauge.CSharp.Lib ---> System.InvalidOperationException: Sequence contains no matching element

Open pratapkuchipudi opened this issue 4 years ago • 12 comments

I am trying to setup gauge for my automation

To Reproduce

  1. Followed the steps mentioned in the documents
  2. First installed vs code
  3. Installed guage - for windows -vscode - c#
  4. then opened the vs code
  5. ctrl + shift +p - select create new guage project
  6. Then done all necessary things
  7. A new project has created with in a framework and with a example .spec file [ example.spec]
  8. Opened it - clicked on Run Scenario
  9. Getting the below error
16-12-2020 20:03:12.832 [Gauge] [ERROR] Unable to connect to plugin Html Report 4.0.12. rpc error: code = Unavailable desc = transport is closing
please see the attached log file
[gauge.log](https://github.com/getgauge/gauge/files/5703412/gauge.log)

pratapkuchipudi avatar Dec 16 '20 14:12 pratapkuchipudi

gauge.log

pratapkuchipudi avatar Dec 16 '20 14:12 pratapkuchipudi

gauge -v Gauge version: 1.1.6 Commit Hash: 3af456f

Plugins

csharp (0.10.6) dotnet (0.3.0) html-report (4.0.12) js (2.3.15) screenshot (0.0.1)

pratapkuchipudi avatar Dec 16 '20 16:12 pratapkuchipudi

From the logs

[CRITICAL] open C:\Users\Pratap\AppData\Roaming\gauge\plugins\html-report\4.0.12\themes\default\views\partials.tmpl: The system cannot find the file specified.

It looks like the HTML report plugin was not downloaded correctly. Please run the following commands

gauge uninstall html-report
gauge install html-report

zabil avatar Dec 16 '20 16:12 zabil

Thank you... done the same now encountering with other error

Executing endpoint 'gRPC - /gauge.messages.Runner/InitializeSuiteDataStore' info : Grpc.AspNetCore.Server.ServerCallHandler[7] Error status code 'Unimplemented' raised. Grpc.Core.RpcException: Status(StatusCode="Unimplemented", Detail="") at Gauge.Messages.Runner.RunnerBase.InitializeSuiteDataStore(SuiteDataStoreInitRequest request, ServerCallContext context) at Grpc.Shared.Server.UnaryServerMethodInvoker3.Invoke(HttpContext httpContext, ServerCallContext serverCallContext, TRequest request) --- End of stack trace from previous location where exception was thrown --- at Grpc.AspNetCore.Server.Internal.CallHandlers.UnaryServerCallHandler3.HandleCallAsyncCore(HttpContext httpContext, HttpContextServerCallContext serverCallContext) at Grpc.AspNetCore.Server.Internal.CallHandlers.ServerCallHandlerBase3.<HandleCallAsync>g__AwaitHandleCall|8_0(HttpContextServerCallContext serverCallContext, Method2 method, Task handleCall) info : Microsoft.AspNetCore.Routing.EndpointMiddleware[1] Executed endpoint 'gRPC - /gauge.messages.Runner/InitializeSuiteDataStore' info : Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished in 19.0317ms 200 application/grpc failed to initialize suite datastore. Error: Unable to connect to plugin Html Report 4.0.12. rpc error: code = Unavailable desc = transport is closing

Failed to kill plugin Html Report 4.0.12. TerminateProcess: Access is denied.

info : Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/2 POST http://127.0.0.1:60900/gauge.messages.Runner/Kill application/grpc info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0] Executing endpoint 'gRPC - /gauge.messages.Runner/Kill' info : Microsoft.Hosting.Lifetime[0] Application is shutting down... info : Microsoft.AspNetCore.Routing.EndpointMiddleware[1] Executed endpoint 'gRPC - /gauge.messages.Runner/Kill' info: Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished in 2.5562ms 200 application/grpc Error occurred while waiting for plugin process to finish. Error : exit status 1 Specifications: 0 executed 0 passed 0 failed 0 skipped Scenarios: 0 executed 0 passed 0 failed 0 skipped

Total time taken: 37ms Success: Tests passed.

pratapkuchipudi avatar Dec 17 '20 07:12 pratapkuchipudi

Can you please share the contents of your manifest.json file? You can find it in your project folder.

zabil avatar Dec 17 '20 11:12 zabil

manifest.json

{ "Language": "dotnet", "Plugins": [ "html-report" ] }

pratapkuchipudi avatar Dec 17 '20 12:12 pratapkuchipudi

Hi Guys, any suggestions ...

pratapkuchipudi avatar Dec 29 '20 15:12 pratapkuchipudi

log.txt

pratapkuchipudi avatar Dec 29 '20 15:12 pratapkuchipudi

Still facing the same issue...anyone can help us ASAP

: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/2 POST http://127.0.0.1:55689/gauge.messages.Runner/StartExecution application/grpc info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0] Executing endpoint 'gRPC - /gauge.messages.Runner/StartExecution' fail : Grpc.AspNetCore.Server.ServerCallHandler[6] Error when executing service method 'StartExecution'. System.InvalidOperationException: Cannot locate Gauge.CSharp.Lib.ScreenshotFilesCollector in Gauge.CSharp.Lib ---> System.InvalidOperationException: Sequence contains no matching element at System.Linq.ThrowHelper.ThrowNoMatchException() at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate) at Gauge.Dotnet.AssemblyLoader.GetLibType(LibType type) in /home/runner/work/gauge-dotnet/gauge-dotnet/src/AssemblyLoader.cs:line 67 --- End of inner exception stack trace --- at Gauge.Dotnet.AssemblyLoader.GetLibType(LibType type) in /home/runner/work/gauge-dotnet/gauge-dotnet/src/AssemblyLoader.cs:line 71 at Gauge.Dotnet.ExecutionOrchestrator.GetAllPendingScreenshotFiles() in /home/runner/work/gauge-dotnet/gauge-dotnet/src/ExecutionOrchestrator.cs:line 76 at Gauge.Dotnet.ExecutionOrchestrator.BuildResult(Stopwatch stopwatch, ExecutionResult executionResult) in /home/runner/work/gauge-dotnet/gauge-dotnet/src/ExecutionOrchestrator.cs:line 99 at Gauge.Dotnet.ExecutionOrchestrator.ExecuteHooks(String hookType, HooksStrategy strategy, IList1 applicableTags, ExecutionInfo info) in /home/runner/work/gauge-dotnet/gauge-dotnet/src/ExecutionOrchestrator.cs:line 87 at Gauge.Dotnet.Processors.HookExecutionProcessor.ExecuteHooks(ExecutionInfo info) in /home/runner/work/gauge-dotnet/gauge-dotnet/src/Processors/HookExecutionProcessor.cs:line 39 at Gauge.Dotnet.Processors.ExecutionStartingProcessor.Process(ExecutionStartingRequest request) in /home/runner/work/gauge-dotnet/gauge-dotnet/src/Processors/ExecutionStartingProcessor.cs:line 36 at Gauge.Dotnet.ExecutableRunnerServiceHandler.<>c__DisplayClass24_0.<StartExecution>b__0() in /home/runner/work/gauge-dotnet/gauge-dotnet/src/ExecutableRunnerServiceHandler.cs:line 98 at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) 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.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location where exception was thrown --- at Grpc.Shared.Server.UnaryServerMethodInvoker3.AwaitInvoker(Task1 invokerTask, GrpcActivatorHandle1 serviceHandle) at Grpc.Shared.Server.UnaryServerMethodInvoker3.AwaitInvoker(Task1 invokerTask, GrpcActivatorHandle1 serviceHandle) at Grpc.AspNetCore.Server.Internal.CallHandlers.UnaryServerCallHandler3.HandleCallAsyncCore(HttpContext httpContext, HttpContextServerCallContext serverCallContext) at Grpc.AspNetCore.Server.Internal.CallHandlers.ServerCallHandlerBase3.<HandleCallAsync>g__AwaitHandleCall|8_0(HttpContextServerCallContext serverCallContext, Method`2 method, Task handleCall) info : Microsoft.AspNetCore.Routing.EndpointMiddleware[1] Executed endpoint 'gRPC - /gauge.messages.Runner/StartExecution'

16mohan avatar Dec 29 '20 15:12 16mohan

What is the version of Gauge.Csharp.Lib being used in the project? Ensure it is the latest and try. If you're still facing this issue, can you share a sample project for us to replicate this?

sriv avatar Dec 29 '20 16:12 sriv

gauge --version Gauge version: 1.1.6 Commit Hash: 3af456f

Plugins

dotnet (0.3.0) html-report (4.0.12) java (0.7.13) python (0.3.14) screenshot (0.0.1) spectacle (0.1.4) xml-report (0.2.3)

pratapkuchipudi avatar Dec 29 '20 16:12 pratapkuchipudi

Hi Everyone since last one week trying with all possible solutions still issue not yet solved here is the sample project which is to login into gmail pls check and let me know where i am missing thanks for your support

https://github.com/pratapkuchipudi/forbugcheck/blob/main/Automation-1.7z

pratapkuchipudi avatar Jan 04 '21 10:01 pratapkuchipudi