question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The service is currently unavailable

See original GitHub issue

Hi @MatthieuLemoine Thank you for creating a great package. I tried to add in my project and have reference to the example project, can’t get the token failed to boot successfully, and get the error as below.


PUSH_RECEIVER:::Error while starting the service StatusCodeError: 503 - "{\n  \"error\": {\n    \"code\": 503,\n    \"message\": \"The service is currently unavailable.\",\n    \"status\": \"UNAVAILABLE\"\n  }\n}\n"
    at new StatusCodeError ($MYHOME/my-electron-app/node_modules/request-promise-core/lib/errors.js:32:15)
    at Request.plumbing.callback $MYHOME/my-electron-app/node_modules/request-promise-core/lib/plumbing.js:104:33)
    at Request.RP$callback [as _callback] ($MYHOME/my-electron-app/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at Request.self.callback ($MYHOME/my-electron-app/node_modules/request/request.js:185:22)
    at Request.emit (events.js:315:20)
    at Request.<anonymous> ($MYHOME/my-electron-app/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:315:20)
    at IncomingMessage.<anonymous> ($MYHOME/my-electron-app/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:421:28)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  statusCode: 503,
  error: '{\n' +
    '  "error": {\n' +
    '    "code": 503,\n' +
    '    "message": "The service is currently unavailable.",\n' +
    '    "status": "UNAVAILABLE"\n' +
    '  }\n' +
    '}\n',
  options: {
    url: 'https://fcm.googleapis.com/fcm/connect/subscribe',
    method: 'POST',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    form: {
      authorized_entity: '$MYSENDERID',
      endpoint: 'https://fcm.googleapis.com/fcm/send/...',
      encryption_key: '',
      encryption_auth: ''
    },
    callback: [Function: RP$callback],
    transform: undefined,
    simple: true,
    resolveWithFullResponse: false,
    transform2xxOnly: false
  },
  .....
  }

package.json
{
  "devDependencies": {
    "electron": "^13.1.4"
  },
  "dependencies": {
    "electron-push-receiver": "^2.1.3"
  }
}

It seems endpoint of FCM has changed, how to update again? Thank you very much!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:7
  • Comments:20

github_iconTop GitHub Comments

2reactions
DE-Katocommented, Jul 14, 2021

As mentioned here, we may no longer be able to invoke the FCM registration endpoint. https://github.com/MatthieuLemoine/push-receiver/issues/47#issuecomment-874251257

So, the possible (realistic) solution might be…using node-gyp, create a native addons for Google’s C++ SDK.

Or, migrate to another service, such as Pushy or something.

1reaction
koushcommented, Aug 14, 2021

@osslate I believe all 3 implementations leverage native platform APIs for push messaging. Firebase SDK does not provide a push implementation, it provides a unified way to access platform provided APIs.

The C++ API, as noted in their docs, targets the platform services.

To write your cross-platform Firebase Cloud Messaging client app with C++, use the Firebase Cloud Messaging API. The C++ SDK works for both Android and iOS, with some additional setup required for each platform.

Same with the javascript implementation, that requires the browser to support it:

The FCM JavaScript API lets you receive notification messages in web apps running in browsers that support the Push API. This includes the browser versions listed in this support matrix and Chrome extensions via the Push API.

Basically, the Android implementation needs to be reverse engineered again. It is likely just new endpoints.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The service is currently unavailable Google api - Stack Overflow
Every time I catch an API error my script waits 1 second. If the error occurs again the script waits 2 seconds. Then...
Read more >
The service is currently unavailable. Please try again later. If ...
Question · 1.Close all Internet Browsers. · 2.Click Start, click Control Panel, and then click Internet Options. · 3.Click the Connections tab, and ......
Read more >
Why do I see a "Service currently unavailable" message?
If you see this message, GoTo Meeting may be experiencing an outage. Please check our service status page for the latest updates.
Read more >
A Ubisoft Service Is Currently Unavailable [100% Working Fixes]
Watch the video to find out the step-by-step instructions to fix “A #UbisoftServiceisCurrentlyUnavailable” error and connect your #PC to ...
Read more >
How to fix "A Ubisoft Service is Currently Unavailable" error
How To Fix UPLAY "A Ubisoft Service is Currently Unavailable. Please Try Again Later" Error.1. Check the Time and Date on Your Computer.2....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found