reportportal/service-authorization

Client failing to authorize

Closed this issue · 1 comments

I'm using ReportPortal SpecFlow client and it cannot connect to ReportPortal due to authorization issue. The exception is following:

System.AggregateException: One or more errors occurred. ---> System.Exception: Cannot finish launch due inner items failed to finish. ---> System.AggregateException: One or more errors occurred. ---> System.Exception: Cannot finish test item due starting item failed. ---> System.AggregateException: One or more errors occurred. ---> System.Exception: Cannot start a test item due parent failed to start. ---> System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Unexpected response status code. POST http://{redacted url}/api/v1/bbsw_aonia/launch
Response Body: {"error":"invalid_token","error_description":"7853c7a9-7f27-43ea-835a-cab01355fd17"} ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at ReportPortal.Client.Extentions.HttpResponseMessageExtension.VerifySuccessStatusCode(HttpResponseMessage httpResponseMessage) in C:\projects\client-net\ReportPortal.Client\Extentions\HttpResponseMessageExtension.cs:line 10
--- End of inner exception stack trace ---
at ReportPortal.Client.Extentions.HttpResponseMessageExtension.VerifySuccessStatusCode(HttpResponseMessage httpResponseMessage) in C:\projects\client-net\ReportPortal.Client\Extentions\HttpResponseMessageExtension.cs:line 19
at ReportPortal.Client.Service.<StartLaunchAsync>d__14.MoveNext() in C:\projects\client-net\ReportPortal.Client\Service.Launch.cs:line 58

The URL is accessible from the client machine.

To setup the client I used Specflow setup instructions and the token 7853c7a9-7f27-43ea-835a-cab01355fd17 is the one listed there.

My company deployed ReportPortal container set. Here are the versions reported on the login page:

  • Analysis Service: 4.3.0;
  • API Service: 4.3.4;
  • Index Service: 4.2.0;
  • Jira Service: 4.3.0;
  • Rally Service: 4.3.0;
  • Authorization Service: 4.2.0;
  • Service UI: 4.3.6;

Can you tell me how can I determine what access token I should use for a specific project?

Resolved using the suggestion here