App won't open from click scope if it got updated in meantime

Bug #1594874 reported by Michael Terry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Medium
Alejandro J. Cura
unity-scope-click (Ubuntu)
Fix Released
Medium
dobey

Bug Description

0) Have an app installed that has an available update from the store
1) Open that app's preview in the click scope
2) Update the app in System Settings
3) Click "Open" in the click scope's app preview
4) Note that the app tries to open, but never does

Presumably, this is because the click scope is providing a full appid including a version. Either the app preview needs to refresh when an update is installed or it needs to provide an appid without a version.

Related branches

Revision history for this message
dobey (dobey) wrote :

This is because dash previews are static, and you have one open which contains old data. There is no way to refresh a preview. When updates are installed via system-settings, a refresh request is emitted for the apps scope, but the shell only performs this refresh when you return to the results view. It does not refresh previews.

Changed in unity-scope-click (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Michael Terry (mterry) wrote :

Refreshing the preview is appropriate and good—the icon or description may have changed. And it will reduce the surface of this bug.

But I suspect that the race condition between clicking on Open and a refresh and the new click being registered will be unavoidable. I think it would still make sense for the click scope to not include a version in its appid URL.

Revision history for this message
Michael Terry (mterry) wrote :

And mightn't the same problem happen on the click scope main list too? Haven't tested that, but if they include the version, I assume you could launch an app right before the refresh happens?

dobey (dobey)
Changed in unity-scope-click (Ubuntu):
assignee: nobody → Rodney Dawes (dobey)
Revision history for this message
dobey (dobey) wrote :

Well, so much for not having the version in the application:/// URL. Apparently it doesn't work. Not sure if it's unity-scopes-shell that's failing there, unity8, or ubuntu-app-launch though.

Revision history for this message
Michael Terry (mterry) wrote :

Looking at the MP real quick, you need the .desktop at the end of the application:/// URL. url-dispatcher doesn't actually look for a .desktop file itself, but it does ignore any application: URLs that don't end in .desktop. It strips it before passing the appid on.

Revision history for this message
dobey (dobey) wrote :

I suspect the problem lies a bit deeper than just having the .desktop there for url-dispatcher:

phablet@ubuntu-phablet:~$ ubuntu-app-launch com.canonical.calendar_calendar

** (process:22374): WARNING **: Unable to find keyfile for application 'com.canonical.calendar_calendar'

Revision history for this message
Michael Terry (mterry) wrote :

Well you have more success if you use com.ubuntu.calendar instead of com.canonical.calendar. But then you just hit this weird bug where unity8 acts like it's starting the app but never does?

But yeah, looks like url-dispatcher and ubuntu-app-launch don't handle short appids very well. I had thought they did... But I think it makes sense to fix that.

Revision history for this message
dobey (dobey) wrote :

Ah right, it should be com.ubuntu, but it prints the same errors.

I've added ual and url-dispatcher to this bug now.

affects: unity-scopes-shell (Ubuntu) → ubuntu-app-launch (Ubuntu)
Revision history for this message
dobey (dobey) wrote :

Found a way to make it work without changing url-dispatcher or libual.

Changed in unity-scope-click (Ubuntu):
status: Confirmed → In Progress
no longer affects: url-dispatcher (Ubuntu)
no longer affects: ubuntu-app-launch (Ubuntu)
Changed in canonical-devices-system-image:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Alejandro J. Cura (alecu)
milestone: none → 13
dobey (dobey)
Changed in unity-scope-click (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-scope-click - 0.1.1+16.10.20160808-0ubuntu1

---------------
unity-scope-click (0.1.1+16.10.20160808-0ubuntu1) yakkety; urgency=medium

  * Use shortened appid for click app launching url. (LP: #1594874,
    #1600593)
  * Remove some old unused code that is not needed any longer. (LP:
    #1289526)

 -- Rodney Dawes <email address hidden> Mon, 08 Aug 2016 15:12:29 +0000

Changed in unity-scope-click (Ubuntu):
status: Fix Committed → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers