Unable to receive Notifications from Subscription
sagitarious12 opened this issue · 5 comments
(node:27618) UnhandledPromiseRejectionWarning: Error: Resource for parameter [subscriptionId] is not found
at Client. (/home/dev/node_modules/ringcentral/src/http/Client.js:62:38)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
I dont have any idea why this is happening. I have tested a large of amount of things, but I have been getting this error for the past two days when before I had not been getting this error at all.
Secondly I do not get this error when I am on the local version of the code. This only happens on my server. I do not change anything between the local and server versions of the code. Please let me know what information that you would like to see so that I can get this issue resolved.
The main problem that this is causing is... if I restart my server, I am able to get the first notification from the subscription, but any notifications after that, which I am expecting to get, do not come in.
I am subscribing to "presence". I only get one notification and then it quits until I restart my server. No other notifications come in. I am using version 4.0 but it gives me the same error in version 3.1.3.
Btw, we suggest to use webhooks instead of Pubnub subscriptions on a server.
Btw, we suggest to use webhooks instead of Pubnub subscriptions on a server.
That is what I am doing. At least I believe that I am. I am starting my server by creating a subscription using the JS SDK. then when a new user connects I add them to the subscriptions presence events in order to receive their telephony status.
Are the subscriptions different than webhooks? and if so, can I please have a link to a guide to a place where I can add webhooks instead of whatever a subscription is.. Either way, I believe that there is still something malfunctioning with the Client.js file in the ringcentral NPM package..
I need to see the code in order to help. You can email devsupport@ringcentral.com if you'd like to share it privately. From what I see it is a server-side error, not the SDK error. The subscription on server expires before you renew it. Subscriptions for Pubnub and Webhooks are similar, only transport is different, you should know what kind of transport you're using.
You have helped me solve the issue already. I never saw that there was a distinct difference between Pubnub front-end hook and the server side webhooks and I found an article that talks about setting up an express webhook for ringcentral which has helped me change a few things in my back end and I already have it fixed. Here is a link to the Article which let me to this Github Repo that I used that helped a ton.
The Ringcentral Webhook Article
Setting Up a Webhook Grokify on GitHub
Thank you for the help!
You're welcome!