PluginLoader error

Hi! I’m keep facing the error:
ERROR [TypeError: Cannot read property 'length' of undefined] at error (plugins/PluginLoader.js:1:11152) at b.<anonymous> (plugins/PluginLoader.js:1:2372) at uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:893
It doesn’t affect content or any flow anyhow but I still want to understand what’s wrong. Can someone share what’s going on in position 11152 of PluginLoader?

It must be something related to the error logging but not sure what exactly it is.

When do you see the error? When XD is loading your plugin? When you interact with it in some way?

The error occurs while interaction with the plugin. I believe it’s kind of problem in my code but I still curious why stack points somewhere in the deep of plugin loader.

Oh, I misread that stack a little. It may be deep in XD’s event handling code for panel plugins. Is there a specific interaction that seems to trigger this?

Ok, I got it, it’s the way how Xd shows unhandled exceptions or errors. Hope it will show it a bit more clearly one day :slight_smile:

I’ve reported it; we’ll see what we can do.

@gdreyv – Can you send us a snippet that reproduces the issue you saw? That would help in tracking things down.

Sorry for the delay. The problem is that it’s pretty not easy to provide good example as it’s an angular app and error occurs somewhere in the middle of the rendering trying to get length property of not initialized value. Stack related to the xd is:

ERROR [TypeError: Cannot read property 'length' of undefined]
    at error (plugins/PluginLoader.js:1:11152)
    at b.<anonymous> (plugins/PluginLoader.js:1:2372)
    at uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:893
    at j (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:785)
    at g (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:390)
    at f (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:192)
    at k (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:1097)
    at b.value (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/pluginmanager/src/js/pluginmanager_scripts.js:71:4436)
    at console.<anonymous> (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/js/runtime/src/js/runtime_scripts_loader.js:64:1034)
    at xn (C:\Users\avgre\AppData\Local\Packages\Adobe.CC.XD.Prerelease_adky2gkssdxte\LocalState\develop\xd.plugin\src\main.js:1:138541)

If you still need sample of the app I can try to implement it, but it will take some time.