Hi, Aleksander,
I don't want to speculate on the structure of your code, but it would be easier to answer your question, if you provided a snippet.
In general, some errors are returned inside of the callback in runtime.lastError, and it should be the first thing you checkin the callback.
Second, if you are implementing a new application using push messaging in Chrome, please take a look at chrome.gcm API:
https://developer.chrome.com/extensions/gcm, as pretty soon chrome.pushMessaging is not going to be supported.
If you have existing application we can help you make the conversion.
Thanks.
Filip