# "TypeError: Channel credentials must be a ChannelCredentials object"

**URL:** https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056
**Category:** General
**Created:** [15 September 2021 13:12 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056 "2021-09-15T13:12:23Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Nabila](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@Nabila](https://discourse.nodered.org/u/Nabila)
#### Post date: [15 September 2021 13:12 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/1 "2021-09-15T13:12:23Z")

</div>

Hello  
I am new to node red and I encountered this error : "TypeError: Channel credentials must be a ChannelCredentials object "

Here is the realized schema, ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/2/f20b851cf03a3436f37d3a6fb09f0c67f9fc88f4.png)  
Your help please? How will I solve this problem?  
Thank you

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [15 September 2021 14:18 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/2 "2021-09-15T14:18:29Z")

</div>

> [@Nabila](#):
>
> TypeError: Channel credentials must be a ChannelCredentials object

Welcome to the forum @Nabila

Please stop node red and then start it again in a terminal and paste the full output here from the start.

What OS/hardware are you running node-red on?

---

<div class="post-metadata">

### Author: ![Nabila](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@Nabila](https://discourse.nodered.org/u/Nabila)
#### Post date: [16 September 2021 07:14 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/3 "2021-09-16T07:14:29Z")

</div>

Thank you for your answer. I work on the linux system ubuntu.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [16 September 2021 09:12 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/4 "2021-09-16T09:12:33Z")

</div>

> [@Colin](#):
>
> Please stop node red and then start it again in a terminal and paste the full output here from the start.

You have not done that bit.

---

<div class="post-metadata">

### Author: ![Nabila](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@Nabila](https://discourse.nodered.org/u/Nabila)
#### Post date: [16 September 2021 09:15 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/5 "2021-09-16T09:15:42Z")

</div>

Yes, I did! Thank you

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [16 September 2021 09:31 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/6 "2021-09-16T09:31:36Z")

</div>

> [@Nabila](#):
>
> Yes, I did!

Well you didn't paste it here. Do you mean that something you saw there allowed you to fix the problem? If so then please post the solution so the next person that has the problem will know how to fix it.

---

<div class="post-metadata">

### Author: ![Nabila](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@Nabila](https://discourse.nodered.org/u/Nabila)
#### Post date: [16 September 2021 09:41 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/7 "2021-09-16T09:41:48Z")

</div>

Hello,  
I did this :  
docker stop /mynodered  
docker rm /mynodered  
docker run -it -p 1880:1880 -v node\_red\_data:/data --name mynodered nodered/node-red

But i have another problem :

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/5/c5d90bc5bce128c3c454ff74d3d6a9501bc40e39.png)  
What i will do to solve it please ?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [16 September 2021 09:47 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/8 "2021-09-16T09:47:24Z")

</div>

Have you setup an MQTT broker?

Have you tested it, using MQTTExplorer for example?

If the answer to both of those is Yes then that probably means that docker container does not have access to localhost. Are you using docker for a reason? If not then you might be better to install node-red outside docker using the Ubuntu/Debian/Pi script [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)

---

<div class="post-metadata">

### Author: ![Nabila](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@Nabila](https://discourse.nodered.org/u/Nabila)
#### Post date: [16 September 2021 12:06 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/9 "2021-09-16T12:06:34Z")

</div>

Yes, I already tested MQTT on MQTTBox and it works fine, it receives data from my IoT server.  
I use Docker just for the ease of installation.  
Thanks for your opinion, I try to install it outside docker.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [16 September 2021 16:12 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/10 "2021-09-16T16:12:53Z")

</div>

Is channels an MQTT v5 thing ? If so maybe that is not correctly configured (as per original message) such that the connection fails...  
Must admit I don't know enough about MQTTv5 to advise.

---

<div class="post-metadata">

### Author: ![Nabila](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@Nabila](https://discourse.nodered.org/u/Nabila)
#### Post date: [17 September 2021 06:32 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/11 "2021-09-17T06:32:29Z")

</div>

hello,  
Thank you for your answer. For the MQTT used is MQTT v3.1.1

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [17 September 2021 06:51 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/12 "2021-09-17T06:51:24Z")

</div>

> [@Nabila](#):
>
> new to node red and I encountered this error : "TypeError: Channel credentials must be a ChannelCredentials object "

Can you share more details on where exactly you are seeing that error? Can you share the full line from the log? That should help identify what node is logging it. I don't recognize it as an error from either of the nodes you have shown in the screenshot.

---

<div class="post-metadata">

### Author: ![Nabila](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@Nabila](https://discourse.nodered.org/u/Nabila)
#### Post date: [17 September 2021 07:09 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/13 "2021-09-17T07:09:25Z")

</div>

Hello,  
Thanks for your answer  
I got this error when linking the elements that are on the screenshot and it was displayed on the debug window of Nod red. I restarted docker and it was fixed. My solution is just above in the comments 🙂

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [17 September 2021 07:47 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/14 "2021-09-17T07:47:05Z")

</div>

Had you been experimenting with any contrib nodes (firebase maybe)?

---

<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: [1 October 2021 07:47 UTC](https://discourse.nodered.org/t/typeerror-channel-credentials-must-be-a-channelcredentials-object/51056/15 "2021-10-01T07:47:52Z")

</div>

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