Custom node broken after update: 0.177.0 --> 0.178.1

Describe the issue/error/question

I have a custom node that was working fine until now.

After updating to 0.178.1, the node is now broken. The issue, identified so far, is with Parameters having dynamic options. e.g.:
image

Here, the ‘Field’ and ‘Collection’ Parameters are supposed to show dynamically loaded options.

But now they are simply gone!

Also, didn’t see anything in the Breaking Changes log to indicate this change.

Information on your n8n setup

  • n8n version: 0.178.1
  • Database you’re using (default: SQLite): Postgres
  • Running n8n with the execution process [own(default), main]: main
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: docker

Hi @shrey-42, thanks so much for reporting this and sorry for the trouble. I’ve reported this internally already. Can you confirm how your custom node currently loads the respective parameters?

Hi @MutedJam , this is the relevant code:

Also included here: Add Directus node by arladmin · Pull Request #2342 · n8n-io/n8n · GitHub

Seeing something similar in the core Switch node for Fallback Output:

Sorry for the trouble all, @mutdmour has implemented a fix addressing parameter loading issues: fix parameter loading bug by mutdmour · Pull Request #3374 · n8n-io/n8n (github.com)

[email protected] containing this fix has just landed on Docker Hub and addresses the problem reported by @pemontto:

Could you also give this version a go with your custom node @shrey-42?

1 Like

Thanks for the quick update!

Although, it appears to be a partial fix.

The fields are now visible, but the original behaviour isn’t completely restored.

In my example, the Field parameter is dependent on the Collection parameter. So, whenever the Collection’s value is changed, the Field’s dropdown options also get re-fetched.
But that’s not happening now. Currently, once set, the Field parameter’s loadOptions method doesn’t seem to be firing after the initial load.

May or may not be related, but if field in FieldsDescription.ts depends on collection, then it should specify the dependency with loadOptionsDependsOn, as you are doing e.g. for author in RelationsDescription.ts. Does author load correctly?

Yeah, that does work properly.

So this (not using ‘loadOptionsDependsOn’) might be the primary issue then?

If a param’s load options depend on another param’s value, then the dependency must be specified. As you did for author, could you please specify the dependency for field with loadOptionsDependsOn: [ 'collection' ] and try again?

That this currently works on Baserow table options depending on databaseId and elsewhere in your node would seem to indicate that the issue is the missing key in this param.

1 Like