eclipse-aaspe / server

C# based server for AASX packages
Other
72 stars 52 forks source link

[Bug]: GET packages endpoint is not working anymore #340

Closed iosb-ina-mr closed 1 week ago

iosb-ina-mr commented 3 months ago

Describe the bug

The API endpoint "GET /packages" is not working anymore for the latest aasx-server-blazor-for-demo:main. Since I can't find any version number, here is the timestamp of when it was released on docker hub: Jul 25, 2024 at 1:09 am. I have attached the error log below. Even when I provide an AAS-ID (base64-encoded), as advised by the error response, a different error is returned.

To reproduce

Deploy the current version of the aasx-server-blazor-for-demo container, open the swagger UI and trigger the GET /packages endpoint.

Expected Behaviour

When no AAS-ID is given, the list of all AAS-IDs should be returned including their package-IDs.

Version

adminshellio/aasx-server-blazor-for-demo:main

Operating System

Linux

Relevant log output

info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0],
      Executing endpoint 'IO.Swagger.Controllers.AASXFileServerAPIApiController.GetAllAASXPackageIds (IO.Swagger.Lib.V3)',
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[102],
      Route matched with {action = "GetAllAASXPackageIds", controller = "AASXFileServerAPIApi", page = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult GetAllAASXPackageIds(System.String, System.Nullable`1[System.Int32], System.String) on controller IO.Swagger.Controllers.AASXFileServerAPIApiController (IO.Swagger.Lib.V3).,
info: IO.Swagger.Controllers.AASXFileServerAPIApiController[3],
      Received request to get all the AASX packages.,
      Executed action IO.Swagger.Controllers.AASXFileServerAPIApiController.GetAllAASXPackageIds (IO.Swagger.Lib.V3) in 12.6352ms,
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[105],
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1],
      Executed endpoint 'IO.Swagger.Controllers.AASXFileServerAPIApiController.GetAllAASXPackageIds (IO.Swagger.Lib.V3)',
fail: IO.Swagger.Lib.V3.Middleware.ExceptionMiddleware[2],
      Cannot proceed as decodedAasId is null,
info: Microsoft.AspNetCore.Hosting.Diagnostics[2],
      Request finished HTTP/1.1 GET http://XX.XX.XX.XX/packages - 403 - application/json 85.7024ms,
      Request starting HTTP/1.1 GET http://XX.XX.XX.XX/packages - - -,
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
GitHubRudolf commented 3 months ago

Today, I experimented with the AASX Package Explorer along with the server for the first time. Although I can run the server locally and see the assets, I get a 403 error when I try to connect to the repository. Is there possibly already a solution or any tips?

SmartFactoryOWL commented 2 months ago

We have the same problem. The API call still worked in the main branch a few months ago. Swagger UI: Request: http://172.16.163.253:5001/packages Response body: { "Messages": [ { "Code": "Forbidden", "CorrelationId": null, "MessageType": "Error", "Text": "Cannot proceed as decodedAasId is null", "Timestamp": "09/16/2024 12:12:58" } ] }

martafullen commented 2 months ago

Hi, aasx server has been having problems with the API because of some changes to dotnet8... It's being worked on but for now I would suggest to download an earlier release : (