PushClient tries to register also if Network is offline (failing...)

Bug #1430836 reported by Marco Trevisan (Treviño) on 2015-03-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Push QML
Marco Trevisan (Treviño)

Bug Description

If network is offline, PushClient fails to get the push token (while this could be cached after the first run, I guess it's something somewhat expected).

The problem with that is in order to be able to retry to register the app on failures, we need to set the PushClient.appId to a non-empty value different than the previous one (using something like a " " string and back to old appID, to workaround this is not nice)...

So, in my opinion the PushClient should try to register only when NetworkingStatus.status == NetworkingStatus::Online, to avoid errors due do missing connection.
And in any case, the user should be able to retry the registration on failures, without using appId workarounds.

I've workarounded this by using a loader bound to NetworkingStatus.online (something such as http://pastebin.ubuntu.com/10580381/), but having something like this by default in the PushClient would be nice imho.

Related branches

Changed in ubuntu-push-qml:
status: New → In Progress
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in ubuntu-push-qml:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers