Allow re-registering for push with same appId

Bug #1415995 reported by Michał Karnicki
8
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-push (Ubuntu)
New
Undecided
Unassigned

Bug Description

Steps to reproduce:
- implement an example, with the proper appId set on the PushClient
- make sure the U1 account is not configured
- run the application

At this point, push should NOT be working.

- put the app in background, but do not kill it
- go configure U1 account
- go back to the running example application

Expected:
Push should start working immediately.

Actual:
Push does not work. The application requires re-start to register for push.

Problem: (example reference source: http://paste.ubuntu.com/12191073/ )
The token in PushClient is not generated when the appId is set (line 86).
This requires setting the appId to some other incorrect value (line 85) to trigger appIdChanged signal, which in turn requests the push token. If same value (appId) is set, the value is considered "the same", and the app does not register for push correctly.

For instance, currently Telegram (if still unregistered during this session*) sets the appId to a random hardcoded string, and then re-sets it with a proper app name just to force through the "same value" check in PushClient, which in turn requests a token for that PushClient instance, at which point we can register for push with Telegram.

* it is suggested to register for push ~daily, we register on app start

Roberto Alsina (ralsina)
Changed in ubuntu-push:
assignee: nobody → Roberto Alsina (ralsina)
Revision history for this message
Michał Karnicki (karni) wrote :

I believe this is fixed already, right?

Changed in libqtelegram:
status: New → Triaged
importance: Undecided → High
assignee: nobody → XiaoGuo, Liu (liu-xiao-guo)
Revision history for this message
Michał Karnicki (karni) wrote :

Updated description to ease testing.

description: updated
Revision history for this message
Michał Karnicki (karni) wrote :

liuxg, would you mind giving this another try? Hopefully it is more descriptive now.

ralsina, do you perhaps know this has been already fixed or not? Thanks.

Revision history for this message
Michał Karnicki (karni) wrote :

Any updates on this?

Revision history for this message
Michał Karnicki (karni) wrote :

No activity on this one. Removing from Telegram bug list, but should be fixed to improve developer experience.

no longer affects: telegram-app
Changed in ubuntu-push:
assignee: Roberto Alsina (ralsina) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-push (Ubuntu):
status: New → Confirmed
affects: ubuntu-push → ubuntu-push (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.