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

[BUG] AASX cannot be viewed in AASXPackageExplorer after downloading with AAS-Web-UI #510

Open
JBlezi opened this issue Oct 30, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@JBlezi
Copy link

JBlezi commented Oct 30, 2024

Describe the bug
When downloading an AASX from the basyx docker aas-environment-v3 using the aas-web-ui it cannot be viewed in the AasxPackageExplorer. The issue seems to be the addition of a valueId tag, that creates the error.

After I manually deleted the valueId tag, the shell can be viewed in the AasxPackageExplorer without a problem.

This is the error in the AasxPackageExplorer logs:

Error: while receiving file drop to window: PackageCentral: while performing load from Z:\Users\juliusblezinger\Downloads\Murrelektronik_556613_AAS.aasx at \PackageCentral.cs:line 83 gave: One or more errors occurred. (While opening aasx C:\users\juliusblezinger\Temp\tmpf406.aasx from source local file: Z:\Users\juliusblezinger\Downloads\Murrelektronik_556613_AAS.aasx buffered to: C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 491 gave: While reading the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 481 gave: While reading spec from the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \xmlization.cs:line 20625 gave: The required property Keys has not been given in the XML representation of an instance of class Reference at: submodels/*[1]/submodelElements/*[7]/valueId) PackageCentral: while performing load from Z:\Users\juliusblezinger\Downloads\Murrelektronik_556613_AAS.aasx at \PackageCentral.cs:line 83 gave: One or more errors occurred. (While opening aasx C:\users\juliusblezinger\Temp\tmpf406.aasx from source local file: Z:\Users\juliusblezinger\Downloads\Murrelektronik_556613_AAS.aasx buffered to: C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 491 gave: While reading the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 481 gave: While reading spec from the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \xmlization.cs:line 20625 gave: The required property Keys has not been given in the XML representation of an instance of class Reference at: submodels/*[1]/submodelElements/*[7]/valueId)
InnerException: One or more errors occurred. (While opening aasx C:\users\juliusblezinger\Temp\tmpf406.aasx from source local file: Z:\Users\juliusblezinger\Downloads\Murrelektronik_556613_AAS.aasx buffered to: C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 491 gave: While reading the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 481 gave: While reading spec from the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \xmlization.cs:line 20625 gave: The required property Keys has not been given in the XML representation of an instance of class Reference at: submodels/*[1]/submodelElements/*[7]/valueId)
InnerException: While opening aasx C:\users\juliusblezinger\Temp\tmpf406.aasx from source local file: Z:\Users\juliusblezinger\Downloads\Murrelektronik_556613_AAS.aasx buffered to: C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 491 gave: While reading the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 481 gave: While reading spec from the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \xmlization.cs:line 20625 gave: The required property Keys has not been given in the XML representation of an instance of class Reference at: submodels/*[1]/submodelElements/*[7]/valueId at    at AasxPackageLogic.PackageCentral.PackageCentralItem.Load(PackageCentral packageCentral, String location, String fullItemLocation, Boolean overrideLoadResident, PackageContainerOptionsBase containerOptions, PackCntRuntimeOptions runtimeOptions) in D:\a\aasx-package-explorer\aasx-package-explorer\src\AasxPackageLogic\PackageCentral\PackageCentral.cs:line 102
   at AasxPackageExplorer.MainWindow.UiLoadPackageWithNew(PackageCentralItem packItem, AdminShellPackageEnv takeOverEnv, String loadLocalFilename, String info, Boolean onlyAuxiliary, Boolean doNotNavigateAfterLoaded, PackageContainerBase takeOverContainer, String storeFnToLRU, Boolean indexItems) in D:\a\aasx-package-explorer\aasx-package-explorer\src\AasxPackageExplorer\MainWindow.xaml.cs:line 376
   at AasxPackageExplorer.MainWindow.Window_Drop(Object sender, DragEventArgs e) in D:\a\aasx-package-explorer\aasx-package-explorer\src\AasxPackageExplorer\MainWindow.xaml.cs:line 3364.Inner message: One or more errors occurred. (While opening aasx C:\users\juliusblezinger\Temp\tmpf406.aasx from source local file: Z:\Users\juliusblezinger\Downloads\Murrelektronik_556613_AAS.aasx buffered to: C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 491 gave: While reading the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 481 gave: While reading spec from the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \xmlization.cs:line 20625 gave: The required property Keys has not been given in the XML representation of an instance of class Reference at: submodels/*[1]/submodelElements/*[7]/valueId)
Inner message: While opening aasx C:\users\juliusblezinger\Temp\tmpf406.aasx from source local file: Z:\Users\juliusblezinger\Downloads\Murrelektronik_556613_AAS.aasx buffered to: C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 491 gave: While reading the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \AdminShellPackageEnv.cs:line 481 gave: While reading spec from the AASX C:\users\juliusblezinger\Temp\tmpf406.aasx at \xmlization.cs:line 20625 gave: The required property Keys has not been given in the XML representation of an instance of class Reference at: submodels/*[1]/submodelElements/*[7]/valueId

To Reproduce

  1. Upload an AASX via /upload endpoint
  2. Add discovery entry via POST request to /lookup/shells endpoint
  3. go to web ui on port 3000
  4. Click on download AASX
  5. Try to open downloaded AASX in AasxPackageExplorer

Expected behavior
Downloaded AASX should be viewable after download without any further modifications

BaSyx (please complete the following information):

  • BaSyx Version 2.0.0-SNAPSHOT
  • BaSyx Docker OTC
  • AAS Version DotAAS V3
  • AasxPackageExplorer v2024-05-08

Screenshots
If applicable, add screenshots to help explain your problem.

Used Asset Administration files (.aasx/.json/.xml)
Any file

BaSyx configuration

version: "3.7"

services:
  mongodb:
    image: mongo:5.0.10
    volumes:
      - mongodb-data-version-5.0.10:/data/db
    container_name: mongodb-aasreg-smreg-v3
    environment:
      MONGO_INITDB_ROOT_USERNAME: admin
      MONGO_INITDB_ROOT_PASSWORD: admin
      MONGODB_EXTRA_FLAGS: --wiredTigerCacheSizeGB=2
    deploy:
      resources:
        limits:
          memory: 4G
        reservations:
          memory: 2G
    ports:
      - 27017:27017
    healthcheck:
      test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
    logging:
      driver: "json-file"
      options:
        max-size: "1g"
        max-file: "3"

  aas-registry-service:
    image: eclipsebasyx/aas-registry-log-mongodb:2.0.0-SNAPSHOT
    container_name:  aas-registry-v3
    environment:
      SPRING_DATA_MONGODB_URI: mongodb://admin:admin@mongodb:27017
      BASYX_CORS_ALLOWED_METHODS: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
      BASYX_CORS_ALLOWED_ORIGINS: "*"
    ports:
      - 8050:8080
    depends_on:
      - mongodb
    restart: always

  submodel-registry-service:
    image: eclipsebasyx/submodel-registry-log-mongodb:2.0.0-SNAPSHOT
    container_name:  submodel-registry-v3
    # pull_policy: never
    environment:
      SPRING_DATA_MONGODB_URI: mongodb://admin:admin@mongodb:27017
      BASYX_CORS_ALLOWED_METHODS: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
      BASYX_CORS_ALLOWED_ORIGINS: "*"
    ports:
      - 8051:8080
    depends_on:
      - mongodb
    restart: always

  aas-environment-service:
    image: eclipsebasyx/aas-environment:2.0.0-SNAPSHOT
    volumes:
    - ./application.properties:/application/application.properties
    container_name:  aas-environment-v3
    # pull_policy: never
    ports:
      - 8082:8081
    environment:
      BASYX_CORS_ALLOWED_METHODS: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
      BASYX_CORS_ALLOWED_ORIGINS: "*"
      BASYX_AASREPOSITORY_FEATURE_REGISTRYINTEGRATION: http://aas-registry-service:8080 # <--- to register the AAS in the AAS registry
      BASYX_EXTERNALURL: http://localhost:8082 # <--- to create the connection from the registry to the environment
      BASYX_SUBMODELREPOSITORY_FEATURE_REGISTRYINTEGRATION: http://submodel-registry-service:8080 # <--- to register the submodels in the submodel registry
    depends_on:
      - mongodb
    restart: always

  aas-web-ui:
      image: eclipsebasyx/aas-gui:v2-241006
      container_name: aas-web-ui
      ports:
          - "3000:3000"
      environment:
          AAS_REGISTRY_PATH: "http://localhost:8050"
          SUBMODEL_REGISTRY_PATH: "http://localhost:8051"
          AAS_DISCOVERY_PATH: "http://localhost:8083"
          AAS_REPO_PATH: "http://localhost:8082/shells"
          SUBMODEL_REPO_PATH: "http://localhost:8082/submodels"
          CD_REPO_PATH: "http://localhost:8082/concept-descriptions"
          # DASHBOARD_SERVICE_PATH: "<dashboard_service_path>" (optional; Time Series Data)
          # PRIMARY_COLOR: "<primary_color>" (optional; Corporate Design)
          # LOGO_PATH: "<logo_path_in_container>" (optional; Corporate Design)
          # BASE_PATH: "<base_path>" (optional)
          # INFLUXDB_TOKEN: "<influxdb_token>" (optional; Time Series Data)
          # KEYCLOAK_URL: "<keycloak_url>" (optional; RBAC feature)
          # KEYCLOAK_REALM: "<keycloak_realm>" (optional; RBAC feature)
          # KEYCLOAK_CLIENT_ID: "<keycloak_client_id>" (optional; RBAC feature)
      depends_on:
        - aas-environment-service


  aas-discovery-service:
    image: eclipsebasyx/aas-discovery:2.0.0-SNAPSHOT
    container_name: aas-discovery-service
    volumes:
      - ./application.properties:/application/application.properties
    ports:
      - 8083:8081
    environment:
      BASYX_CORS_ALLOWED_METHODS: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
      BASYX_CORS_ALLOWED_ORIGINS: "*"
    depends_on:
      - mongodb
      - aas-environment-service
      - aas-registry-service
      - submodel-registry-service
    restart: always

volumes:
   mongodb-data-version-5.0.10:
      driver: local

System (please complete the following information):

  • OS: MacOS Sonoma 14.6.1
  • CPU architecture: Apple M3 Max
  • Browser Google Chrome
  • Version

Additional context
Add any other context about the problem here.

@JBlezi JBlezi added the bug Something isn't working label Oct 30, 2024
@mdanish98
Copy link
Contributor

Hi @JBlezi

Thanks for raising this issue.
Could you also please update the AASXPackageExplorer version?

@JBlezi
Copy link
Author

JBlezi commented Oct 30, 2024

I just added the version of AASXPackageExplorer under Basyx @mdanish98

@aaronzi aaronzi moved this from To triage to Ready in Support Requests Nov 5, 2024
@mdanish98
Copy link
Contributor

Hi @JBlezi
Thanks for updating the version.
We are working on this. We will update here as soon as the analysis is completed.

@mdanish98
Copy link
Contributor

Hi,

The issue is reproducible at our end. We need to analyse this issue further more in order to find the root cause.
Below is our analysis for this issue:

Reproduction Steps:

  1. Upload an AASX via /upload endpoint
    Upload Endpoint: http://localhost:8082/upload
    Attachment: form-data
    Key: file
    Value: AASXfile
  2. Add discovery entry via POST request to /lookup/shells endpoint
    endpoint: http://localhost:8083/lookup/shells/aHR0cHM6Ly9odHctYmVybGluLmRlL2lkcy9hYXMvZGVtb2Fhc3Yz
    POST Reuqest with below body as JSON:
    [
    {
    "name": "DemoSpecificAssetId",
    "value": "DemoSpecificAssetIdValue"
    }
    ]
  3. go to web ui on port 3000
  4. Click on download AASX

ExampleV3_.aasx

  • When loaded in AAS Package Explorer before doing steps 1-4: no error
  • When loaded in AAS Package Explorer after doing steps 1-4: no error

104125_AAS.aasx

  • When loaded in AAS Package Explorer before doing steps 1-4: no error
  • When loaded in AAS Package Explorer after doing steps 1-4: following error

Error: Unhandled exception in AasxPackageExplorer v1.0.0.0: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (PackageCentral: while performing load from C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx at \PackageCentral.cs:line 83 gave: One or more errors occurred. (While opening aasx C:\Users\user\AppData\Local\Temp\tmp4692.aasx from source local file: C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx buffered to: C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 494 gave: While reading the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 484 gave: While reading spec from the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \xmlization.cs:line 20625 gave: The required property PreferredName has not been given in the XML representation of an instance of class DataSpecificationIec61360 at: conceptDescriptions/[10]/embeddedDataSpecifications/[0]/dataSpecificationContent/dataSpecificationIec61360)) A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (PackageCentral: while performing load from C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx at \PackageCentral.cs:line 83 gave: One or more errors occurred. (While opening aasx C:\Users\user\AppData\Local\Temp\tmp4692.aasx from source local file: C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx buffered to: C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 494 gave: While reading the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 484 gave: While reading spec from the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \xmlization.cs:line 20625 gave: The required property PreferredName has not been given in the XML representation of an instance of class DataSpecificationIec61360 at: conceptDescriptions/[10]/embeddedDataSpecifications/[0]/dataSpecificationContent/dataSpecificationIec61360))
InnerException: PackageCentral: while performing load from C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx at \PackageCentral.cs:line 83 gave: One or more errors occurred. (While opening aasx C:\Users\user\AppData\Local\Temp\tmp4692.aasx from source local file: C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx buffered to: C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 494 gave: While reading the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 484 gave: While reading spec from the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \xmlization.cs:line 20625 gave: The required property PreferredName has not been given in the XML representation of an instance of class DataSpecificationIec61360 at: conceptDescriptions/[10]/embeddedDataSpecifications/[0]/dataSpecificationContent/dataSpecificationIec61360)
InnerException: One or more errors occurred. (While opening aasx C:\Users\user\AppData\Local\Temp\tmp4692.aasx from source local file: C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx buffered to: C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 494 gave: While reading the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 484 gave: While reading spec from the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \xmlization.cs:line 20625 gave: The required property PreferredName has not been given in the XML representation of an instance of class DataSpecificationIec61360 at: conceptDescriptions/[10]/embeddedDataSpecifications/[0]/dataSpecificationContent/dataSpecificationIec61360)
InnerException: While opening aasx C:\Users\user\AppData\Local\Temp\tmp4692.aasx from source local file: C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx buffered to: C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 494 gave: While reading the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 484 gave: While reading spec from the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \xmlization.cs:line 20625 gave: The required property PreferredName has not been given in the XML representation of an instance of class DataSpecificationIec61360 at: conceptDescriptions/[10]/embeddedDataSpecifications/[0]/dataSpecificationContent/dataSpecificationIec61360 at .Inner message: PackageCentral: while performing load from C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx at \PackageCentral.cs:line 83 gave: One or more errors occurred. (While opening aasx C:\Users\user\AppData\Local\Temp\tmp4692.aasx from source local file: C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx buffered to: C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 494 gave: While reading the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 484 gave: While reading spec from the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \xmlization.cs:line 20625 gave: The required property PreferredName has not been given in the XML representation of an instance of class DataSpecificationIec61360 at: conceptDescriptions/[10]/embeddedDataSpecifications/[0]/dataSpecificationContent/dataSpecificationIec61360)
Inner message: One or more errors occurred. (While opening aasx C:\Users\user\AppData\Local\Temp\tmp4692.aasx from source local file: C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx buffered to: C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 494 gave: While reading the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 484 gave: While reading spec from the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \xmlization.cs:line 20625 gave: The required property PreferredName has not been given in the XML representation of an instance of class DataSpecificationIec61360 at: conceptDescriptions/[10]/embeddedDataSpecifications/[0]/dataSpecificationContent/dataSpecificationIec61360)
Inner message: While opening aasx C:\Users\user\AppData\Local\Temp\tmp4692.aasx from source local file: C:\Users\user\Downloads\Murrelektronik_10415_AAS.aasx buffered to: C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 494 gave: While reading the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \AdminShellPackageEnv.cs:line 484 gave: While reading spec from the AASX C:\Users\user\AppData\Local\Temp\tmp4692.aasx at \xmlization.cs:line 20625 gave: The required property PreferredName has not been given in the XML representation of an instance of class DataSpecificationIec61360 at: conceptDescriptions/[10]/embeddedDataSpecifications/[0]/dataSpecificationContent/dataSpecificationIec61360

Both the AASX files are attached here.
10415.zip
ExampleV3.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready
Development

No branches or pull requests

2 participants