I’m creating a custom node for Oracle in n8n and I’m stuck. My node won’t recognize the credential test function I’ve set up. Here’s what’s happening:
My credentials file doesn’t have any auth or test methods. Instead, I’ve put a separate test function in the node.ts file. But when I try to test the node, it keeps saying there’s no test function for the credentials.
The verifyCredentials function follows the ICredentialTestFunction interface. I’ve looked at how other nodes like MySQL do it, and I thought mine was set up the same way. But it’s not working.
Any ideas what I might be doing wrong? I’m scratching my head here!
Have u tried moving the verifyCredentials function to the credentials file? sometimes n8n expects it there. Also, double-check ur imports and exports. Make sure everything’s linked up right.
if that doesnt work, try simplifying ur node structure. Remove extra stuff and focus on getting the cred test working first. Then add back other parts bit by bit.
I’ve run into similar issues when developing custom nodes for n8n. One thing that helped me was double-checking the file structure and imports. Make sure your verifyCredentials function is properly exported and imported in the right places.
Also, have you tried moving the verifyCredentials function directly into the credentials file? Sometimes n8n looks for the test function there by default. If that doesn’t work, you might need to adjust your webpack config to ensure all the necessary files are being bundled correctly.
Another thing to check is the n8n version you’re using. Some older versions had quirks with custom credential tests. Updating to the latest version might resolve the issue.
If none of these work, you might want to try simplifying your node structure temporarily - remove other methods and focus just on getting the credential test to work. Once that’s sorted, you can add back the other functionality step by step.
Have you checked your module exports? Sometimes the issue lies in how functions are being exported and imported between files. Ensure that your verifyCredentials function is properly exported from node.ts and that it’s being recognized by n8n’s internal systems.
Another potential fix is to explicitly define the test property in your credentials object. Try modifying your credentials array like this:
This directly assigns the test function, which might help n8n recognize it more easily. If you’re still facing issues, consider logging the contents of your methods object to ensure everything is structured as expected when the node initializes. Sometimes subtle runtime differences can cause unexpected behavior.