Webapps appear to to be installed, but aren't working

Bug #1055832 reported by Stephen Rees-Carter
This bug report is a duplicate of:  Bug #1068662: webapps not working out the box. Edit Remove
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
WebApps: libunity-webapps
New
Undecided
Víctor R. Ruiz

Bug Description

I'm trying to play with Webapps in 12.10, but I can't get it to prompt me for websites to integrate in Chromium or Firefox.
I've installed it via the PPA (ppa:webapps/preview && unity-webapps-preview), but that makes no difference.

Chrome shows the extension: Ubuntu web accounts Chromium extension 0.4.4

I originally tested it in 12.04 using the PPA before upgrading to 12.10, so I'm thinking maybe some of my settings are corrupted?
Some of my older webapps from 12.04 are in the dash and usable, but they don't integrate into the Messaging Menu at all.

I wasn't sure if this is the best place to ask or not, or how to debug this further, so any ideas/direction you can give me would be appreciated.

visibility: private → public
Revision history for this message
Giovanni Mellini (merlos) wrote :

Same for me. I cannot see webapps working at all.

giovanni@trumpet-fish:~$ dpkg-query -l '*webapps*'
+++-================-=============-=============-======================================
ii libunity-webapps 2.3.8-0ubuntu i386 Web Apps integration with the Unity de
un unity-webapps <nessuna> (nessuna descrizione disponibile)
ii unity-webapps-co 2.4.6-0ubuntu all Unity WebApp integration scripts
ii unity-webapps-se 2.3.8-0ubuntu i386 Service for Web Apps integration with
giovanni@trumpet-fish:~$

Revision history for this message
Christopher Kyle Horton (christhehorton) wrote :

Same here. It only worked once for me, with the OMG! Ubuntu site in Firefox. After that, nothing else offered to be integrated.

I'm using Quantal and the Web Apps landed in my updates just yesterday, i.e. I'm not using the PPA.

Revision history for this message
Hanine HAMZIOUI (hanynowsky) wrote :

Same here.
Webapps landed in updates yesterday and today and was able to install OMGUBUNTu, Twitter, Launchpad and Gmail scripts.
Only Launchpad and OMGU are working correctly.

Gmail has been installed but it's not working at all.

Revision history for this message
Robert Carr (robertcarr) wrote :

When you load GMail is there anything of note in the firefox error console? Ctrl+shift+j. Particularly likely would be the messages tab.

Can you show me what /usr/share/unity-webapps/userscripts/webapps-gmail looks like?

Thanks for the bug hunting!

Revision history for this message
Tomek Nowak (tomnow1990) wrote :
Download full text (4.6 KiB)

Same here. Only OMG Ubuntu is working. And only in Firefox.

When I log in to my GMail in Firefox, I got this (in error console): Error in parsing value for 'display'. Declaration dropped.

In /usr/share/unity-webapps/userscripts/webapps-gmail I have two files: GMail.user.js and manifest.json

In GMail.user.js I have this:
// ==UserScript==
// @include https://mail.google.com/*
// @require utils.js
// @require google-common.js
// ==/UserScript==

window.Unity = external.getUnityObject(1);
var doc = null, pane = null;

function isCorrectPage() {
    var i, ids = ['canvas_frame', 'hist_frame', 'js_frame'];

    for (i = 0; i < ids.length; i++) {
        if (!document.getElementById(ids[i])) {
            return false;
        }
    }

    return true;
}

function getNumber(str) {
    try {
        var onlyNumber = str.match(/\(([0-9]|,)+\)/)[0].match(/([0-9]|,)+/)[0];

        return onlyNumber.replace(/,/g, "");
    } catch (x) {
        return '0';
    }
}

function getLabels() {
    var i, res = [];

    var snapshot = doc.evaluate('//div[2]/div/div/div[5]/div/*/div/div/div[2]/span/a',
                                pane, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

    for (i = 0; i < snapshot.snapshotLength; i++) {
        var node = snapshot.snapshotItem(i);

        res.push({ name: node.textContent.match(/^[^(]+/)[0],
                   count: getNumber(node.textContent),
                   link: node.href });
    }

    return res;
}

function doMatrixIntegration() {
    doMainMenuIntegration(doc);

    var i, labels = getLabels();
    for (i = 0; i < labels.length; i++) {
        Unity.addAction('/' + labels[i].name, makeRedirector(labels[i].link));
    }
}

function checkMessangesCount() {
    var inboxLink = doc.evaluate('//div[@role="navigation"]/div/div/div/div/div/div/div/div/div/span/a', doc, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
    var numMessanges = getNumber(inboxLink.text);

    Unity.MessagingIndicator.clearIndicators();

    Unity.MessagingIndicator.showIndicator(_("Inbox"), { count: numMessanges,
                                                         callback: makeRedirector(inboxLink.href) });
    var i, labels = getLabels();
    for (i = 0; i < labels.length; i++) {
        Unity.MessagingIndicator.showIndicator(labels[i].name, { count: labels[i].count,
                                                                 callback: makeRedirector(labels[i].link) });
    }
    Unity.Launcher.setCount(Number(numMessanges));
}

function unityLoaded() {
    var composeNewMessage = wrapCallback(function () {
        var compose = doc.evaluate('//div[@role="navigation"]/div[1]/div[1]/div[1][@role="button"]', doc, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;

        click(compose);
    });

    Unity.MessagingIndicator.addAction(_("Compose New Message"),
                                       composeNewMessage);
    Unity.Launcher.addAction(_("Compose New Message"),
        composeNewMessage);

    setInterval(wrapCallback(checkMessangesCount), 2000);
    checkMessangesCount();

    doMatrixIntegration();
}

if (isCorrectPage()) {
    setTimeo...

Read more...

Will Cooke (willcooke)
Changed in libunity-webapps:
assignee: nobody → Víctor R. Ruiz (vrruiz)
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.