# Wix-realtime is giving error in blocks

**URL:** <https://forum.wixstudio.com/t/wix-realtime-is-giving-error-in-blocks/59903>\
**Category:** Ask the community\
**Tags:** wix-realtime-frontend, question, wix-studio, code, wix-blocks\
**Created:** [June 12, 2024, 2:06pm UTC](https://forum.wixstudio.com/t/wix-realtime-is-giving-error-in-blocks/59903 "2024-06-12T14:06:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Menon](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/krishna_menon/32/81804_2.png) [@Krishna\_Menon](https://forum.wixstudio.com/u/Krishna_Menon)\
**Post date:** [June 12, 2024, 2:06pm UTC](https://forum.wixstudio.com/t/wix-realtime-is-giving-error-in-blocks/59903/1 "2024-06-12T14:06:40Z")

</div>

**Question:**  
Receiving an error while running code to subscribe to a channel using wix-realtime-frontend in wix-blocks .

**Product:**  
Wix Blocks

**What are you trying to achieve:**  
i want to subscribe users to a channel when they login/signup to a website , and unsubscribe when they logout

**What have you already tried:**  
i tried to setup a realtime-permissions.js file in the backend , but the code fails to run because it is not able to read the backend file. i also tried running the code in studio website , it was working fine somehow it shows error in wix blocks

---

<div class="post-metadata">

**Author:** ![anthony](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/anthony/32/79536_2.png) [@anthony](https://forum.wixstudio.com/u/anthony)\
**Post date:** [June 13, 2024, 4:45pm UTC](https://forum.wixstudio.com/t/wix-realtime-is-giving-error-in-blocks/59903/2 "2024-06-13T16:45:18Z")

</div>

Can you share the error messages you’re getting?

---

<div class="post-metadata">

**Author:** ![Krishna\_Menon](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/krishna_menon/32/81804_2.png) [@Krishna\_Menon](https://forum.wixstudio.com/u/Krishna_Menon)\
**Post date:** [June 17, 2024, 10:54am UTC](https://forum.wixstudio.com/t/wix-realtime-is-giving-error-in-blocks/59903/3 "2024-06-17T10:54:43Z")

</div>

{  
“errorCode”: 2,  
“message”: “subscribe failed”,  
“channel”: {  
“name”: “someChannel”  
}  
} , i am getting this error when trying to subscribe to a channel

Error loading web module backend/realtime-permissions.js: i am getting this error as well

---

<div class="post-metadata">

**Author:** ![anthony](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/anthony/32/79536_2.png) [@anthony](https://forum.wixstudio.com/u/anthony)\
**Post date:** [June 17, 2024, 7:22pm UTC](https://forum.wixstudio.com/t/wix-realtime-is-giving-error-in-blocks/59903/4 "2024-06-17T19:22:29Z")

</div>

Got it. While not Blocks, Velo recently had a bug discovered where [permissions needed to be defined](https://dev.wix.com/docs/velo/api-reference/wix-realtime-backend/realtime-check-permission) before wix-realtime subscribe() calls would work. May want to try that here and see if it works.

If it doesn’t then the best place to report this is Wix Blocks Support: [Contact Wix](https://www.wix.com/support-chatbot?nodeId=8164d1cf-f113-46b8-b80c-c882b5058128&referral=blocksReportBug)

---

<div class="post-metadata">

**Author:** ![Krishna\_Menon](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/krishna_menon/32/81804_2.png) [@Krishna\_Menon](https://forum.wixstudio.com/u/Krishna_Menon)\
**Post date:** [June 18, 2024, 1:08pm UTC](https://forum.wixstudio.com/t/wix-realtime-is-giving-error-in-blocks/59903/5 "2024-06-18T13:08:06Z")

</div>

its working now . thank you so much!
