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] Error when selecting an AAS that references a submodel not located in the Submodel Repository. #55

Closed
JS-Aibel opened this issue Oct 8, 2024 · 4 comments · Fixed by #73
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@JS-Aibel
Copy link

JS-Aibel commented Oct 8, 2024

Describe the bug
An error occurs when selecting an AAS that references a submodel not located in the Submodel Repository.

To Reproduce
Steps to reproduce the behavior:

In the AAS Environment do as follows.

  1. Upload an AAS with a Submodel.
  2. Delete the submodel from an API endpoint.
  3. Select the AAS in AAS UI
  4. An error occurs as shown below.
Error while parsing the Submodel References!
Error: Cannot read properties of undefined (reading '0')

Expected behavior
According to the specification, the AssetAdministrationShell has a ‘soft’ reference to its Submodels, meaning it does not contain Submodels. Therefor, should the viewer account for missing submodels in the submodel Repository instead of triggering an error?

BaSyx (please complete the following information):

  • BaSyx Version [v2.0]
  • BaSyx SDK [Python]
  • AAS Version [DotAAS V3]

BaSyx configuration
Default from the Quick Start Guide.

@JS-Aibel JS-Aibel added the bug Something isn't working label Oct 8, 2024
@github-project-automation github-project-automation bot moved this to To triage in Support Requests Oct 8, 2024
@aaronzi aaronzi moved this from To triage to Backlog in Support Requests Oct 17, 2024
@aaronzi
Copy link
Member

aaronzi commented Oct 17, 2024

Hi @JS-Aibel,

Thanks for reporting this. What would be the behavior you would prefer when clicking on an AAS that references a submodel that isn't there? Just show a warning?

But you are absolutely right, an uncatched error that blocks the usage of the UI is not a good behaviour.

@JS-Aibel
Copy link
Author

Thanks for the reply, @aaronzi.

It might be helpful with a warning that explains the different types of issues:

  1. Submodel Not in Registry: If the submodel isn’t in the registry.
  2. Submodel Fetching Issues: If the submodel is in the registry but can’t be fetched from the repository, either because it’s missing or there’s no access to the repository.

Pop-up warnings can be easily missed or forgotten. Therefore, it would be best if the warning is visible in the viewer whenever the AAS is selected. For example, the warning could be shown as a greyed-out submodel, displaying its ID and the reason for its absence.

@aaronzi
Copy link
Member

aaronzi commented Oct 17, 2024

That's a great idea. I will add this to our backlog. We will definitely implement this!

@aaronzi
Copy link
Member

aaronzi commented Oct 31, 2024

Fixed in #73

@aaronzi aaronzi closed this as completed Oct 31, 2024
@aaronzi aaronzi removed this from BaSyx Backlog Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants