snaps of webapps

Bug #1651812 reported by fcole90 on 2016-12-21
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
webapp-container
Undecided
Alberto Mardegan

Bug Description

In the past I created some webapps for ubuntu, which are currently published as click packages. In the future, AFAIK click are going to be retired, so I would like to have a proper way to repackage them into snaps.

I think having them as snaps should preserve things like being or not fullscreen, allowing or not to display back and forward buttons, eventual user agent overrides and all the other options that used to exist under the click version.

All of them without the burden of including the webapp container in the app. Maybe some shared snap like the ones for GTK and Qt apps could cover the case.

Alberto Mardegan (mardy) on 2016-12-23
Changed in webapp-container:
assignee: nobody → Alberto Mardegan (mardy)
status: New → Confirmed
Alberto Mardegan (mardy) wrote :

I've made some progress with snapping webapps, and now I have the amazon webapp working as a snap (if you want to try it out, it's called "amazon-webapp" and it's in the beta channel).

The Facebook one is also working, but I haven't published it yet.

Here you can see what is needed: an icon, a .desktop file and the snapcraft.yaml file:

http://bazaar.launchpad.net/~mardy/webapps-core/amazon-snap/revision/151

fcole90 (fcole90) wrote :

Hi, I tried to snap a webapp of mines, but it fails with the following error:
QXcbConnection: Could not connect to display :0
Aborted (core dumped)

You can install it with the following: snap install --beta fcole90-hexgl-webapp
You can run it with: fcole90-hexgl-webapp.hexgl-webapp

Alberto Mardegan (mardy) wrote :

I tried it, and indeed found the same issue. Did you declare the "unity7" plug?

fcole90 (fcole90) wrote :

Yes, it's almost the same as yours. You can see the repo here: https://github.com/fcole90/fcole-hexgl-webapp

Alberto Mardegan (mardy) wrote :

You are missing a "plug:" line here, to introduce the list of plugs:
https://github.com/fcole90/fcole-hexgl-webapp/blob/master/snap/snapcraft.yaml#L19

Alberto Mardegan (mardy) wrote :

s/plug/plugs/

fcole90 (fcole90) wrote :

Thank you :)

Unfortunately now I have a different error:

Qt: Session management error: None of the authentication protocols specified are supported
QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries.
"file:///build/webbrowser-app-4Hx99o/webbrowser-app-0.23+16.04.20160413/src/app/webcontainer/webapp-container.qml:-1 File not found\n"

Probably I should shift this conversation to the mailing list..

fcole90 (fcole90) wrote :

Snaps of webapps created in this way are not working on unity8, should I report a separate bug for that?

Alberto Mardegan (mardy) wrote :

No, we can discuss it here. What errors are you getting?

fcole90 (fcole90) wrote :

I can't find it trough ubuntu-app-launch so I don't know how to debug it. I can just try launching it trough the launcher, a window appears for a moment and then vanishes immediately after..

Alberto Mardegan (mardy) wrote :

I actually have the same problem with my webapps. This is most likely due to the fact that I forgot to add the "mir" plug, and therefore apparmor is blocking our attempt to connect to unity8.

Can you try adding the "mir" plug and see if that helps?

fcole90 (fcole90) wrote :

Sorry, somehow I broke my unity8 installation and it's not letting me run any application (except through xmir).

Loïc Minier (lool) wrote :

For people with this issue:
"file:///build/webbrowser-app-4Hx99o/webbrowser-app-0.23+16.04.20160413/src/app/webcontainer/webapp-container.qml:-1 File not found\n"

it's likely because you're building the snap against an older Ubuntu like 16.04; in this case, you need to add a PPA first:
sudo add-apt-repository ppa:ci-train-ppa-service/stable-phone-overlay && sudo apt update

Andreas E. (andreas-e) wrote :

Following the snap-a-website tutorial on Ubuntu 16.10, I also get the webapp-container.qml not found error. In my case it's not an older Ubuntu and I have the stable-phone-overlay ppa, but still getting the error.

Winael (vinzjobard) wrote :

Hi

I've the same issue of @andreas-e from my 16.10 laptop. I'm wondering if it's due to the adding of the ppa on a 16.10 ?

I haven't got the issue on my 16.04 desktops

Cheers
Winael

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers