Nexus 5 won't show after OTA 2 Dekko notifications #268

Open
MK1973 opened this Issue Sep 25, 2017 · 7 comments

Comments

Projects
None yet
5 participants

MK1973 commented Sep 25, 2017

  • Device:Hammerhead
  • Channel:15.04 - armhf (20170923)
  • Build:r2

Steps to reproduce

  1. install Dekko 2 v0.1.3 (23.09.17) e-mail client
  2. create/set up google account
  3. enable notifications in Mail settings and Systems settings

Expected behavoir

with each new email should appear on the top bar new notifications

Actual behavior

The notifications do not appear after OTA 2 update, before it worked perfect.
In accordance to Dan Chapmann this isn't a dekko bug, that output is only shown after it had been executed by dekko's push-helper that's the last point dekko touches it. The process goes

  1. New mail arrives
  2. Create notification message
  3. Post it (which is "POST SUCCESS" in the dekkod-notify log)
  4. Postal services passes the message back to the dekko push-helper which formats the message (you see the output of this in ubuntu-push-client log)
  5. System takes the message to display the notification

pucsh_client_logfile1
push_client_logfile2
dekkod_notify_logfile

Logfiles and additional information

...

dpniel commented Sep 25, 2017

This is affecting a few users but not myself and I haven't been able to reproduce. I've had a steady stream of notifications with no real issues since OTA-2.

Looking at the logs @MK1973 provided me Dekko is successfully passing the message to the ubuntu-push-client and looking at the ubuntu-push-client log I can see that it is also passed through the push-helper fine which just runs a cp $1 $2 as the notification message is already formatted.

So somewhere after this point in the ubuntu-push-client i presume the notification is being dropped for some reason and not being shown. There is some errors in the push-client log about not being able to find the unity windowstack service, but that shouldn't stop the notification anyway. as thats used to stop notifications from displaying when the receiving app is the currently focused app.

dpniel commented Sep 25, 2017

For anyone affected by this it would be handy to see the dbus activity compared with a working device.

Here is a working log: dbus-monitor.log

Steps to get log:

  1. ssh into your device using phablet-shell or adb shell
  2. run dbus-monitor
  3. Send yourself an email to generate a notification
  4. Watch the log for dbus activity similar to my log and copy it from your terminal

This we should be able to see the communication flow between the various services and where it stops.

@MK1973 MK1973 closed this Sep 26, 2017

MK1973 commented Sep 26, 2017

enclosed requested dbus-monitor log file from my Nexus 5. Test e-mail subject: Dekko-notify-test

dpniel commented Sep 26, 2017

Found the culprit.

The issue here is in url-dispatcher and more than one app registering for the same url scheme. Which in this case is dekko:// (but would be the same for any other app with url handlers).

As you can see below ubuntu-push-client tests the action url of the notification with url-dispatcher which in turn returns the click app id of the first app to register handling this scheme which then doesn't match the app id for the notification. So it ultimately halts the notification from progressing

method call sender=:1.69 -> dest=com.canonical.URLDispatcher serial=73 path=/com/canonical/URLDispatcher; interface=com.canonical.URLDispatcher; member=TestURL
   array [
      string "dekko://notify/1/6/1270"
   ]
method return sender=:1.11 -> dest=:1.69 reply_serial=73
   array [
      string "dekko.dekkoproject_dekko_0.6.20"
   ]

The ideal solution here would be for url-dispatcher to prompt the user when more than one app is registered for a scheme to select which app to use for the url request and optionally always use that app. Similar to how android does this.

I can work around this for now in dekko but something needs to be implemented at some point as there will be more apps at some point which support the same scheme. http/https for instance.

mardy commented Sep 27, 2017

@Flohack74 would you have time to import https://launchpad.net/url-dispatcher into github?
If you do, please notice that we don't want the latest commits, it should be imported up to revision 121 only. But if you don't know how to do it it's fine, we can revert the last couple of commits later.

Owner

Flohack74 commented Sep 27, 2017

Hey @mardy I can do that. Still we need to talk with @mariogrip how I can add this and other stuff to the CI train ;)

@Flohack74 Flohack74 added the bug label Sep 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment