3

All of a sudden, we are getting an error authenticating with Nest and Firebase. The error code is 9999, and the message is "blocked". The source code has not changed on the app side, so it seems like something has changed on the server side.

I see a similar issue here, however they are getting a message of "too many requests", instead of "blocked".

Can anyone help us resolve this issue? Thanks.

Community
  • 1
  • 1
kwahn
  • 2,118
  • 2
  • 21
  • 17
  • Hi David, thanks for the response. So you are sure the error is the same as "too many requests"? It seems the error code 9999 may be used for multiple types of errors. – kwahn Mar 02 '15 at 22:33
  • I am getting the same problem all of sudden. Client is Firebase for node.js and when calling `authWithCustomToken` I am getting error `{"code":"BLOCKED"}`. – Kuba Wyrostek Mar 04 '15 at 15:43
  • Ah, not a dup, @Lionel has the correct answer below. Deleted my comment to avoid confusion. – David W. Keith Mar 04 '15 at 20:09

1 Answers1

3

This error occurs when you have too many concurrent open connections to Nest using the same access token. This is a different issue to "too many requests" issue which, as indicated, is to protect the battery in the thermostat.

It seems that you may be opening up Firebase or REST streaming connections and not closing them properly before opening up a new connection. Once a Firebase connection is open you should use this connection for reading and writing any new data and open a new connection only if when this connection is severed.

Could you please post sample code on how you are handling opening, closing and using the connections? Your sample code will help analyze the specifics of the issue.

  • Thank you! This response should help us narrow in on the source the of problem. We have an iOS app, Android app, and web server all talking to Nest, so it's a little complicated. Hypothetically, if we fix the problem, how long should it take to become "unblocked"? – kwahn Mar 03 '15 at 13:22
  • Problem should only be occurring once you reach the limit and only for those attempted connections which exceed the limit. – Lionel Iorgulescu Mar 03 '15 at 23:32
  • How do we we "unblock" those accounts? – kwahn Mar 04 '15 at 16:01
  • What is this limit exactly? Regarding "post sample code on how you are handling opening, closing and using the connections" all I do is instantiating `new Firebase()` and attaching to `on()` data events. Finally process simply exits (except the cases where it is killed). According to this: http://stackoverflow.com/questions/27641764/how-to-destroy-firebase-ref-in-node it should be enough. Can some lingering connections (in case when process is killed or if `process.exit()` is not enough) harm my Nest access limit? – Kuba Wyrostek Mar 04 '15 at 16:15
  • Currently having this issue for days now, and trying to get myself unblocked (not touching it), but this does not solve it. I am using the Nest iOS SDK (code loosely based on the example). But in the example code there is no reference to "closing connections" – Wim Haanstra Mar 05 '15 at 09:02