Snap apps keep asking installing ubuntu-app-platform and connecting platform interface (stale mount namespace)

Bug #1671421 reported by XiaoGuo, Liu
24
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Ubuntu App Platform
Invalid
Undecided
Unassigned
snapd
Fix Released
Medium
Unassigned
snapd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The problem is that my app keeps giving me the following error message:

$ ubuntu-webapp
You need to connect this snap to the ubuntu app platform snap.
You can do this with those commands:
snap install ubuntu-app-platform
snap connect ubuntu-webapp:platform ubuntu-app-platform:platform

Using "snap interfaces" command, it shows that the platform interface is auto-connected after the app is installed and it does not need to have a manual connection. The ubuntu-app-platform package is also installed on the system

I have a sample project using the platform interface for launching a website. My sample app is at:

https://github.com/ubuntu/snap-tutorials-code/tree/master/webapp-ubuntu/final

To produce the problem:

1) change the confinement from strict to devmode
2) build the application and run it
3) change the confinement from devmode to strict
4) build the application and run it

You will be able to see the problem. The only solution is to use the following command:

sudo /usr/lib/snapd/snap-discard-ns ubuntu-webapp

to clear the namespace firstly, then followed by a re-installation. It starts to work correctly. If there is no re-installation, even the namespace has been cleared, the application still crashes

If I do not do a re-installation after clearing the namespace, I get a Segmentation fault like:

=================================================
liuxg@liuxg:~/webapp-ubuntu$ ubuntu-webapp
QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries.
qml: Loading webview on /home/liuxg/snap/ubuntu-webapp/x3/.local/share/snap
QQmlExpression: Expression file:///snap/ubuntu-webapp/x3/usr/share/webbrowser-app/webcontainer/WebApp.qml:288:25 depends on non-NOTIFYable properties:
unity::action::qml::ActionManager::globalContext
Segmentation fault (core dumped)
=================================================

Thanks & best regards,
XiaoGuo

description: updated
description: updated
Changed in ubuntu-app-platform:
status: New → Invalid
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
fcole90 (fcole90) wrote :

I confirm this issue also on Artful. I tried installing fcole90-hexgl-webapp and it keeps asking me about this.

summary: - app keeps asking installing ubuntu-app-platform and connecting platform
- interface
+ Snap apps keep asking installing ubuntu-app-platform and connecting
+ platform interface
Revision history for this message
fcole90 (fcole90) wrote : Re: Snap apps keep asking installing ubuntu-app-platform and connecting platform interface

Using the command sudo /usr/lib/snapd/snap-discard-ns $APP_NAME fixes the issue.

fcole90 (fcole90)
tags: added: artful julyshakedown
Revision history for this message
Michael Vogt (mvo) wrote :

The discard-ns will happen automatically once https://github.com/snapcore/snapd/pull/4329 lands.

Michael Vogt (mvo)
Changed in snapd:
status: New → In Progress
importance: Undecided → Medium
summary: Snap apps keep asking installing ubuntu-app-platform and connecting
- platform interface
+ platform interface (stale mount namespace)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This is now handled automatically. It will be a part of the 2.31 release.

Changed in snapd:
status: In Progress → Fix Committed
Changed in snapd (Ubuntu):
status: Confirmed → Fix Committed
Changed in snapd:
status: Fix Committed → Fix Released
Changed in snapd (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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