Wix-realtime is giving error in blocks

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

Can you share the error messages you’re getting?

{
“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

Got it. While not Blocks, Velo recently had a bug discovered where permissions needed to be defined 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

its working now . thank you so much!