Question

I've lunched the PubNub sample Android app and it works fine. Yet with my own pub/sub/secret keys, it doesn't. While with Javascript in Chrome it works fine using my own keys. On Android i'm getting error "publish timed out" constantly. Is it a known issue? How do I make it work?

Was it helpful?

Solution

Publish Timed Out Error on PubNub Network

This is an unhelpful error which is returned from the error callback within the PubNub Android SDK via Publish. The error reporting service is being upgraded currently and will provide better feedback for debugging. Currently the known errors which will occur on publish are the following:

Common Error Reasons

  1. Invalid JSON
  2. Message Too Large
  3. Invalid Publish Key or Subscribe Key
  4. Incorrect Origin

Note that because the error reporting service will always return "publish timed out", the actual error may be any of the above.

Valid JSON may be in the form of a "String", 123 (number), [1,2,3] (array) or an { 'object' : 'data } (object).

Messages can be up to 32K in size! We charge based on your average usage not your peaks. Also, make sure to double check your API Keys are in the correct order

PubNub is on Mashape! Visit our API Playground - https://www.mashape.com/pubnub/pubnub-network/ - and learn about some of the REST Endpoints available on the PubNub Global Real-time Network.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top