Running app from QtCreator wipes associated accounts

Bug #1577002 reported by Michael Zanetti
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Client Developer Experience
Confirmed
High
Zoltan Balogh
Online Accounts setup for Ubuntu Touch
Invalid
High
Alberto Mardegan
apparmor (Ubuntu)
New
Undecided
Unassigned
unity-scopes-api (Ubuntu)
New
Undecided
Unassigned

Bug Description

Developing an app that uses Online Accounts, every time you run the app on the device, it will remove all the associated Online Accounts. This requires you to type the login credentials again and again with the OSK on every test run.

affects: qtcreator-plugin-ubuntu → qtcreator-plugin-ubuntu (Ubuntu)
Revision history for this message
Alberto Mardegan (mardy) wrote :

See bug 1454210 for history :-)

Michael, can you please try installing the newer version of the package with pkcon, without using QtCreator? Just to understand whether the issue is in Online Accounts or Qtc.

Changed in ubuntu-system-settings-online-accounts:
status: New → Incomplete
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Ok. I tried to manually install pkcon. it does not wipe the account. I have "Uninstall application after it finished" unchecked in QtCreator. Verified that the application does stay around. Nevertheless, upon a reinstall with QtC the account is wiped.

Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

After quickly checking the app launcher that is used by the SDK IDE it turns out that we have to uninstall the application if it is already installed. This workaround was required to support scopes.
Since there is no other way to make sure a scope is stopped , so that the next query would use the newly
installed binary, it was the only possibility to make it work.

So I would suggest that either the reinstall of a scope should make sure the currently installed scope
is properly reset, or alternatively provide a DBUS callback to "stop" a scope.

Revision history for this message
dobey (dobey) wrote :

This is a bug in online-accounts. I just verified on my phone with Untappd.

When uninstalling the application, online-accounts is somehow triggered and deletes the account, as there are no more applications currently using it. This is in error, as uninstalling an app should not delete user data, of which the account is. I think this is a regression too, as I don't remember that it used to do this. If the UI is unable to display an account because the plug-in is no longer available, that is fine, but I don't think it should be deleted from the database.

Changed in ubuntu-system-settings-online-accounts:
status: Incomplete → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in qtcreator-plugin-ubuntu (Ubuntu):
status: New → Confirmed
dobey (dobey)
Changed in qtcreator-plugin-ubuntu (Ubuntu):
status: Confirmed → Invalid
Changed in canonical-developer-experience:
assignee: nobody → David Barth (dbarth)
importance: Undecided → High
status: New → Confirmed
Changed in ubuntu-system-settings-online-accounts:
assignee: nobody → Alberto Mardegan (mardy)
importance: Undecided → High
Revision history for this message
Alberto Mardegan (mardy) wrote :

The behaviour is correct: accounts are configuration data, and should be removed as described in bug 1358294. (Rodney, I can see that you disagree, but until you convince design that this is wrong, this is going to stay as it is now)
See also bug 1499971 and 1358294.

Note that the accounts we are talking about here are only those whose plugin was shipped by the application itself.

The solution for this bug is described in comment #3.

Changed in ubuntu-system-settings-online-accounts:
status: Confirmed → Invalid
Changed in qtcreator-plugin-ubuntu (Ubuntu):
status: Invalid → Confirmed
Zoltan Balogh (bzoltan)
no longer affects: qtcreator-plugin-ubuntu (Ubuntu)
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

The fix for this issue would be that scopes are stopped when upgraded. Then the SDK can stop uninstalling them.

From the point of the SDK there is no difference between applications and scopes. A project and so a click package can contain either of them or even both.

Changed in canonical-developer-experience:
status: Confirmed → Invalid
Revision history for this message
Michael Zanetti (mzanetti) wrote :

This is still an issue. It's not invalid. We're just unable to agree on the solution, but that doesn't fix the problem.

Changed in canonical-developer-experience:
status: Invalid → New
status: New → Confirmed
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Here's a summary of this:

* the SDK needs to uninstall apps before deploying because of mainly 2 reasons:
  -> scopes cannot be restarted otherwise
  -> apparmor profile changes are not registered by apparmor otherwise
* OA thinks it must clear all the credentials when an app using them is uninstalled
  -> This is due to bug 1358294 which afaict hasn't reached a conclusion either because of different opinions. OA developers are of the opinion that data should be removed upon uninstallation.

The combination of those two leaves us with this issue. The solutions could be any of:

a) Fix the scopes framework and apparmor to restart/reparse things when an app is re-installed without prior removal
b) don't delete account data on app removal

While I personally am of the opinion that anything created by the user (including account data) should *never* be deleted without the user triggering that explicitly himself, it seems a) would be the more correct solution.

Adding scopes and apparmor to this bug.

Revision history for this message
Zoltan Balogh (bzoltan) wrote :

This is a valid case and an severe problem. But it is not a Developer Experience bug. The SDK is following what the scope framework does.

The SDK will stop uninstalling the click packages once it is possible to properly upgrade scopes and apparmor profile changes.

no longer affects: canonical-developer-experience
Zoltan Balogh (bzoltan)
Changed in canonical-developer-experience:
status: New → Invalid
assignee: nobody → Zoltan Balogh (bzoltan)
importance: Undecided → High
status: Invalid → Confirmed
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.