# Error in Push Notifications | Cloud Registration Error

**URL:** <https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940>\
**Category:** Community Support\
**Created:** [September 17, 2022, 7:36am UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940 "2022-09-17T07:36:04Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeroeth](https://avatars.discourse-cdn.com/v4/letter/z/7ba0ec/32.png) [@zeroeth](https://forums.rocket.chat/u/zeroeth)\
**Post date:** [September 17, 2022, 7:36am UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/1 "2022-09-17T07:36:04Z")

</div>

### Description

After updating RC and MongoDB, I’m getting the following errors. RC is working, but notifications (both in the browser and app) just don’t work anymore.

{“level”:40,“time”:“2022-09-15T11:54:21.307Z”,“pid”:1,“hostname”:“39f56867de46”,“name”:“Push”,“msg”:“Error sending push to gateway (not authorized) {"statusCode":401,"content":"{\"code\":121,\"error\":\"rocket.chat cloud registration required\",\"requestId\":\"0bc27b0d-1e88-4859-b3a4-4a8d3eb88698\",\"status\":401}","headers":{"access-control-allow-headers":"Content-Type, Authorization, Content-Length, X-Requested-With","access-control-allow-methods":"GET, PUT, POST, DELETE, OPTIONS","access-control-allow-origin":"\*","access-control-expose-headers":"Content-Type, Authorization, Cache-Control, Expires, Pragma, X-powered-by","cache-control":"private, no-cache, no-store, must-revalidate","connection":"close","content-length":"126","content-type":"application/json; charset=utf-8","date":"Thu, 15 Sep 2022 11:54:21 GMT","expires":"-1","pragma":"no-cache","vary":"Accept-Encoding","x-powered-by":"Rocket Fuel and Rocketeers"},"ok":false,"data":{"code":121,"error":"rocket.chat cloud registration required","requestId":"0bc27b0d-1e88-4859-b3a4-4a8d3eb88698","status":401}}”}

I’ve tried re-registering RC on the cloud and currently it shows the instance is connected. I’m also able to sync it, at least that’s the notification that I get.

 ![01](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/a/a1bbe0860601eed155c11e27e546ae7045016445.png)  
 ![02](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/f/f1c8d4511446769c486ad46c631404461cc22a9b.png)  
 ![03-1](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/d/df67892545acbb904d45d8da8cb6d88434e90e42.png)

but I cannot Login to Rocket.Chat Cloud when I click the Login to Rocket.Chat Cloud button. This is the error message that I get:

{“level”:50,“time”:“2022-09-15T12:01:09.946Z”,“pid”:1,“hostname”:“39f56867de46”,“name”:“System”,“err”:{“type”:“Error”,“message”:“failed [401]{"status":401}”,“stack”:“Error: failed [401]{"status":401}\n at makeErrorByStatus (server/lib/http/call.ts:59:9)\n at server/lib/http/call.ts:168:19\n at /app/bundle/programs/server/npm/node\_modules/meteor/promise/node\_modules/meteor-promise/fiber\_pool.js:43:40”,“response”:{“statusCode”:401,“content”:“{"status":401}”,“headers”:{“access-control-allow-headers”:“Content-Type, Authorization, Content-Length, Last-Event-ID, X-Requested-With”,“access-control-allow-methods”:“GET, PUT, POST, DELETE, OPTIONS”,“access-control-allow-origin”:“\*”,“access-control-expose-headers”:“Content-Type, Authorization, Cache-Control, Expires, Pragma, X-powered-by”,“cache-control”:“private, no-cache, no-store, must-revalidate”,“connection”:“close”,“content-length”:“14”,“content-type”:“application/json; charset=utf-8”,“date”:“Thu, 15 Sep 2022 12:01:09 GMT”,“expires”:“-1”,“pragma”:“no-cache”,“vary”:“Accept-Encoding”,“x-fleet-version”:“-77b34ba”,“x-powered-by”:“Rocket Fuel and Rocketeers”},“ok”:false,“data”:{“status”:401}}},“msg”:“failed [401]{"status":401}”}  
{“level”:50,“time”:“2022-09-15T12:03:45.303Z”,“pid”:1,“hostname”:“39f56867de46”,“name”:“System”,“msg”:“Exception while invoking method cloud:finishOAuthAuthorization ‘Invalid state provided [error-invalid-state]’”}

### Server Setup Information

- Version of Rocket.Chat Server: 5.0.3
- Operating System: Unraid
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 14.19.3 - x64
- MongoDB Version: 6.0.1
- Proxy: swag
- Firewalls involved:  
±-------------------------------------------------+  
| SERVER RUNNING |  
±-------------------------------------------------+  
| |  
| Rocket.Chat Version: 5.0.3 |  
| NodeJS Version: 14.19.3 - x64 |  
| MongoDB Version: 6.0.1 |  
| MongoDB Engine: wiredTiger |  
| Platform: linux |  
| Process Port: 3000 |  
| Site URL: [https://my.server.com](https://my.server.com) |  
| ReplicaSet OpLog: Enabled |  
| Commit Hash: |  
| Commit Branch: HEAD |  
| |  
±-------------------------------------------------+

### Any additional Information

Is there any way to resolve this? Any help will be highly appreciated. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Avsynthe](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@Avsynthe](https://forums.rocket.chat/u/Avsynthe)\
**Post date:** [September 18, 2022, 1:31am UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/2 "2022-09-18T01:31:51Z")

</div>

I’m having this exact same issue on Unraid with the exact same setup and docker versions

Sync says it’s working, which may be true, but when I click the Login to Rocket.Chat Cloud button, it takes me to the Authorization screen, where I receive the “error-invalid-state” error when I press the Authorize button

---

<div class="post-metadata">

**Author:** ![vaxter](https://avatars.discourse-cdn.com/v4/letter/v/e56c9b/32.png) [@vaxter](https://forums.rocket.chat/u/vaxter)\
**Post date:** [September 18, 2022, 9:27am UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/3 "2022-09-18T09:27:03Z")

</div>

Following, I have similar issue.  
Edit: After going back and forth now I have exactly the same issue!

---

<div class="post-metadata">

**Author:** ![Avsynthe](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@Avsynthe](https://forums.rocket.chat/u/Avsynthe)\
**Post date:** [September 18, 2022, 8:28pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/4 "2022-09-18T20:28:26Z")

</div>

Funnily enough I received a push notification this morning from the update thread, however I can’t install apps as it requires logging in.

---

<div class="post-metadata">

**Author:** ![vaxter](https://avatars.discourse-cdn.com/v4/letter/v/e56c9b/32.png) [@vaxter](https://forums.rocket.chat/u/vaxter)\
**Post date:** [September 25, 2022, 2:04pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/5 "2022-09-25T14:04:25Z")

</div>

Updated to 5.1.3 and still have the same issue.  
Also, messages are sent out but are still grey and not marked as sent out.  
The other side sometimes receives a notification that they have received it, but don’t get anything until they refresh.

---

<div class="post-metadata">

**Author:** ![Avsynthe](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@Avsynthe](https://forums.rocket.chat/u/Avsynthe)\
**Post date:** [September 26, 2022, 6:18am UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/6 "2022-09-26T06:18:56Z")

</div>

Here’s the server log entry upon error:

{“level”:50,“time”:“2022-09-26T06:17:22.311Z”,“pid”:1,“hostname”:“0b8fd1acb48a”,“name”:“System”,“msg”:“Exception while invoking method cloud:finishOAuthAuthorization ‘Invalid state provided [error-invalid-state]’”}

Here’s a link to the github bug:

> <https://github.com/RocketChat/Rocket.Chat/issues/26947>
>
> \### Description:
> 
> Hey guys!
> 
> I can't log in to Rocket.Chat cloud via my inst…ance.
> 
> Sync says it’s working when I press the button, which may be true, but when I click the Login to Rocket.Chat Cloud button, it takes me to the Authorization screen, where I receive the “error-invalid-state” error when I press the Authorize button
> 
> This means I can't use apps and other things that rely on this.
> 
> There was already a forum post made regarding this issue you can see here:
> 
> https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940
> 
> Along with the support thread for unRAID here:
> 
> https://forums.unraid.net/topic/61337-support-rocketchat/page/6/
> 
> I can mostly confirm that this is NOT an unRAID specific issue as a user on a different platform and using the latest version of Rocket.Chat (unavailable to us unRAIDers just yet) is also having the same issue in that thread
> 
> \### Steps to reproduce:
> 
> 1. Go to Administration
> 2. Go to Connectivity Services
> 3. Click on "Login to Rocket.Chat Cloud"
> 4. Sign in and click on "Authorize"
> 
> \### Expected behavior:
> 
> Successful login to Rocket.Chat Cloud and begin using services like apps
> 
> \### Actual behavior:
> 
> Be returned to the settings screen and receive error "error-invalid-state"
> 
> \### Server Setup Information:
> 
> Version of Rocket.Chat Server: 5.0.3
> Operating System: Unraid/Linux
> Deployment Method: docker
> NodeJS Version: 14.19.3 - x64
> MongoDB Version: 6.0.1   
> 
> 
> \### Relevant logs:
> 
> Log from server when receiving the error:
> 
> {"level":50,"time":"2022-09-26T06:17:22.311Z","pid":1,"hostname":"0b8fd1acb48a","name":"System","msg":"Exception while invoking method cloud:finishOAuthAuthorization 'Invalid state provided \[error-invalid-state\]'"}

Here’s a link to the unRAID support thread. Looks like it’s not just an unraid issue though as Vaxter is on a different platform

[https://forums.unraid.net/topic/61337-support-rocketchat/page/6/](https://forums.unraid.net/topic/61337-support-rocketchat/page/6/)

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [September 26, 2022, 4:27pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/7 "2022-09-26T16:27:49Z")

</div>

Hi!

Can you ping me at [Rocket.Chat](https://open.rocket.chat/direct/duda.nogueira) so I can take a closer look on it together with you?

The registration is usually an easy step, but a lot can go wrong from both sides, and sometimes is hard to tackle the issue only from logs.

Thanks!

---

<div class="post-metadata">

**Author:** ![vaxter](https://avatars.discourse-cdn.com/v4/letter/v/e56c9b/32.png) [@vaxter](https://forums.rocket.chat/u/vaxter)\
**Post date:** [September 28, 2022, 9:01pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/8 "2022-09-28T21:01:04Z")

</div>

{“level”:50,“time”:“2022-09-28T20:51:46.063Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“System”,“msg”:“Exception while invoking method autoTranslate.getSupportedLanguages ‘Auto-Translate is disabled [error-autotranslate-disabled]’”}  
Exception while invoking method autoTranslate.getSupportedLanguages errorClass [Error]: Auto-Translate is disabled [error-autotranslate-disabled]  
at MethodInvocation.autoTranslate.getSupportedLanguages (app/autotranslate/server/methods/getSupportedLanguages.ts:11:10)  
at MethodInvocation.methodsMap. (app/lib/server/lib/debug.js:74:34)  
at maybeAuditArgumentChecks (packages/ddp-server/livedata\_server.js:1885:12)  
at packages/ddp-server/livedata\_server.js:1803:15  
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)  
at packages/ddp-server/livedata\_server.js:1801:36  
at new Promise ()  
at Server.applyAsync (packages/ddp-server/livedata\_server.js:1800:12)  
at Server.apply (packages/ddp-server/livedata\_server.js:1739:26)  
at Server.call (packages/ddp-server/livedata\_server.js:1721:17)  
at Object.post (app/api/server/v1/misc.ts:554:27)  
at app/api/server/api.js:463:96  
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)  
at Object.\_internalRouteActionHandler [as action] (app/api/server/api.js:463:39)  
at Route.\_callEndpoint (packages/rocketchat\_restivus/lib/route.coffee:150:32)  
at packages/rocketchat\_restivus/lib/route.coffee:59:33  
at packages/simple\_json-routes.js:100:9  
=\> awaited here:  
at Promise.await (/app/bundle/programs/server/npm/node\_modules/meteor/promise/node\_modules/meteor-promise/promise\_server.js:60:12)  
at Server.apply (packages/ddp-server/livedata\_server.js:1752:22)  
at Server.call (packages/ddp-server/livedata\_server.js:1721:17)  
at Object.post (app/api/server/v1/misc.ts:554:27)  
at app/api/server/api.js:463:96  
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)  
at Object.\_internalRouteActionHandler [as action] (app/api/server/api.js:463:39)  
at Route.\_callEndpoint (packages/rocketchat\_restivus/lib/route.coffee:150:32)  
at packages/rocketchat\_restivus/lib/route.coffee:59:33  
at packages/simple\_json-routes.js:100:9 {  
isClientSafe: true,  
error: ‘error-autotranslate-disabled’,  
reason: ‘Auto-Translate is disabled’,  
details: undefined,  
errorType: ‘Meteor.Error’  
}  
{“level”:35,“time”:“2022-09-28T20:51:46.063Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“POST”,“url”:“/api/v1/method.call/autoTranslate.getSupportedLanguages”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“length”:“119”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:7}  
{“level”:35,“time”:“2022-09-28T20:51:46.065Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“Meteor”,“method”:“autoTranslate.getProviderUiMetadata”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“instanceId”:"dHfK9f7YuSr9Qr7Xk](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22instanceId%22:%22dHfK9f7YuSr9Qr7Xk)”}  
{“level”:35,“time”:“2022-09-28T20:51:46.065Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“POST”,“url”:“/api/v1/method.call/autoTranslate.getProviderUiMetadata”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“length”:“113”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:0}  
{“level”:35,“time”:“2022-09-28T20:51:46.073Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“POST”,“url”:“/api/v1/method.call/cloud:checkRegisterStatus”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“length”:“103”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:7}  
{“level”:35,“time”:“2022-09-28T20:51:46.371Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/cloud.registrationStatus”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:4}  
{“level”:35,“time”:“2022-09-28T20:51:46.413Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/licenses.isEnterprise”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:3}  
{“level”:35,“time”:“2022-09-28T20:51:46.568Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“POST”,“url”:“/api/v1/method.call/cloud:checkRegisterStatus”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“length”:“103”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:1}  
{“level”:50,“time”:“2022-09-28T20:51:46.571Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“System”,“msg”:“Exception while invoking method cloud:finishOAuthAuthorization ‘Invalid state provided [error-invalid-state]’”}  
Exception while invoking method cloud:finishOAuthAuthorization errorClass [Error]: Invalid state provided [error-invalid-state]  
at finishOAuthAuthorization (app/cloud/server/functions/finishOAuthAuthorization.js:12:9)  
at MethodInvocation.cloud:finishOAuthAuthorization (app/cloud/server/methods.js:147:10)  
at maybeAuditArgumentChecks (packages/ddp-server/livedata\_server.js:1885:12)  
at packages/ddp-server/livedata\_server.js:1803:15  
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)  
at packages/ddp-server/livedata\_server.js:1801:36  
at new Promise ()  
at Server.applyAsync (packages/ddp-server/livedata\_server.js:1800:12)  
at Server.apply (packages/ddp-server/livedata\_server.js:1739:26)  
at Server.call (packages/ddp-server/livedata\_server.js:1721:17)  
at Object.post (app/api/server/v1/misc.ts:554:27)  
at app/api/server/api.js:463:96  
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)  
at Object.\_internalRouteActionHandler [as action] (app/api/server/api.js:463:39)  
at Route.\_callEndpoint (packages/rocketchat\_restivus/lib/route.coffee:150:32)  
at packages/rocketchat\_restivus/lib/route.coffee:59:33  
at packages/simple\_json-routes.js:100:9  
=\> awaited here:  
at Promise.await (/app/bundle/programs/server/npm/node\_modules/meteor/promise/node\_modules/meteor-promise/promise\_server.js:60:12)  
at Server.apply (packages/ddp-server/livedata\_server.js:1752:22)  
at Server.call (packages/ddp-server/livedata\_server.js:1721:17)  
at Object.post (app/api/server/v1/misc.ts:554:27)  
at app/api/server/api.js:463:96  
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)  
at Object.\_internalRouteActionHandler [as action] (app/api/server/api.js:463:39)  
at Route.\_callEndpoint (packages/rocketchat\_restivus/lib/route.coffee:150:32)  
at packages/rocketchat\_restivus/lib/route.coffee:59:33  
at packages/simple\_json-routes.js:100:9 {  
isClientSafe: true,  
error: ‘error-invalid-state’,  
reason: ‘Invalid state provided’,  
details: { method: ‘cloud:finishOAuthAuthorization’ },  
errorType: ‘Meteor.Error’  
}  
{“level”:35,“time”:“2022-09-28T20:51:46.571Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“POST”,“url”:“/api/v1/method.call/cloud:finishOAuthAuthorization”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“length”:“154”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:2}  
{“level”:35,“time”:“2022-09-28T20:51:46.635Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/licenses.get”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:1}  
{“level”:35,“time”:“2022-09-28T20:51:46.689Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“Meteor”,“publication”:“stream-notify-logged”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“remoteIP”:null,“instanceId”:“dHfK9f7YuSr9Qr7Xk”}  
{“level”:35,“time”:“2022-09-28T20:51:46.798Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/licenses.isEnterprise”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:4}  
{“level”:35,“time”:“2022-09-28T20:51:46.812Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/cloud.registrationStatus”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:4}  
{“level”:35,“time”:“2022-09-28T20:51:46.830Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“POST”,“url”:“/api/v1/method.call/cloud:checkUserLoggedIn”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“length”:“101”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm\_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud/oauth-callback?code=izuXm_K4p11F1uiUCaDO&state=P7EEWmmq3BktbcaZd%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:3}  
{“level”:35,“time”:“2022-09-28T20:51:46.904Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“Meteor”,“method”:“private-settings/get”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“referer”:“[https://rocket.some.domain/admin/cloud",“remoteIP”:“178.222.13.32”,“instanceId”:"dHfK9f7YuSr9Qr7Xk](https://rocket.some.domain/admin/cloud%22,%22remoteIP%22:%22178.222.13.32%22,%22instanceId%22:%22dHfK9f7YuSr9Qr7Xk)”}  
{“level”:35,“time”:“2022-09-28T20:51:46.912Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“POST”,“url”:“/api/v1/method.call/private-settings:get”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“length”:“123”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:10}  
{“level”:35,“time”:“2022-09-28T20:51:47.161Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“Meteor”,“publication”:“stream-user-presence”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“remoteIP”:null,“instanceId”:“dHfK9f7YuSr9Qr7Xk”}  
{“level”:35,“time”:“2022-09-28T20:51:47.185Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/users.presence?ids=JjaxwzuKpzcwYrao8&ids=rocket.cat&ids=i2GspYKtRC8FXFHKf”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:9}  
{“level”:30,“time”:“2022-09-28T20:52:00.328Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“SyncedCron”,“msg”:“Starting "Generate download files for user data".”}  
{“level”:30,“time”:“2022-09-28T20:52:00.329Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“SyncedCron”,“msg”:“Finished "Generate download files for user data".”}  
{“level”:35,“time”:“2022-09-28T20:52:01.672Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/cloud.registrationStatus”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:29}  
{“level”:35,“time”:“2022-09-28T20:52:01.687Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“POST”,“url”:“/api/v1/method.call/cloud:checkRegisterStatus”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“length”:“103”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:3}  
{“level”:35,“time”:“2022-09-28T20:52:01.693Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/licenses.isEnterprise”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:16}  
{“level”:35,“time”:“2022-09-28T20:52:01.700Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/licenses.get”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:3}  
{“level”:35,“time”:“2022-09-28T20:52:05.685Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“POST”,“url”:“/api/v1/method.call/cloud:checkRegisterStatus”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15”,“length”:“103”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:7}  
{“level”:35,“time”:“2022-09-28T20:52:05.722Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/licenses.isEnterprise”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:8}  
{“level”:35,“time”:“2022-09-28T20:52:05.725Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/cloud.registrationStatus”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:28}  
{“level”:35,“time”:“2022-09-28T20:52:05.736Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“API”,“method”:“GET”,“url”:“/api/v1/licenses.get”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15”,“host”:“rocket.some.domain”,“referer”:“[https://rocket.some.domain/admin/cloud",“remoteIP”:“178.222.13.32”,“status”:200,"responseTime](https://rocket.some.domain/admin/cloud%22,%22remoteIP%22:%22178.222.13.32%22,%22status%22:200,%22responseTime)”:3}  
{“level”:35,“time”:“2022-09-28T20:52:06.880Z”,“pid”:1,“hostname”:“5e5ffe195f41”,“name”:“Meteor”,“method”:“UserPresence:online”,“userId”:“7mkwppfnTDRJsQjEF”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15”,“remoteIP”:null,“instanceId”:“dHfK9f7YuSr9Qr7Xk”}

---

<div class="post-metadata">

**Author:** ![vaxter](https://avatars.discourse-cdn.com/v4/letter/v/e56c9b/32.png) [@vaxter](https://forums.rocket.chat/u/vaxter)\
**Post date:** [September 28, 2022, 9:39pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/9 "2022-09-28T21:39:59Z")

</div>

Additional info, if it helps.  
I have tried completely removing cloud setting and my instance from workspace and registering again.  
When I paste the token I het an error and nothing happens, but once I restart the instance I can see Login to Cloud button, Sync etc, and my instance registered in workspace.  
After I click on Login to Cloud the error above appears.

---

<div class="post-metadata">

**Author:** ![vaxter](https://avatars.discourse-cdn.com/v4/letter/v/e56c9b/32.png) [@vaxter](https://forums.rocket.chat/u/vaxter)\
**Post date:** [September 29, 2022, 2:59pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/10 "2022-09-29T14:59:56Z")

</div>

Ok, I have managed to fix it on my side, after a while…  
The issue was in oplog connectivity, but Rocket logs and info were falsely showing that everything is ok.  
My issue was that my MongoDB server was in standalone mode, and oplog events are not thrown in MongoDB standalone mode, only in replica sets.  
I have just converted my mongo into a replica set and everything works now.  
After this started working Rocket.Chat was able to finish the cloud registration properly.

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [September 29, 2022, 5:25pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/11 "2022-09-29T17:25:00Z")

</div>

Glad to hear that, @vaxter!

And thanks for sharing!

---

<div class="post-metadata">

**Author:** ![Avsynthe](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@Avsynthe](https://forums.rocket.chat/u/Avsynthe)\
**Post date:** [September 29, 2022, 10:07pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/12 "2022-09-29T22:07:48Z")

</div>

Hmm. Seems like you had a different issue. My mongodb is already a replica set ☹

Edit:

This has given me an idea. I was adding the directConnection=true variable to `MONGO_URL` and `MONGO_OPLOG_URL` but I think I might be doing it wrong. First of all, I didn’t have the replicaSet=rs prefix, where my replica set is rs01. Can someone confirm if this is correct?

MONGO\_URL=mongodb://rocketchat:password@localhost:27017/rocketchat?replicaSet=rs01&directConnection=true

MONGO\_OPLOG\_URL=mongodb://rocketchat:password@localhost:27017/local?authSource=admin?replicaSet=rs01&directConnection=true

I’m not familiar with the syntax and I think the “?” or “&” somewhere might be wrong. I’ve seen the first sections of each line written differently, but this is how it’s always been written for unRAID as shown here:

[https://forums.unraid.net/topic/61337-support-rocketchat/?do=findComment&comment=1156956](https://forums.unraid.net/topic/61337-support-rocketchat/?do=findComment&comment=1156956)

---

<div class="post-metadata">

**Author:** ![Avsynthe](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@Avsynthe](https://forums.rocket.chat/u/Avsynthe)\
**Post date:** [October 10, 2022, 6:59am UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/13 "2022-10-10T06:59:12Z")

</div>

Hey all. Sorry I’ve been busy but I did end up having that chat with @dudanogueira from Rocket.Chat. Great guy btw!

The solution was to use the docker compose stack that installs rocket.chat and mongodb together. If you’re on unRAID like me, you’ll need to look at getting Docker Compose enabled first, yes it’s a thing and it works great.

Here is the compose file:

```auto
volumes:
  mongodb_data: { driver: local }
networks:
  default:
    external: false
  YOUR-CUSTOM-DOCKER-NETWORK:
    external: true

services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest}
    restart: on-failure
    labels:
      traefik.enable: "true"
      traefik.http.routers.rocketchat.rule: Host(`${DOMAIN}`)
      traefik.http.routers.rocketchat.tls: "true"
      traefik.http.routers.rocketchat.entrypoints: https
      traefik.http.routers.rocketchat.tls.certresolver: le
    environment:
      MONGO_URL: "${MONGO_URL:-\
        mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
        ${MONGODB_DATABASE:-rocketchat}?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
      MONGO_OPLOG_URL: "${MONGO_OPLOG_URL:\
        -mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
        local?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
      ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT:-3001}}
      PORT: ${PORT:-3001}
      DEPLOY_METHOD: docker
      DEPLOY_PLATFORM: ${DEPLOY_PLATFORM}
    depends_on:
      - mongodb
    expose:
      - ${PORT:-3001}
    networks:
      - default
      - YOUR-CUSTOM-DOCKER-NETWORK
    ports:
      - "${BIND_IP:-0.0.0.0}:${HOST_PORT:-3001}:${PORT:-3001}"

  mongodb:
    image: docker.io/bitnami/mongodb:${MONGODB_VERSION:-4.4}
    restart: on-failure
    volumes:
      - mongodb_data:/bitnami/mongodb
    environment:
      MONGODB_REPLICA_SET_MODE: primary
      MONGODB_REPLICA_SET_NAME: ${MONGODB_REPLICA_SET_NAME:-rs0}
      MONGODB_PORT_NUMBER: ${MONGODB_PORT_NUMBER:-27017}
      MONGODB_INITIAL_PRIMARY_HOST: ${MONGODB_INITIAL_PRIMARY_HOST:-mongodb}
      MONGODB_INITIAL_PRIMARY_PORT_NUMBER: ${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}
      MONGODB_ADVERTISED_HOSTNAME: ${MONGODB_ADVERTISED_HOSTNAME:-mongodb}
      MONGODB_ENABLE_JOURNAL: ${MONGODB_ENABLE_JOURNAL:-true}
      ALLOW_EMPTY_PASSWORD: ${ALLOW_EMPTY_PASSWORD:-yes}

```

Please note thee sections that read “YOUR-CUSTOM-DOCKER-NETWORK”, this is where you would enter the name of your custom docker network if you use one, there are two sections, one near the top and one under the “networks” parameter after the port is specified further below.

This was one and done, all working. That easily! I was able to register the server and log in to Rocket.Chat cloud from the settings menu with everything working perfectly. Good luck!

---

<div class="post-metadata">

**Author:** ![zeroeth](https://avatars.discourse-cdn.com/v4/letter/z/7ba0ec/32.png) [@zeroeth](https://forums.rocket.chat/u/zeroeth)\
**Post date:** [October 20, 2022, 3:40pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/14 "2022-10-20T15:40:12Z")

</div>

I’ve finally managed to get RC docker working on **mongo:5** with all my previous data restored successfully :).

Notifications are working now and I can connect to the Rocket.Chat cloud.

```auto
+--------------------------------------------------+
| SERVER RUNNING |
+--------------------------------------------------+
| |
| Rocket.Chat Version: 5.2.0 |
| NodeJS Version: 14.19.3 - x64 |
| MongoDB Version: 5.0.13 |
| MongoDB Engine: wiredTiger |
| Platform: linux |
| Process Port: 3000 |
| Site URL: https://my.domain.com |
| ReplicaSet OpLog: Enabled |
| Commit Hash: 08f03cc9d8 |
| Commit Branch: HEAD |
| |
+--------------------------------------------------+

```

Posting the steps I followed for anyone who might be facing a similar issue.

**#1** Stop RC and backup existing data from your current mongodb docker console

`mongodump --archive --gzip > 2022.10.15_rocketchat_mongo_server.dump.archive.gzip`

**#2** Remove the existing mongodb docker

- stop the mongodb docker
- rename the /mnt/appdata/mongodb folder to mongodb-backup
- remove the mongodb docker.

**#3** Install mongodb docker (default) with the following changes

Repository:

> mongo:5

(Advanced View)

Extra Parameters:

`--hostname mongodatabase`

Post Arguments:

`--bind_ip_all --replSet "rs0"`

**#4** Initialise ReplicaSet in mongodb

- open the console and type

> mongosh

then on the prompt

> test \>

type

`rs.initiate( { _id : "rs0", members: [{ _id: 0, host: "<YOUR-SERVER-IP>:27017" },] })`

- you should see the result as below

> test\> rs.initiate( {  
> … \_id : “rs0”,  
> … members: [  
> … { \_id: 0, host: “:27017” },  
> … ]  
> … })  
> { ok: 1 }
> 
> rs0 [direct: other] test\>
> 
> rs0 [direct: primary] test\>

**#5** Restore the backup data to the new mongodb instance

- copy the backup file from step #1 into the new mongodb appdata folder
- open the mongodb console and move into the /data/db dir
- then type

`mongorestore --archive --gzip < 2022.10.15_rocketchat_mongo_server.dump.archive.gzip`

You should see something similar to this on a successful restore (this may take a while depending on your backup file size):

> 2022-10-15T14:54:16.776+0400 159574 document(s) restored successfully. 0 document(s) failed to restore.

**#6** Edit your RC docker settings as below

MONGO\_URL

`mongodb://rocketchat:<Password>@<YOUR-SERVER-IP>:27017/rocketchat?replicaSet=rs0`

MONGO\_OPLOG\_URL

`mongodb://rocketchat:<Password>@<YOUR-SERVER-IP>:27017/local?replicaSet=rs0`

That’s it.

Start the docker and it should work! Enjoy ! 🙂

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [October 21, 2022, 1:05pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/15 "2022-10-21T13:05:41Z")

</div>

Thanks for sharing!!!

---

<div class="post-metadata">

**Author:** ![enricocirne](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@enricocirne](https://forums.rocket.chat/u/enricocirne)\
**Post date:** [November 1, 2022, 9:02pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/16 "2022-11-01T21:02:12Z")

</div>

I do have the same problem, I am unable to register my server to rocketchat, but I am not able to follow these steps.

When I try to Backup my existing Data with monogdump… from your #1 step, I do always get this error

```auto
2022-11-01T22:00:01.806+0100 Failed: error creating intents to dump: error getting database names: (Unauthorized) command listDatabases requires authentication

```

I am using Rocketchat Version 5.2.0 and MongoDB Version 6.0.2

Thanks for your help

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [November 7, 2022, 5:50pm UTC](https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940/17 "2022-11-07T17:50:12Z")

</div>

Hi! How have you deployed it?

Seems that you have some user/password and because of that it’s not authorizing connections.
