App is not installed after credentials are introduced

Bug #1563007 reported by Víctor R. Ruiz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Alejandro J. Cura
unity-scope-click (Ubuntu)
Fix Released
Critical
dobey

Bug Description

Test case.
- Remove your Ubuntu One account
- Go to App Store and select an app to install (e.g. Terminal)
- Introduce your credentials

Expected result.
- App is intalled.

Actual result.
- App is not installed

current build number: 66
device name: frieza

Related branches

Revision history for this message
Allan LeSage (allanlesage) wrote :

Not seeing this in r287 (current) arale FWIW.

tags: added: regression-proposed
Changed in canonical-devices-system-image:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Alejandro J. Cura (alecu)
milestone: none → ww08-2016
Revision history for this message
Víctor R. Ruiz (vrruiz) wrote :

I can reproduce this with krillin.

current build number: 297
device name: krillin
channel: ubuntu-touch/rc-proposed/bq-aquaris.en

Also saw this in dbus.log (related?):

2016-03-29 12:04:42,846 - CRITICAL - Error occurred creating token: 0 (Network::OnReply: empty payload, giving up.)
2016-03-29 12:05:26,444 - WARNING - OAuth token received for "Ubuntu One @ ubuntu-phablet"
Activating service name='com.google.code.AccountsSSO.SingleSignOn'
Successfully activated service 'com.google.code.AccountsSSO.SingleSignOn'
2016-03-29 12:05:27,210 - WARNING - Attempted to deliver an event to a non-existent window, ignoring.
2016-03-29 12:05:27,213 - WARNING - Attempted to deliver an event to a non-existent window, ignoring.
QProcess: Destroyed while process ("/usr/bin/online-accounts-ui") is still running.

Revision history for this message
Víctor R. Ruiz (vrruiz) wrote :

unity8-dash.log (I didn't cancel):

RequestAccess failed: QDBusError("com.ubuntu.OnlineAccountsUi.UserCanceled", "Canceled")

Revision history for this message
Víctor R. Ruiz (vrruiz) wrote :

Online Accounts' service log: http://paste.ubuntu.com/15551027/

Revision history for this message
Víctor R. Ruiz (vrruiz) wrote :

There is a crash on the scope's side.

Revision history for this message
Alberto Mardegan (mardy) wrote :

It looks like the UbuntuOne plugin is quitting without emitting the finished() signal.

Revision history for this message
dobey (dobey) wrote :

@mardy How are you determining that exactly?

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ubuntuone-credentials (Ubuntu):
status: New → Confirmed
Changed in unity-scope-click (Ubuntu):
status: New → Confirmed
Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

I'm accustomed to the store sometimes taking a few tries to install an app, but this issue is new and leads to the crash as described.

Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

FWIW, I'm getting a similar crash on arale rc-proposed 289... except the crash happens merely by tapping on an app to view the details. No U1 login attempt is required. I'm not sure if it's the same bug or not, but it's a crash in the same component.

https://errors.ubuntu.com/oops/8621d07e-f5f4-11e5-9852-fa163e30221b

I think I saw this earlier and thought it was the usual network / server timeout issue, but a closer look shows it's not.

Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

I tried to determine when this started happening.

* krillin rc-proposed 270 (2016-03-01): works.
* arale rc-proposed 270 (2016-03-15.1): works.
* krillin rc-proposed 285 (2016-03-17.1): works.
* arale rc-proposed 280 (2016-03-22.0): the app 'install' button appears to do nothing at all, except for making the device vibrate a little.
* arale 286 (2016-03-25): works.
* krillin 293 (2016-03-25): works.
* krillin 294 (2016-03-25): works.
* krillin 295 (2016-03-25): works.
* arale 287 (2016-03-26): it stalled at 0% during install on the first try but there was no crash.
* krillin 296 (2016-03-26): crashed just after U1 login, but worked when I tried on this rev yesterday.
* arale 288 (2016-03-29): crashed just after U1 login.
* arale 289 (2016-03-29): worked (but earlier crashed by simply tapping an app to view details).

My conclusion is that the change was most likely sometime in the past few days, but the behavior isn't consistent. I'm not sure why it sometimes works, sometimes crashes while loading app details, and sometimes crashes after U1 login. Some suspects include:
* https://requests.ci-train.ubuntu.com/#/ticket/1177
* https://code.launchpad.net/~dobey/unity-scope-click/unsign-reviews
* unity-scope-click changed from 0.1.1+15.04.20160321-0ubuntu1 to 0.1.1+15.04.20160325-0ubuntu1
* pay-ui changed from 15.10+15.04.20160311-0ubuntu1 to 15.10+15.04.20160324.1-0ubuntu1

http://people.canonical.com/~lzemczak/landing-team/ubuntu-touch/rc-proposed/bq-aquaris.en/krillin/296.commitlog
http://people.canonical.com/~lzemczak/landing-team/ubuntu-touch/rc-proposed/meizu.en/arale/287.commitlog

Revision history for this message
Alberto Mardegan (mardy) wrote :
Download full text (4.2 KiB)

I tried to reproduce the bug while keeping the following command running on the terminal:
    OAU_LOGGING_LEVEL=2 OAU_DAEMON_TIMEOUT=9999 U1_DEBUG=1 online-accounts-service

And here's the output:

===============
ui-server.cpp 103 onDataReady QMap(("code", QVariant(QString, "process") ) ( "data" , QVariant(QVariantMap, QMap(("pid", QVariant(uint, 2973) ) ( "provider" , QVariant(QString, "ubuntuone") ) ( "serviceType" , QVariant(QString, "ubuntuone") ) ( "windowId" , QVariant(uint, 2973) ) ) ) ) ( "id" , QVariant(int, 0) ) ( "interface" , QVariant(QString, "com.ubuntu.OnlineAccountsUi") ) ( "profile" , QVariant(QString, "unconfined") ) )
file not found: "/home/phablet/.local/share/accounts/applications/.application"
qml: Page_QMLTYPE_24(0xe644f0)"Ubuntu One": In Ubuntu.Components 1.3, the use of Page.title, Page.flickable and Page.head is deprecated. Use Page.header and the PageHeader component instead.
file:///home/phablet/.local/share/accounts/qml-plugins/ubuntuone/Main.qml: File not found
2016-03-30 11:37:04,179 - DEBUG - request.cpp 115 setWindow Requesting window reparenting
2016-03-30 11:37:04,180 - WARNING - QWindow::fromWinId(): platform plugin does not support foreign windows.
2016-03-30 11:37:04,556 - WARNING - Got invalid serialized mime data. Ignoring it.
2016-03-30 11:37:36,558 - DEBUG - Network::OnReply from QUrl( "https://login.ubuntu.com/api/v2/tokens/oauth" ) status: 401
2016-03-30 11:37:36,625 - DEBUG - Network::OnReply from QUrl( "https://login.ubuntu.com/api/v2/tokens/oauth" ) status: 401
2016-03-30 11:37:36,629 - CRITICAL - Error occurred creating token: 0 (Network::OnReply: empty payload, giving up.)
2016-03-30 11:38:20,984 - DEBUG - Network::OnReply from QUrl( "https://login.ubuntu.com/api/v2/tokens/oauth" ) status: 200
2016-03-30 11:38:20,990 - WARNING - OAuth token received for "Ubuntu One @ ubuntu-phablet"
2016-03-30 11:38:21,003 - DEBUG - in storeToken(): no accounts found in accountList, creating new
2016-03-30 11:38:21,008 - DEBUG - storeToken() : creating new Identity for account 0
2016-03-30 11:38:21,239 - DEBUG - in UbuntuOneCredentialsService::handleCredentialsStored
2016-03-30 11:38:21,243 - DEBUG - ====== PLUGIN FINISHED ======
2016-03-30 11:38:21,244 - DEBUG - provider-request.cpp 176 onDenied
2016-03-30 11:38:21,262 - WARNING - Attempted to deliver an event to a non-existent window, ignoring.
2016-03-30 11:38:21,262 - WARNING - Attempted to deliver an event to a non-existent window, ignoring.
2016-03-30 11:38:21,266 - DEBUG - ui-server.cpp 86 ~UiServerPrivate
ui-proxy.cpp 377 ~UiProxy
mir-helper.cpp 151 session_event_callback Prompt Session state updated to 0
QProcess: Destroyed while process ("/usr/bin/online-accounts-ui") is still running.
===============

So, in this case (and this is different from Victor's logs, so there might actually be several different issues here), the plugin correctly emits the finished() signal. However, the "onDenied" message shows that the account creation was not completed successfully.
The creation is considered to be successful if the value of "account.accountId" (where "account" is the object passed by online-accounts-ui to the plugin) is greater...

Read more...

Revision history for this message
Alberto Mardegan (mardy) wrote :

I'm afraid that my analysis above was a bit off. I've attached a branch which fixes the issue above (as well as another minor issue when creating the account from the System Settings, where the view would not return back to the account list), and I strongly recommend to land that, sooner or later.

However, that does not fix the app installation issue: even with my suggested fix, sometimes the app installation does not proceed, and we eventually get an empty scope page. Unfortunately, every time I try to debug the scope the installation is succeeding, but I'll keep trying...

Revision history for this message
dobey (dobey) wrote :

If the account plug-in is doing something wrong then that is a separate bug and not related to this one. It is most likely related to some of the other recent problems, most likely caused by changes in QtNetwork.

Revision history for this message
dobey (dobey) wrote :

Nothing about ubuntuone-credentials is related to the cause of this bug.

Changed in ubuntuone-credentials (Ubuntu):
status: Confirmed → Invalid
dobey (dobey)
no longer affects: ubuntuone-credentials (Ubuntu)
dobey (dobey)
Changed in unity-scope-click (Ubuntu):
assignee: nobody → Rodney Dawes (dobey)
status: Confirmed → In Progress
importance: Undecided → Critical
Revision history for this message
Alejandro J. Cura (alecu) wrote :

The linked branch that reverts the signing of every url seems to fix the problem.

Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Changed in canonical-devices-system-image:
importance: High → Critical
Changed in canonical-devices-system-image:
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.04.20160330-0ubuntu1

---------------
unity-scope-click (0.1.1+16.04.20160330-0ubuntu1) xenial; urgency=medium

  * Revert the change to sign all requests, as it exposes some
    consistent crashing. (LP: #1563007)

 -- Rodney Dawes <email address hidden> Wed, 30 Mar 2016 14:49:43 +0000

Changed in unity-scope-click (Ubuntu):
status: In Progress → 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

Remote bug watches

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