Describe the problem/error/question
Hello, I am having problems with the mautic credential.
What is the error message (if any)?
Credentials for ‘Mautic OAuth2 API’ are not set.
Please share your workflow
What is happening
When I load a workflow with a mautic node this error about credential is always showed
Error when I load workflow:
The credential was defined:
I defined/selected again:
In the workflow, show ok:
When I save and reload the message comes back:
Information on your n8n setup
n8n version: 1.46.0
Database (default: SQLite): Postgres
n8n EXECUTIONS_PROCESS setting (default: own, main):
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
Operating system: Windows with WSL2
Jon
June 24, 2024, 6:36am
2
Hey @MarioGuimaraes ,
I am not able to reproduce this, When you say reload are you doing a page refresh or clicking on home then loading the workflow again?
Hello @Jon , both, when I refresh or clicking on home
I created the mautic credential again, but it doesn’t work either.
Ps.
I was wondering why this happened. I’m using cloud flare zero trust to access my localhost, and I installed n8n using a subdomain on one of my domains. When I configured the access to strapi using token, the same error happening.
Does it make sense?
Jon
June 28, 2024, 3:06am
4
Hey @MarioGuimaraes ,
The good news is we managed to reproduce this internally during some dedicated workflow building time and it should be fixed in 1.48.0, the PR that fixed it is below if you wanted to see the details.
n8n-io:master
← n8n-io:ado-2280-http-request-shows-credentials-not-set-warning-in-ui-despite
opened 07:16PM - 26 Jun 24 UTC
## Summary
We are attempting to get node credentials errors before we load th… e credentials in the store. This causes the UI to show "issues with the credentials" even though there are none. Loading the credentials as soon as we initiate the view seems to fix the issue.
Specifically, we are trying to get the credentials errors for `predefinedCredentialType` and [here](https://github.com/n8n-io/n8n/blob/e995309789c886f9203290e6973149ad96102fb2/packages/editor-ui/src/composables/useNodeHelpers.ts#L397), we attempt to get the type by calling `getCredentialsByType`, but that method depends on `allCredentialsByType` which at the same time depends on the state property `allCredentials`. At the time of calling the credentials have not been loaded in the store, so it returns `[]` even though it should have returned the credentials type. This empty array causes the logic to show an incorrect error.
The execution does follow:
`Mounted` -> `ready (jsplumb)` -> `initView` - > `openWorkflow` -> `addNodes` -> `refreshNodeIssues` -> `getNodeIssue` ->` getNodeCredentialIssues` -> `credentialsStore.getCredentialsByType` (were we return [] because the store has not loaded yet.) -> at some point later we load the credentials for that workflow in the store (this should have happened before getNodeCredentialIssues)
@cstuncsik Can you please have a look? I'm not too familiar with this side of the code, so I'm not sure whether this would break something else or if it's the best approach to solve the issue. So far, it seems to fix the problem.
## Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/ADO-2280/http-request-shows-credentials-not-set-warning-in-ui-despite
## Before changes
https://www.loom.com/share/5c07e76288e84041b6b8abdf99a33b30?from_recorder=1&focus_title=1
## After the changes
https://www.loom.com/share/7ac13702dced4784bc1bb820a29ed5bc?from_recorder=1&focus_title=1
## Review / Merge checklist
- [x] PR title and summary are descriptive. ([conventions](../blob/master/.github/pull_request_title_conventions.md)) <!--
**Remember, the title automatically goes into the changelog.
Use `(no-changelog)` otherwise.**
-->
- [ ] Tests included. <!--
A bug is not considered fixed, unless a test is added to prevent it from happening again.
A feature is not complete without tests.
-->
- [ ] PR Labeled with `release/backport` (if the PR is an urgent fix that needs to be backported)
1 Like
Hello @Jon
Yes, this is good news.
You are the best.
Thanks for all
1 Like
system
Closed
July 5, 2024, 9:28am
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.