I tried configuring SSO with n8n and jumpcloud but ended up getting an error:
" The “url” argument must be of type string. Received an instance of Object
n8n version: 1.71.3
Database (default: SQLite): AWS RDS Postgres
Running n8n via ECS Fargate
I tried configuring SSO with n8n and jumpcloud but ended up getting an error:
" The “url” argument must be of type string. Received an instance of Object
n8n version: 1.71.3
Database (default: SQLite): AWS RDS Postgres
Running n8n via ECS Fargate
It looks like your topic is missing some important information. Could you provide the following if applicable.
n8n version: 1.71.3
Database (default: SQLite): AWS RDS Postgres
n8n EXECUTIONS_PROCESS setting main
Running n8n via ECS Fargate
Can you please share where exactly you are getting this error? Do you have any screenshots?
Also, can you share more information on how you’re trying to set up SSO?
That would help to understand your issue better
Thanks!
Hi @ria , thanks for reply!
Below, I’ve included evidence of the error and how I’m sending the configuration:
Using URL
Using XML
If you need more information, let me know.strong text
How are we configuring it?
We’re following this documentation exactly as outlined. Set up SAML | n8n Docs
Can you try the following:
Metadata URLand see if that helps?
Do you get anything in the logs related to this?
Hi @ria , the same error
Logs:
Dec 23, 2024 @ 11:06:20.407TypeError: The “url” argument must be of type string. Received an instance of Object
Dec 23, 2024 @ 11:06:20.407 at Url.parse (node:url:171:3)
Dec 23, 2024 @ 11:06:20.407 at Object.urlParse (node:url:142:13)
Dec 23, 2024 @ 11:06:20.407 at buildRedirectURL (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/binding-redirect.js:74:25)
Dec 23, 2024 @ 11:06:20.407 at Object.loginRequestRedirectURL (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/binding-redirect.js:125:22)
Dec 23, 2024 @ 11:06:20.407 at ServiceProvider.createLoginRequest (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/entity-sp.js:86:51)
Dec 23, 2024 @ 11:06:20.407 at SamlService.getRedirectLoginRequestUrl (/usr/local/lib/node_modules/n8n/dist/sso/saml/saml.service.ee.js:172:33)
Dec 23, 2024 @ 11:06:20.407 at SamlService.getLoginRequestUrl (/usr/local/lib/node_modules/n8n/dist/sso/saml/saml.service.ee.js:165:31)
Dec 23, 2024 @ 11:06:20.407 at processTicksAndRejections (node:internal/process/task_queues:95:5)
Dec 23, 2024 @ 11:06:20.407 at SamlController.handleInitSSO (/usr/local/lib/node_modules/n8n/dist/sso/saml/routes/saml.controller.ee.js:148:24)
Dec 23, 2024 @ 11:06:20.407 at SamlController.configTestGet (/usr/local/lib/node_modules/n8n/dist/sso/saml/routes/saml.controller.ee.js:145:16)
Dec 23, 2024 @ 11:06:20.407 -
Dec 23, 2024 @ 11:06:20.4062024-12-23T14:06:20.406Z | error | The “url” argument must be of type string. Received an instance of Object
Dec 23, 2024 @ 11:06:20.2782024-12-23T14:06:20.278Z | error | The “url” argument must be of type string. Received an instance of Object
Dec 23, 2024 @ 11:06:20.278TypeError: The “url” argument must be of type string. Received an instance of Object
Dec 23, 2024 @ 11:06:20.278 at Url.parse (node:url:171:3)
Dec 23, 2024 @ 11:06:20.278 at Object.urlParse (node:url:142:13)
Dec 23, 2024 @ 11:06:20.278 at buildRedirectURL (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/binding-redirect.js:74:25)
Dec 23, 2024 @ 11:06:20.278 at Object.loginRequestRedirectURL (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/binding-redirect.js:125:22)
Dec 23, 2024 @ 11:06:20.278 at ServiceProvider.createLoginRequest (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/entity-sp.js:86:51)
Dec 23, 2024 @ 11:06:20.278 at SamlService.getRedirectLoginRequestUrl (/usr/local/lib/node_modules/n8n/dist/sso/saml/saml.service.ee.js:172:33)
Dec 23, 2024 @ 11:06:20.278 at SamlService.getLoginRequestUrl (/usr/local/lib/node_modules/n8n/dist/sso/saml/saml.service.ee.js:165:31)
Dec 23, 2024 @ 11:06:20.278 at processTicksAndRejections (node:internal/process/task_queues:95:5)
Dec 23, 2024 @ 11:06:20.278 at SamlController.handleInitSSO (/usr/local/lib/node_modules/n8n/dist/sso/saml/routes/saml.controller.ee.js:148:24)
Dec 23, 2024 @ 11:06:20.278 at SamlController.configTestGet (/usr/local/lib/node_modules/n8n/dist/sso/saml/routes/saml.controller.ee.js:145:16)
Dec 23, 2024 @ 11:06:20.278 -
Dec 23, 2024 @ 11:06:20.2462024-12-23T14:06:20.245Z | error | The “url” argument must be of type string. Received an instance of Object
Dec 23, 2024 @ 11:06:20.246TypeError: The “url” argument must be of type string. Received an instance of Object
Dec 23, 2024 @ 11:06:20.246 at Url.parse (node:url:171:3)
Dec 23, 2024 @ 11:06:20.246 at Object.urlParse (node:url:142:13)
Dec 23, 2024 @ 11:06:20.246 at buildRedirectURL (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/binding-redirect.js:74:25)
Dec 23, 2024 @ 11:06:20.246 at Object.loginRequestRedirectURL (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/binding-redirect.js:125:22)
Dec 23, 2024 @ 11:06:20.246 at ServiceProvider.createLoginRequest (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/entity-sp.js:86:51)
Dec 23, 2024 @ 11:06:20.246 at SamlService.getRedirectLoginRequestUrl (/usr/local/lib/node_modules/n8n/dist/sso/saml/saml.service.ee.js:172:33)
Dec 23, 2024 @ 11:06:20.246 at SamlService.getLoginRequestUrl (/usr/local/lib/node_modules/n8n/dist/sso/saml/saml.service.ee.js:165:31)
Dec 23, 2024 @ 11:06:20.246 at processTicksAndRejections (node:internal/process/task_queues:95:5)
Dec 23, 2024 @ 11:06:20.246 at SamlController.handleInitSSO (/usr/local/lib/node_modules/n8n/dist/sso/saml/routes/saml.controller.ee.js:148:24)
Dec 23, 2024 @ 11:06:20.246 at SamlController.configTestGet (/usr/local/lib/node_modules/n8n/dist/sso/saml/routes/saml.controller.ee.js:145:16)
Dec 23, 2024 @ 11:06:20.246 -
Dec 23, 2024 @ 11:06:20.1072024-12-23T14:06:20.106Z | error | The “url” argument must be of type string. Received an instance of Object
Dec 23, 2024 @ 11:06:20.107TypeError: The “url” argument must be of type string. Received an instance of Object
Dec 23, 2024 @ 11:06:20.107 at Url.parse (node:url:171:3)
Dec 23, 2024 @ 11:06:20.107 at Object.urlParse (node:url:142:13)
Dec 23, 2024 @ 11:06:20.107 at buildRedirectURL (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/binding-redirect.js:74:25)
Dec 23, 2024 @ 11:06:20.107 at Object.loginRequestRedirectURL (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/binding-redirect.js:125:22)
Dec 23, 2024 @ 11:06:20.107 at ServiceProvider.createLoginRequest (/usr/local/lib/node_modules/n8n/node_modules/samlify/build/src/entity-sp.js:86:51)
Dec 23, 2024 @ 11:06:20.107 at SamlService.getRedirectLoginRequestUrl (/usr/local/lib/node_modules/n8n/dist/sso/saml/saml.service.ee.js:172:33)
Dec 23, 2024 @ 11:06:20.107 at SamlService.getLoginRequestUrl (/usr/local/lib/node_modules/n8n/dist/sso/saml/saml.service.ee.js:165:31)
Dec 23, 2024 @ 11:06:20.107 at processTicksAndRejections (node:internal/process/task_queues:95:5)
Dec 23, 2024 @ 11:06:20.107 at SamlController.handleInitSSO (/usr/local/lib/node_modules/n8n/dist/sso/saml/routes/saml.controller.ee.js:148:24)
These are the first 500 documents matching your search, refine your search to see others.
Hi @Luciano_Pinto
Thanks for this!
Please note that metadata URL/metadata xml are not a secret, but should only contain public keys. Security concerns with providing SAML metadata on public URL - Stack Overflow
I would say for further debugging, please email our support team at [email protected] with the following things (you can refer to this thread).
(from your browser Dev Tools):
Copy as Fetch the config request (.../rest/sso/saml/config)Copy value of the body (‘preview’) → this has the stacktrace, which would be very helpfulThanks!
I am facing same issue with Jumpcloud. Any progress on that?
The issue is, that baseUrl is an object at buildRedirectURL(opts)
I changed .js file with following and it works:
function buildRedirectURL(opts) {
var baseUrl = opts.baseUrl['urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST'], type = opts.type, isSigned = opts.isSigned, context = opts.context, entitySetting = opts.entitySetting;
n8n-1 | baseUrl: {
n8n-1 | 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST': 'https://sso.jumpcloud.com/saml2/n8n'
n8n-1 | },
Make sure you properly configure Jumpcloud Attributes Mapping:
Hi @vladaman ,
Thanks for reply.
I still haven’t received a definitive answer. The generated XML is correct, following the documentation at Set up SAML | n8n Docs
I’m encountering the same error, @ria did you found any solution for it
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.