`ProjectConfig` - `Unable to find registered component for id="..."` on custom perspective components module on startup

We have a custom perspective module adding several components. These all work fine. But when we start/restart the Ignition gateway, we get a rush of warnings from

Perspective.ProjectConfig

With message

Unable to find registered component for id="..."

Where ... is the name of the different react components from our module. Same react component may be listed multiple times. We get ~5100 of these entries (~51 pages with 100 entries per page).

This error message shows up whether module is installed or not. And from the time stamps, the first warning comes at e.g. 07:50:35, the last warning at 07:50:36, and then right afterwards at same timestamp, we see the module manager starting up our module, and registering the components. So it seems to me like Ignition is trying to use our custom components before the module has finished loading.

Does anyone know how to resolve this, so that we can avoid creating bloat in our logs?

  1. Are you registering your components in your hooks’ startup method?
  2. Do you have com.inductiveautomation.perspective listed as a module dependency for both the Gateway and Designer scopes?
1 Like

Reply to suggestion 1

We are registering components in the startup() method, and removing components in shutdown() method of designer.BasicComponentsDesignerHook.java and gateway.BasicComponentsGatewayHook.java.

But if we did not do this, would the components be available at all in either designer or gateway? The components are there, and work fine. It just seems like Ignition tries to use them before they are loaded.

Reply to suggestion 2

We used the ignition-sdk-examples/perspective-component - GitHub as a starting point, so would assume that the com.inductiveautomation.perspective dependency should already be there for that.

We can see in the build.gradle.kts the line:

moduleDependencies.put("com.inductiveautomation.perspective", "DG")

And in the xml we find by extracting content of the modl file we generate we can see:

<depends scope="DG">com.inductiveautomation.perspective</depends>

Which is listed below the hooks for "G" and "D" scope for our component. But I guess order should not matter her?
Full XML below (with shortened id):

<?xml version="1.0" encoding="UTF-8"?>
<modules>
	<module>
		<name>BasicComponents</name>
		<id>com.se.tib.basic_components</id>
		<version>0.5.76</version>
		<description>A module that adds components to the Perspective module.</description>
		<license>license.html</license>
		<requiredIgnitionVersion>8.1.8</requiredIgnitionVersion>
		<freeModule>false</freeModule>
		<hook scope="G">com.se.tib.gateway.BasicComponentsGatewayHook</hook>
		<hook scope="D">com.se.tib.designer.BasicComponentsDesignerHook</hook>
		<depends scope="DG">com.inductiveautomation.perspective</depends>
		<requiredFrameworkVersion>8</requiredFrameworkVersion>
		<jar scope="DG">common-0.5.76.jar</jar>
		<jar scope="D">designer-0.5.76.jar</jar>
		<jar scope="G">web-0.5.76.jar</jar>
		<jar scope="G">gateway-0.5.76.jar</jar>
	</module>
</modules>

Additional info

We are currently using Ignition 8.1.43, but issue has also been present for us with older Ignition versions.

In the logs we see that perspective starts first, then we start getting the errors until our custom module starts 1-2 seconds later:

  • 07:21:04 - Ignition[state=STARTING] ContextState = RUNNING
  • 07:21:04 - Gateway started in 31 seconds.
  • 07:21:04 - Registering model delegates.
  • 07:21:04 - Registering TIB Basic components.
  • 07:21:04 - Starting up BasicComponentsGatewayHook!
  • 07:21:04 - Starting up module 'com.se.tib.basic_components' v0.5.76 (b0)
  • 07:21:04 - Warning - Unable to find registered component for id="..."
  • 07:21:02 - ... many warnings of same type as below and above
  • 07:21:02 - Warning - Unable to find registered component for id="..."
  • 07:21:02 - ... OpcUaClient startup
  • 07:21:02 - Info - Starting up module 'com.inductiveautomation.perspective' v2.1.43 (b2024082010)...

Everything looks fine to me, maybe someone else can notice something.

Are you 100% sure that the component IDs showing in the logs are correct (i.e. they exactly match the ids configured in your module, and aren’t ids for non-existent components)?

The reason I ask is because I’ve done this to myself when changing the ID’s of components that are still in development; if you have old views in a project that still reference the original component ID, you’ll get component not found errors.