# Node-red-contrib-opcua : getting unkown error "TypeError: crypto\_utils.readCertificate is not a function"

**URL:** <https://discourse.nodered.org/t/node-red-contrib-opcua-getting-unkown-error-typeerror-crypto-utils-readcertificate-is-not-a-function/95213>\
**Category:** Industrial\
**Tags:** opcua\
**Created:** [7 February 2025 14:13 UTC](https://discourse.nodered.org/t/node-red-contrib-opcua-getting-unkown-error-typeerror-crypto-utils-readcertificate-is-not-a-function/95213 "2025-02-07T14:13:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![YannickRAKOTO](https://avatars.discourse-cdn.com/v4/letter/y/77aa72/32.png) [@YannickRAKOTO](https://discourse.nodered.org/u/YannickRAKOTO)\
**Post date:** [7 February 2025 14:13 UTC](https://discourse.nodered.org/t/node-red-contrib-opcua-getting-unkown-error-typeerror-crypto-utils-readcertificate-is-not-a-function/95213/1 "2025-02-07T14:13:47Z")

</div>

Hello everyone, I'm trying to retrieve datas from my OPC UA Server. For that I'm deploying a flow on node-RED with the OPC UA client (from Node-red-contrib-opcua) to establish a connexion through my opc-UA server. I've created a self-signed certification for the OPC UA communication wich works fine through UA Expert.

Anyway, I properly provide all the parameters required in the node configuration form (URL, certificate path, private key path). However when I deployed the flow and then debugged it, I got this error : "TypeError: crypto\_utils.readCertificate is not a function".

Could someone give us what this error means ?  
Is there someone who has a solution to fix this error ? Could you please share with us how did you do to fix this issue ?

PS: I’m on Node.js v22.13.1 LTS with node-red-contrib-opcua 0.2.339 (the latest).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 April 2025 14:14 UTC](https://discourse.nodered.org/t/node-red-contrib-opcua-getting-unkown-error-typeerror-crypto-utils-readcertificate-is-not-a-function/95213/2 "2025-04-08T14:14:11Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
