Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Rocket.Chat
  3. Rocket.Chat push notifications not working - remoteIP wrong

Rocket.Chat push notifications not working - remoteIP wrong

Scheduled Pinned Locked Moved Rocket.Chat
2 Posts 2 Posters 2.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O Offline
      O Offline
      opensourced
      wrote on last edited by
      #1

      I am running my instance of Rocket.Chat and still have not managed to get the push notifications working.

      Around one month ago, I have opened a thread in the RC forum, because I thought the error i got was more relied to their side. As I am not getting an answer there, I decided to link this one here as well.


      So I have set up my RC instance and I registered it on RC Cloud.

      The Push Gateway is enabled and set to https://gateway.rocket.chat/.

      I installed the RC apps on an iPhone, an android phone as well as on my Macbook. Finally I also managed to send test-push-notifications via the dedicated button. It tells me that it has successfully sent a test notification to 1 device. However, having checked the settings and permissions on the phones, I to not receive any notification on either of them.

      When I look at the Log I can see two suspicious entries. What is the remoteIP? The VM of the RC is NATed by a firewall and does have a dedicated public IP, which is obviously not the remoteIP. May that be the problem? How could I change this?

      {"level":35,"time":"2021-11-01T09:15:10.813Z","pid":1,"hostname":"ca5sdgh54-1a8d-4564-b816-8d3e5edffd65","name":"API","method":"POST","url":"/api/v1/method.call/push_test","userId":"So49htrw","userAgent":"Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0","length":"87","host":"rocketchat.foobar.com","referer":"https://rocketchat.foobar.com/admin/Push",**"remoteIP":"172.16.115.1"**,"status":200,"responseTime":67} {"level":50,"time":"2021-11-01T09:15:11.118Z","pid":1,"hostname":"ca35684-1a484-b816-8d3e5d65","name":"Push","msg":"Error sending push to gateway (0 try) -> {\"response\":{\"statusCode\":404,\"content\":\"404 page not found\",\"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\",\"content-length\":\"18\",\"content-type\":\"text/plain\",\"date\":\"Mon, 01 Nov 2021 09:15:11 GMT\",\"expires\":\"-1\",\"pragma\":\"no-cache\",\"x-powered-by\":\"Rocket Fuel and Rocketeers\",\"connection\":\"close\"},\"data\":null}}"} 
      

      The second entry I do not understand is this…

      {"level":50,"time":"2021-11-01T09:11:15.118Z","pid":1,"hostname":"ca54-b816-8d3edffd65","name":"Push","msg":"Error sending push to gateway (4 try) -> {\"response\":{\"statusCode\":404,\"content\":\"404 page not found\",\"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\",\"content-length\":\"18\",\"content-type\":\"text/plain\",\"date\":\"Mon, 01 Nov 2021 09:11:15 GMT\",\"expires\":\"-1\",\"pragma\":\"no-cache\",\"x-powered-by\":\"Rocket Fuel and Rocketeers\",\"connection\":\"close\"},\"data\":null}}"} {"level":30,"time":"2021-11-01T09:11:15.119Z","pid":1,"hostname":"ca5e0f54-1a4d-4594-b816-8d3e5edffd65","name":"Push","msg":"Trying sending push to gateway again in 960000 'milliseconds'"} 
      

      Follow the thread here:
      https://forums.rocket.chat/t/getting-push-notifications-to-work/12513

      Thanks in advance!

      girishG 1 Reply Last reply
      0
      • O opensourced

        I am running my instance of Rocket.Chat and still have not managed to get the push notifications working.

        Around one month ago, I have opened a thread in the RC forum, because I thought the error i got was more relied to their side. As I am not getting an answer there, I decided to link this one here as well.


        So I have set up my RC instance and I registered it on RC Cloud.

        The Push Gateway is enabled and set to https://gateway.rocket.chat/.

        I installed the RC apps on an iPhone, an android phone as well as on my Macbook. Finally I also managed to send test-push-notifications via the dedicated button. It tells me that it has successfully sent a test notification to 1 device. However, having checked the settings and permissions on the phones, I to not receive any notification on either of them.

        When I look at the Log I can see two suspicious entries. What is the remoteIP? The VM of the RC is NATed by a firewall and does have a dedicated public IP, which is obviously not the remoteIP. May that be the problem? How could I change this?

        {"level":35,"time":"2021-11-01T09:15:10.813Z","pid":1,"hostname":"ca5sdgh54-1a8d-4564-b816-8d3e5edffd65","name":"API","method":"POST","url":"/api/v1/method.call/push_test","userId":"So49htrw","userAgent":"Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0","length":"87","host":"rocketchat.foobar.com","referer":"https://rocketchat.foobar.com/admin/Push",**"remoteIP":"172.16.115.1"**,"status":200,"responseTime":67} {"level":50,"time":"2021-11-01T09:15:11.118Z","pid":1,"hostname":"ca35684-1a484-b816-8d3e5d65","name":"Push","msg":"Error sending push to gateway (0 try) -> {\"response\":{\"statusCode\":404,\"content\":\"404 page not found\",\"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\",\"content-length\":\"18\",\"content-type\":\"text/plain\",\"date\":\"Mon, 01 Nov 2021 09:15:11 GMT\",\"expires\":\"-1\",\"pragma\":\"no-cache\",\"x-powered-by\":\"Rocket Fuel and Rocketeers\",\"connection\":\"close\"},\"data\":null}}"} 
        

        The second entry I do not understand is this…

        {"level":50,"time":"2021-11-01T09:11:15.118Z","pid":1,"hostname":"ca54-b816-8d3edffd65","name":"Push","msg":"Error sending push to gateway (4 try) -> {\"response\":{\"statusCode\":404,\"content\":\"404 page not found\",\"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\",\"content-length\":\"18\",\"content-type\":\"text/plain\",\"date\":\"Mon, 01 Nov 2021 09:11:15 GMT\",\"expires\":\"-1\",\"pragma\":\"no-cache\",\"x-powered-by\":\"Rocket Fuel and Rocketeers\",\"connection\":\"close\"},\"data\":null}}"} {"level":30,"time":"2021-11-01T09:11:15.119Z","pid":1,"hostname":"ca5e0f54-1a4d-4594-b816-8d3e5edffd65","name":"Push","msg":"Trying sending push to gateway again in 960000 'milliseconds'"} 
        

        Follow the thread here:
        https://forums.rocket.chat/t/getting-push-notifications-to-work/12513

        Thanks in advance!

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        @opensourced I tried this on Android.

        I thought registering the server in the initial setup screen made things work but it didn't. What I had to do was:

        • Administration -> Connectivity Services . On top right, click Cloud console:
          c00b8bb4-526f-469d-a67e-cf784d3438bb-image.png

        • Then, I registered a new account there with my email. Verified the email. I then created a selfhosted instances to got a "token" which I had to put in the UI above.

        • After that, I Administration -> Push and clicked on Send a test push to my user . That did not work.

        • Restarted the app

        • Administration -> Push and clicked on Send a test push to my user . That worked. I got This is a push test message notification.

        1 Reply Last reply
        2
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search