microsoft / Microsoft-Fabric-workload-development-sample

Demonstrates how to implement a Microsoft Fabric workload in .net and typescript
Other
30 stars 17 forks source link

Dev Gateway fails with error Invalid Parameter #93

Closed norelina closed 2 months ago

norelina commented 2 months ago

When trying to run the Dev Gateway, all of a sudden it has started failing with the following error and message: All strings must be between 5 and 2000 characters long:

.....u_wUrY9DyqXVJqqHuL9pJw
  Accept: application/json
  User-Agent: Microsoft.Fabric.Workload.Core.Internal/2024.4.1.23
  Content-Type: application/json; charset=utf-8
  Content-Length: 5123881
} was not successful, HTTP status code: BadRequest, reason: Bad Request, response: {"requestId":"a3e2047f-f822-476b-b388-a59281eb18ef","errorCode":"UnknownError","moreDetails":[{"errorCode":"Reason","message":"InvalidParameter"},{"errorCode":"Target","message":"xxxxx"},{"errorCode":"Message","message":"All strings must be between 5 and 2000 characters long."}],"message":"An unexpected error occurred while processing the request"}
   at Microsoft.Fabric.Workload.Core.Internal.Services.PbiSharedClient.RegisterCurrentDevInstanceAsync(WorkloadRegistrationRequest requestBody, Guid capacityGuid, String accessToken)
   at Microsoft.Fabric.Workload.Core.Internal.DevConnection.RegisterDevInstanceAsync(DevModeParameters devModeParameter, String userToken)
   at Microsoft.Fabric.Workload.Core.Internal.DevConnection.InitializeAsync(DevModeParameters devModeParameters, IList`1 endpointMappings)
   at Microsoft.Fabric.Workload.DevGateway.DevGatewayApplication.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Fabric.Workload.DevGateway.Program.Main(String[] args)
   at Microsoft.Fabric.Workload.DevGateway.Program.<Main>(String[] args)

Several members in our team were able to reproduce.

dhrumil83 commented 2 months ago

Same for me.

Microsoft.Fabric.Workload.DevGateway.exe
[2024-09-10 13:28:34.239] [Information] Starting DevGateway...
[2024-09-10 13:28:34.358] [Information] Getting user credentials...
[2024-09-10 13:28:49.934] [Information] Interactive user AAD token received
[2024-09-10 13:28:49.936] [Information] Registering dev instance...
[2024-09-10 13:28:50.804] [Error] Initialization failed: Dev instance registration call was not successful, HTTP status 
code: BadRequest, reason: Bad Request, response: {"requestId":"3dd797ea-8dbd-4a57-b433-
2baca2170489","errorCode":"UnknownError","moreDetails":[{"errorCode":"Reason","message":"InvalidParameter"},
{"errorCode":"Target","message":"Esri"},{"errorCode":"Message","message":"All strings must be between 5 and 2000 
characters long."}],"message":"An unexpected error occurred while processing the request"}
nadomani commented 2 months ago

Thank you for reaching out. The issue you're encountering is due to a new enforcement we've recently implemented, which requires all strings to be between 5 and 2000 characters long. However, I want to let you know that this minimum value is planned to be adjusted to 3 characters next week.

In the meantime, feel free to provide any additional information if needed, and we’ll be happy to assist with further troubleshooting.

dhrumil83 commented 2 months ago

Any ETA for this? Still fails.

norelina commented 2 months ago

Any ETA for this? Still fails.

Hello @dhrumil83, we were able to resolve this issue on our side by adjusting the length of the displayName and the productDetail/publisher values in our Product.json file. The latest in the sample repo has a validation script that can be used to check on that (e.g., by running node validation/validateSchema.js)