Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No notificatons in Ubuntu #6029

Closed
steel-sword opened this issue Jan 17, 2022 · 11 comments
Closed

No notificatons in Ubuntu #6029

steel-sword opened this issue Jan 17, 2022 · 11 comments
Labels
bug It's a bug stale An issue that hasn't been active for a while...

Comments

@steel-sword
Copy link

Environment

Joplin version: v2.6.10
Platform: Linux
OS specifics: Ubuntu 20, Joplin Installed from Snap

Steps to reproduce

  1. Created a new to-do note.
  2. Wrote its name.
  3. Put example to do by writing - [ ] some to do
  4. WISIWIG has parsed it and showed me a checkbox.
  5. Then I pressed "Set alarm" on top of to-do note.
  6. Chose 2 minutes after current time.
  7. Waited two minutes.
  8. Nothing happened

Describe what you expected to happen

I expected a notification but found nothing.

Logfile

11:49:00: AlarmServiceDriverNode::scheduleNotification: Triggering notification (default): 
{appID: 'net.cozic.joplin-desktop', title: 'To do', icon: '/snap/joplin-desktop/23/opt/joplin-desktop/resources/build/icons/512x512.png', message: '- [ ]  plans for today'}
appID: "net.cozic.joplin-desktop"
icon: "/snap/joplin-desktop/23/opt/joplin-desktop/resources/build/icons/512x512.png"
message: "- [ ]  plans for today"
title: "To do"
[[Prototype]]: Object
Logger.ts:217 11:49:00: AlarmServiceDriverNode::scheduleNotification: node-notifier response: Error: Command failed: notify-send "To do" "- [ ]  plans for today" --icon "/snap/joplin-desktop/23/opt/joplin-desktop/resources/build/icons/512x512.png" --expire-time "10000"
Unknown option - [ ]  plans for today

    at ChildProcess.exithandler (child_process.js:328)
    at ChildProcess.emit (events.js:376)
    at maybeClose (internal/child_process.js:1055)
    at Socket.<anonymous> (internal/child_process.js:441)
    at Socket.emit (events.js:376)
    at Pipe.<anonymous> (net.js:673) undefined
@steel-sword steel-sword added the bug It's a bug label Jan 17, 2022
@Daeraxa
Copy link
Collaborator

Daeraxa commented Jan 17, 2022

Can you replicate the problem from the appimage version?

@JGCarroll
Copy link

You can replicate this error without Joplin, the problem is the syntax of the notify-send command being generated.

notify-send "To do" "- [ ] plans for today" --icon "/snap/joplin-desktop/23/opt/joplin-desktop/resources/build/icons/512x512.png" --expire-time "10000"

If you remove - [ ] it works, I wonder if Joplin is substituting this instead of an Emoji or something similar?

@roman-r-m
Copy link
Collaborator

If you remove - [ ] it works, I wonder if Joplin is substituting this instead of an Emoji or something similar?

It's an unchecked checkbox in markdown. Should probably be escaped.

@steel-sword
Copy link
Author

@MrCarroll, yes, I understood that it's from notify-send. I put some text before - [ ] and it worked properly. But it's a bug anyway, isn't it?

@JGCarroll
Copy link

JGCarroll commented Jan 18, 2022

Sure, it's still a bug; but I was just making sure it was identified as a problem with the notify-send binary and not the fact it's in a Snap package, because the Snap package is strictly speaking unsupported because it's a third party package.

Me and my friend had a long think about the semantics going on here, and the fix is actually rather simple, you need to pass the arguments first and the input last; separating the two with --, e.g

notify-send --icon "/snap/joplin-desktop/23/opt/joplin-desktop/resources/build/icons/512x512.png" --expire-time "10000" -- "To do" "- [ ] plans for today"

However I haven't a clue where in the codebase this is actually handled, but passing -- to separate arguments from input is cleaner than e.g escaping the input.

@roman-r-m
Copy link
Collaborator

@ManavSarkar
Copy link

ManavSarkar commented Feb 4, 2022

Sure, it's still a bug; but I was just making sure it was identified as a problem with the notify-send binary and not the fact it's in a Snap package, because the Snap package is strictly speaking unsupported because it's a third party package.

Me and my friend had a long think about the semantics going on here, and the fix is actually rather simple, you need to pass the arguments first and the input last; separating the two with --, e.g

notify-send --icon "/snap/joplin-desktop/23/opt/joplin-desktop/resources/build/icons/512x512.png" --expire-time "10000" -- "To do" "- [ ] plans for today"

However I haven't a clue where in the codebase this is actually handled, but passing -- to separate arguments from input is cleaner than e.g escaping the input.

But for that we need to modify the node-notifier package itself, and then update it here, isn't it.
And what about trimming any - before the message and title, it wouldn't look good in notification also as a dash before message.

@ManavSarkar
Copy link

Sure, it's still a bug; but I was just making sure it was identified as a problem with the notify-send binary and not the fact it's in a Snap package, because the Snap package is strictly speaking unsupported because it's a third party package.
Me and my friend had a long think about the semantics going on here, and the fix is actually rather simple, you need to pass the arguments first and the input last; separating the two with --, e.g
notify-send --icon "/snap/joplin-desktop/23/opt/joplin-desktop/resources/build/icons/512x512.png" --expire-time "10000" -- "To do" "- [ ] plans for today"
However I haven't a clue where in the codebase this is actually handled, but passing -- to separate arguments from input is cleaner than e.g escaping the input.

But for that we need to modify the node-notifier package itself, and then update it here, isn't it. And what about trimming any - before the message and title, it wouldn't look good in notification also as a dash before message.

@MrCarroll

@JGCarroll
Copy link

Yes, ideally this would be fixed upstream and I've created an issue about this so they can consider it.

And yes, it could also be fixed downstream in Joplin, e.g by trimming any leading dashes, but I'm not going to promote that choice unless upstream isn't interested in fixing it for whatever reason. If the user thinks the - looks bad, they can remove it themselves. Some users might think the - looks good, given they put it there themselves.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2022

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Mar 8, 2022
@github-actions
Copy link
Contributor

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug stale An issue that hasn't been active for a while...
Projects
None yet
Development

No branches or pull requests

5 participants