Unable to access HUD on phone when launched through qtcreator

Bug #1221414 reported by Nekhelesh Ramananthan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qtcreator-plugin-ubuntu
Fix Released
Critical
Zoltan Balogh
qtcreator-plugin-ubuntu (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

It is not possible to try out HUD actions when trying an application on the phone launched through qtcreator.

Steps to reproduce:
1. Branch any development app
2. Open the branch in qtcreator.
3. Press Ctrl + F12 to run the application on a mobile device
4. Try HUD actions.

What to expect:
HUD appears with the actions provided by the application

What actually happens:
Empty HUD with no actions

Error message:
[21:28:51] unity::action::ActionManager::ActionManager(QObject*):
 Could not get session bus. Actions will not be available through D-Bus.
 Reason: Error spawning command line 'dbus-launch --autolaunch=11a8c61a5b047c99be6264275220ff68 --binary-syntax --close-stderr': Child process exited with code 1

[21:28:51] unity::action::ActionManager::ActionManager(QObject*):
 Could not determine application identifier. HUD will not work properly.
 Provide your application identifier in $APP_ID environment variable.

Related branches

summary: - Not able to access HUD on phone when launched through qtcreator
+ Unable to access HUD on phone when launched through qtcreator
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

I can confirm this. I tried with nik90's branch:
https://code.launchpad.net/~nik90/ubuntu-clock-app/add-hud-support

simply branch it, open with QtCreator and do Build -> Ubuntu Touch -> Run Application on Device

Naturally the actions don't end up to the HUD as the app is unable to access the session bus.

The other thing I see is that it seems that QtC does not set the $APP_ID env variable:
phablet 22127 1.8 7.2 195016 51592 ? Ssl 19:26 0:05 /usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene /home/phablet/dev_tmp/add-hud-support/ubuntu-clock-app.qml --desktop_file_hint=/home/phablet/.local/share/applications/ubuntu-clock-app.desktop

The proper launch command should be:
APP_ID=ubuntu-clock-app /usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene /home/phablet/dev_tmp/add-hud-support/ubuntu-clock-app.qml --desktop_file_hint=/home/phablet/.local/share/applications/ubuntu-clock-app.desktop

Changed in ubuntu-ui-toolkit:
status: New → Confirmed
affects: ubuntu-ui-toolkit → qtcreator-plugin-ubuntu
Changed in qtcreator-plugin-ubuntu:
importance: Undecided → Critical
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

Log from QtC.

affects: qtcreator-plugin-ubuntu → ubuntu-qtcreator-plugins
Zoltan Balogh (bzoltan)
Changed in ubuntu-qtcreator-plugins:
assignee: nobody → Zoltan Balogh (bzoltan)
assignee: Zoltan Balogh (bzoltan) → Juhapekka Piiroinen (juhapekka-piiroinen)
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

OK, after a wild debugging session the reason for session-bus failing is that DBUS_SESSION_BUS_ADDRESS is not set properly when run direct ssh commands.

this env var can be read on the device from ~/.cache/upstart/dbus-session

Changed in ubuntu-qtcreator-plugins:
status: Confirmed → Triaged
Zoltan Balogh (bzoltan)
Changed in ubuntu-qtcreator-plugins:
assignee: Juhapekka Piiroinen (juhapekka-piiroinen) → Zoltan Balogh (bzoltan)
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

The fix is proposed n this MR: https://code.launchpad.net/~bzoltan/qtcreator-plugin-ubuntu/fix_app_id_and_the_dbus_session_adress/+merge/184459

To verify the fix just copy the qtc_device_run_app from this branch to the /usr/share/qtcreator/ubuntu/scripts/ and see if it works the way you expect

Changed in ubuntu-qtcreator-plugins:
status: Triaged → Fix Committed
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

bzoltan: it's not "Fix Committed" before the MR is merged. :-)
I linked the branch to this bug so Jenkins can update the bug status as it goes along doing it's job.

Changed in ubuntu-qtcreator-plugins:
status: Fix Committed → In Progress
Changed in qtcreator-plugin-ubuntu:
assignee: nobody → Zoltan Balogh (bzoltan)
importance: Undecided → Critical
status: New → Fix Committed
Changed in ubuntu-qtcreator-plugins:
status: In Progress → Invalid
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-qtcreator-plugins
Zoltan Balogh (bzoltan)
Changed in qtcreator-plugin-ubuntu:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtcreator-plugin-ubuntu - 2.7.2-0ubuntu2

---------------
qtcreator-plugin-ubuntu (2.7.2-0ubuntu2) saucy; urgency=low

  [ Zoltan Balogh ]
  * Fix app id and the dbus session adress (LP: #1221414).
  * Use pkcon to install click packages (LP: #1223014)

  [ Timo Jyrinki ]
  * Add Cordova dependencies to the Cordova plugin (LP: #1209385)
  * Recommend ubuntu-sdk from qtcreator-plugin-ubuntu (LP: #1198084)
 -- Timo Jyrinki <email address hidden> Mon, 16 Sep 2013 08:58:21 +0300

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

Other bug subscribers

Bug attachments

Remote bug watches

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