Notifications don't appear with libnotify (usually the first time) when an image is specified

RESOLVED DUPLICATE of bug 1215861

Status

()

Toolkit
Notifications and Alerts
RESOLVED DUPLICATE of bug 1215861
3 years ago
2 years ago

People

(Reporter: Yunier J., Unassigned, NeedInfo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150508094354

Steps to reproduce:

I have experiment some issues when try alert of an event on Linux with KDE.
For example, when I add an iconURL it not is showed but without iconURL yes.
It happen some times and not always.
The first time that I show an alert no work but after yes.
It is my code:

const timer = require('sdk/timers'),
    data = require("sdk/self").data,
    notifications = require("sdk/notifications"),
    myIconURL = "./myIcon.png";

/**
 * Notifica al usuario de un error
 * @error string
 */
function notificarError(error) {
    notifications.notify({
        title: "cuentaFox: Error",
        text: error,
        iconURL: myIconURL
    })
}

//No work
notificarError('Test 1')

//Work
timer.setTimeout(function() {
    notificarError('Test 2')
}, 5000)


Actual results:

Not show notifications.
(Reporter)

Updated

3 years ago
OS: Unspecified → All
Hardware: Unspecified → All
(Reporter)

Comment 1

3 years ago
After 40 seconds it not show any more but when schedule an alert for 45 seconds it is showed.
I think that the problem is the iconURL because without an icon all notifications are showed.

const timer = require('sdk/timers'),
    data = require("sdk/self").data,
    notifications = require("sdk/notifications"),
    myIconURL = "./myIcon.png";

/**
 * Notifica al usuario de un error
 * @error string
 */
function notificarError(error) {
    notifications.notify({
        title: "cuentaFox: Error",
        text: error
        // iconURL: myIconURL
    })
}

//No work
notificarError('Test 1')
console.log('Showing Test 1')

//Work
timer.setTimeout(function() {
    console.log('Showing Test 2')
    notificarError('Test 2')
}, 5000)

//No work
timer.setTimeout(function() {
    console.log('Showing Test 3')
    notificarError('Test 3')
}, 40000)

//Work
timer.setTimeout(function() {
    console.log('Showing Test 4')
    notificarError('Test 4')
}, 45000)
(Reporter)

Comment 2

3 years ago
I think that it a an error of nsIAlertsService that Add-on SDK or other component of Firefox
Component: General → General
Product: Add-on SDK → Firefox
(Reporter)

Updated

3 years ago
Component: General → General
Product: Firefox → Core
(Reporter)

Updated

3 years ago
Component: General → Notifications and Alerts
Product: Core → Toolkit
I have experienced this myself on Fedora 22.
Karl/Michael, it seems like you are probably most familiar with this libnotify integration. Could you look into this?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(ventnor.bugzilla)
Flags: needinfo?(karlt)
OS: All → Linux
Summary: notifications API not work some times → Notifications don't appear with libnotify (usually the first time) when an image is specified
Duplicate of this bug: 1181049
Duplicate of this bug: 1125558
Is it possible to reproduce with a testcase using web-facing api?

The first thing to do would be to find a regression window.
Flags: needinfo?(karlt)
Keywords: testcase-wanted
Keywords: regressionwindow-wanted
(In reply to Karl Tomlinson (ni?:karlt) from comment #6)
> Is it possible to reproduce with a testcase using web-facing api?

Yes, any notification test page e.g. https://people.mozilla.org/~mnoorenberghe/w3c_notifications.htm (it will autocomplete an image URL).

> The first thing to do would be to find a regression window.

Well, I didn't see any indication that this was a regression but it's possible.

Comment 8

2 years ago
I'm not able to get notifications to use libnotify also. I'm on ubuntu and I've confirmed notify-send 'foo' 'bar' does work so I know notifyosd is running.  I can try this on Fx42 later today.
This bug is just about when an image causes it not to work sometimes (usually the first time). If it doesn't work for you without an image that would be a separate bug.

Comment 10

2 years ago
Bug 1079627 caused this bug, See Bug 1215861.
See Also: → bug 1215861
Comment hidden (obsolete)
Oh, thanks, Alice.  Sorry, missed that comment somehow.
Blocks: 1079627
Keywords: regressionwindow-wanted, testcase-wanted
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1215861
You need to log in before you can comment on or make changes to this bug.