Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication Error in Odoo Module after Update to Release 1.47.0 #9873

Closed
jd-87 opened this issue Jun 26, 2024 · 4 comments
Closed

Authentication Error in Odoo Module after Update to Release 1.47.0 #9873

jd-87 opened this issue Jun 26, 2024 · 4 comments
Labels

Comments

@jd-87
Copy link

jd-87 commented Jun 26, 2024

Bug Description

We got an error on the authentication process with the odoo modul with the following message:

{"level":"error","message":"NodeApiError crypto is not defined","metadata":{"file":"ResponseHelper.js","function":"sendErrorResponse","timestamp":"2024-06-26T11:35:16.787Z"}}

On Verbose it shows:

{"level":"verbose","message":"Workflow execution finished with error","metadata":{"error":{"context":{},"functionality":"regular","httpCode":null,"level":"warning","message":"crypto is not defined","messages":["crypto is not defined"],"name":"NodeApiError","node":{"credentials":{"odooApi":{"id":"FWJDWHfcEdcmXavI","name":"ERP-Login"}},"id":"fc96349c-c61d-4381-883b-158a595479ca","name":"Get Contact Tag List","parameters":{"customResource":"res.partner.category","filterRequest":{},"operation":"getAll","options":{"fieldsList":["id","name","partner_ids"]},"resource":"custom","returnAll":true},"position":[0,40],"type":"n8n-nodes-base.odoo","typeVersion":1},"stack":"NodeApiError: crypto is not defined\n    at Object.odooGetUserID (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Odoo/GenericFunctions.ts:405:9)\n    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Odoo/Odoo.node.ts:310:38)\n    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1379:8)\n    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1059:27\n    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1763:11","tags":{},"timestamp":1719389477657},"file":"LoggerProxy.js","function":"exports.verbose","timestamp":"2024-06-26T08:11:17.658Z","workflowId":"O1YfLLWJCoI5htsF"}}

All other Credentials working fine.

To Reproduce

We just do the following:

  1. redeploy N8N Workflow in Test Environment
  2. generate new Odoo API Key
  3. searching the git repository for changes and see that there is a change in the crypto module in the Odoo Node
  4. finding this Pull: feat(core): Use WebCrypto to generate all random numbers and strings #9786

Expected behavior

Our N8N Deployment is running on Debian 12 with Node.JS, NPM and PM2

Operating System

debian 12

n8n Version

1.47.0

Node.js Version

v18.19.0

Database

SQLite (default)

Execution mode

main (default)

@netroy
Copy link
Member

netroy commented Jun 26, 2024

Can you please try switching to nodejs v18.20.x, or v20.15.x 🙏🏽 ?
There is this random bug in older versions of nodejs 18 where global.crypto sometimes isn't defined.

@jd-87
Copy link
Author

jd-87 commented Jun 26, 2024

Can you please try switching to nodejs v18.20.x, or v20.15.x 🙏🏽 ? There is this random bug in older versions of nodejs 18 where global.crypto sometimes isn't defined.

That works, thanks for your fast response!
We are running now on: v20.15.0

@jd-87 jd-87 closed this as completed Jun 26, 2024
@Joffcom
Copy link
Member

Joffcom commented Jun 26, 2024

Hey @jd-87,

I would also recommend moving to the Docker image if you get a chance as it includes everything that you need to have a good time with n8n.

@janober
Copy link
Member

janober commented Jul 1, 2024

Fix got released with n8n@1.47.2

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants