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

Unable to Invoke API Requests #192

Open
Bosoffsky opened this issue Dec 12, 2022 · 0 comments
Open

Unable to Invoke API Requests #192

Bosoffsky opened this issue Dec 12, 2022 · 0 comments
Milestone

Comments

@Bosoffsky
Copy link

Brief description of your issue

When calling the API, it returns the below error.
This is not only occouring with /api/information but also with the other functions.
Installing older versions of the Rest-Source fixes the Problem.

Steps to reproduce

  1. Run latest version of the Rest-Source (1.1.20221129)
  2. Call /api/information

Expected behavior

Calling /api/information

image

2022-12-12T09:23:35.445 [Information] Executing 'InformationGet' (Reason='This function was programmatically called via the host APIs.', Id=3c326d7d-f179-47aa-ab9a-adf0fc781a02)
2022-12-12T09:23:35.446 [Information] Executed 'InformationGet' (Succeeded, Id=3c326d7d-f179-47aa-ab9a-adf0fc781a02, Duration=7ms)

Actual behavior

Error after calling /api/information

image

Stacktrace of Server

2022-12-12T09:03:12.730 [Information] Executing 'InformationGet' (Reason='This function was programmatically called via the host APIs.', Id=48169d65-88c7-4778-a241-03fa34ceaab4)
2022-12-12T09:03:13.117 [Error] System.ArgumentNullException: Value cannot be null. (Parameter 'value')at System.Boolean.Parse(String value)at Microsoft.WinGet.RestSource.Functions.Common.CertificateValidationHelper.ValidateAuthentication(HttpRequest req, ILogger log) in D:\a\1\s\src\WinGet.RestSource.Functions\Common\CertificateValidationHelper.cs:line 31at Microsoft.WinGet.RestSource.Functions.ServerFunctions.InformationGetAsync(HttpRequest req, ILogger log) in D:\a\1\s\src\WinGet.RestSource.Functions\ServerFunctions.cs:line 62
2022-12-12T09:03:13.172 [Error] Emitting metric ServerInformationError for function InformationGet on route /api/information'
2022-12-12T09:03:13.246 [Error] Emitting metric 'ServerInformationError'
2022-12-12T09:03:13.290 [Error] Fatal error MonitorTenant is empty
2022-12-12T09:03:13.335 [Error] Fatal error MonitorRole is empty
2022-12-12T09:03:13.378 [Error] {"FunctionName":"InformationGet","Route":"/api/information","Headers":"null","Object":"null","Error":"{"ClassName":"System.ArgumentNullException","Message":"Value cannot be null.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at System.Boolean.Parse(String value)\r\n at Microsoft.WinGet.RestSource.Functions.Common.CertificateValidationHelper.ValidateAuthentication(HttpRequest req, ILogger log) in D:\\a\\1\\s\\src\\WinGet.RestSource.Functions\\Common\\CertificateValidationHelper.cs:line 31\r\n at Microsoft.WinGet.RestSource.Functions.ServerFunctions.InformationGetAsync(HttpRequest req, ILogger log) in D:\\a\\1\\s\\src\\WinGet.RestSource.Functions\\ServerFunctions.cs:line 62","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2147467261,"Source":"System.Private.CoreLib","WatsonBuckets":null,"ParamName":"value"}"}
2022-12-12T09:03:13.401 [Information] Executed 'InformationGet' (Succeeded, Id=48169d65-88c7-4778-a241-03fa34ceaab4, Duration=670ms)

Environment

- Rest-Source is currently running on the newest release version 1.1.20221129.
- Rest-Source is hosted in a Azure Environment
- Calling /api/information works with previous versions
@denelon denelon added this to the 1.9-REST milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants