question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Explorer fails to import interface with only components that already exists in the model database

See original GitHub issue

Steps to reproduce:

  • Import a few components using ADT explorer.
  • Import a new twin that uses the schemas previously imported without adding the component detail, just the reference schema.

It will show an error unless you add the component definition to the same file.

Note: I am able to import the same file using C# and CreateModelsAsync

The following example fails to import using the explorer.

{
	"@id": "dtmi:MeshSystems:poseidon;1",
	"@type": "Interface",
	"@context": "dtmi:dtdl:context;2",
	"extends": "dtmi:MeshSystems:basedevice;1",
	"displayName": "Poseidon",
	"contents": [
		{
			"@type": "Component",
			"displayName": {
				"en": "Notification"
			},
			"name": "Notification",
			"schema": "dtmi:MeshSystems:core:notification;1"
		},
		{
			"@type": "Component",
			"displayName": {
				"en": "DeviceHealth"
			},
			"name": "Health",
			"schema": "dtmi:MeshSystems:core:devicehealth;1"
		},
		{
			"@type": "Component",
			"displayName": {
				"en": "Cellular"
			},
			"name": "Cellular",
			"schema": "dtmi:MeshSystems:core:cellular;1"
		},
		{
			"@type": "Component",
			"displayName": {
				"en": "Device Information"
			},
			"name": "DeviceInformation",
			"schema": "dtmi:MeshSystems:core:deviceinformation;1"
		}
	]
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
uriel-klukcommented, Oct 25, 2021

Thanks Cory.

The Explorer is doing extra validation because External references use to work and now, they fail. Also, a work around I am currently using is importing the files using C# and then the explorer has no issues showing all the properties.

I am reporting these bugs to make the tool better, I am not blocked or expecting an immediate fix.

Best regards, UK

From: Cory Crowley @.> Sent: Monday, October 25, 2021 3:38 PM To: Azure-Samples/digital-twins-explorer @.> Cc: Uriel Kluk @.>; Mention @.> Subject: Re: [Azure-Samples/digital-twins-explorer] [Bug] Explorer fails to import interface with only components that already exists in the model database (Issue #222)

Hi Uriel, thanks for sharing the models. I was able to reproduce the problem. It looks like the issue is somehow tied to referencing components from other files.

I was able to upload everything into the explorer by combining all of the models into one long array of models in a single file, rather than uploading all of the models separately. There was also an issue with specifying multiple @." in an array rather than a single @." string which caused the upload to fail for me.

I marked this as a bug, but if you need a workaround for the time being, combining all models into a single file JSON array should fix this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Azure-Samples/digital-twins-explorer/issues/222#issuecomment-951309120, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ2NCAZDFYTC7F6LZP62NVTUIW53RANCNFSM5GMM6QBQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

0reactions
ccrowley96commented, Oct 26, 2021

Addressed in PR #225 - will take longer to see these changes in live explorer, but this should be fixed in main.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing Existing Libraries to Your Connected Workspace in ...
This page looks at using the Library Importer to quickly import your existing libraries to your connected Workspace. Covers both simple and ...
Read more >
Import solutions - Power Apps | Microsoft Learn
This error can occur when the form you are importing doesn't exist in the target environment and the form is imported for the...
Read more >
Could not load type from assembly error - Stack Overflow
I had just changed, rebuilt and reinstalled the assembly in the GAC. One possible solution is to use Task Manager to kill w3wp.exe....
Read more >
Common Issues with the SQL Server Import and Export Wizard
The SQL Server Import and Export Wizard is a useful tool for copying data from one data source (e.g. a SQL Server database...
Read more >
Importing Data - Oracle Help Center
Note: You can use EIM to update only non-user key columns; EIM does not ... Determine the data to load and whether it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found