Discussions

Ask a Question
Back to All

Uncaught (in promise) PluginError: Invalid plug-in token (ERR2)

Hello, would you mind sending this to the haiilo contact directly:

Hello, after adding the plugin to Haiilo we get the following error: Uncaught (in promise) PluginError: Invalid plug-in token (ERR2)

This is the test pluginadapter import { PluginAdapter } from '@coyoapp/plugin-adapter';

export class DemoPlugin {
constructor() {
console.log("--> pluginadapter.ts: File started execution.");

new PluginAdapter().init().then(data => {
  console.log(" PluginAdapter initialized, raw data:", data);

  const test1 = data['cfg.test1'] || 'Not set';
  const test2 = data['cfg.test2'] || 'Not set';

  this.setText('test1', test1);
  this.setText('test2', test2);
}).catch(err => {
  console.error(" Failed to initialize plugin:", err);
  document.body.innerHTML = `<p style="color:red">Plugin failed to load: ${err}</p>`;
});

}

private setText(id: string, value: string) {
const el = document.getElementById(id);
if (el) el.textContent = value;
}
}

new DemoPlugin();

while the manifest contains the data as provided in the documentation.

For simple testing purposes i need to just render the inputed data on the plugin, from which i can proceed with the rest of idea. Am i missing something? The only documentation for that error is here https://dev.plugins.haiilo.com/discuss/60eff9eac96a81007e37a4a6

Do you have any ideas as to why this is happening?