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

Notifications Not showing in Windows 10 #1338

Closed
utd1878 opened this issue Jun 15, 2018 · 16 comments
Closed

Notifications Not showing in Windows 10 #1338

utd1878 opened this issue Jun 15, 2018 · 16 comments

Comments

@utd1878
Copy link

utd1878 commented Jun 15, 2018

I'm not able to see notifications after install my app with the Squirrel target, if that makes sense.

I have an electron app, and I have a target of NSIS and Squirrel ( I use Squirrel for the auto updates). When I install the NSIS exe, windows recognizes the app and will show it's notifications.

When I install the squirrel target, it will not show the notifications. The application is the exact same, the only difference is the target.

I've searched all over and haven't been able to figure out why? Some posts I've ready suggested that because the Start Menu shortcut is added within a group, that could cause problems with the notifications.

Any guidance on this would be helpful. I think it's a bug, but am open to the idea that I'm missing a setup.

@anaisbetts
Copy link
Contributor

Squirrel writes an App User Model ID to your shortcut, you probably need to match that App User Model ID when you call the notification API. It's of the format:

com.squirrel.YOUR_NUGET_PACKAGE_ID.YOUR_EXE_NAME_WITHOUT_DOT_EXE

So

com.squirrel.atom.atom

For a NuGet package called "Atom" with a program, "atom.exe"

@utd1878
Copy link
Author

utd1878 commented Jun 15, 2018

Thanks for the quick reply
So I currently have an app id of com.company.appname.

Do I need to add the com.squirrel in front so, com.squirrel.com.company.appname

@anaisbetts
Copy link
Contributor

@utd1878 You should stop setting the App ID yourself and use the Squirrel one, or else you're going to have issues

@utd1878
Copy link
Author

utd1878 commented Jun 15, 2018

@paulcbetts oh...so I set that in my package.json previously in order to get the notifications to work with the NSIS target.

So you're saying I should remove that from my package.json file and I don't need to manually set it?

Thanks for your patience....I'm cutting my teeth with Squirrel and am learning these finer points.

@anaisbetts
Copy link
Contributor

@utd1878 Ya. Squirrel sets the App ID intentionally to try to fix some of the pinning issues, but this also affects how people do notifications.

Thanks for your patience....I'm cutting my teeth with Squirrel and am learning these finer points.

No worries! App User Model IDs are super obscure, this is like graduate-level Squirrel :)

@utd1878
Copy link
Author

utd1878 commented Jun 15, 2018

@paulcbetts haha, thanks.

So I've removed the AppId line from my package.json file, rebuild the app and unfortunately, I'm still not seeing notifications for my app on win 10. Looking at the notifications settings, I'm not seeing the application either.

Is there another spot I need to configure?

"build": { "directories": { "buildResources": "src/resources", "output": "packages", "app": "dist" }, "squirrelWindows": {}, "win": { "icon": "pathto/icon.ico", "target": [ "NSIS", "squirrel" ] }, "mac": { "icon": "build/icon.icns", "category": "application.business", "target": [ "dmg", "zip" ] }, "linux": { "target": [ "AppImage", "snap" ] }, "asar": true, "asarUnpack": [ "./node_modules/node-notifier/vendor/**", "./node_modules/chart.js/" ] }, "engines": { "node": ">= 6.0.0", "npm": ">= 3" }

@anaisbetts
Copy link
Contributor

@utd1878
Copy link
Author

utd1878 commented Jun 15, 2018

okay, I can try that...what ID am I using?
I'm still confused on that. The name in my package.json file is: app-name-by-company

@anaisbetts
Copy link
Contributor

@utd1878 com.squirrel.PACKAGE.EXE_NAME

@utd1878
Copy link
Author

utd1878 commented Jun 15, 2018

@paulcbetts So at the risk of coming across as very naive/green, above you mentioned, NuGet package, and this app isn't a nuget package so I'm not sure what I need to put in place of the PACKAGE in the id.

@anaisbetts
Copy link
Contributor

@utd1878 It's almost certainly the same as your package ID in package.json

@utd1878
Copy link
Author

utd1878 commented Jun 15, 2018

@paulcbetts Thanks for helping me. I must be missing something. I've added that call early on, added the id of 'com.squirrel.my-app-name' and still nothing.
I'm not seeing a package id in my json file, so, like I said, I must be missing something. I see version, name, product name and description. I had appId, but based on what you mentioned above, I removed it.

@anaisbetts
Copy link
Contributor

com.squirrel.my-package-id.my-exe-name - there should be 4 items

@utd1878
Copy link
Author

utd1878 commented Jun 15, 2018

Okay. Is the package Id the same as the appid? I don’t recall having to set a property “packageid”

@anaisbetts
Copy link
Contributor

image

@utd1878
Copy link
Author

utd1878 commented Jun 15, 2018

@paulcbetts Thanks for your time. There must be something else I'm missing.

I've added the call you mentioned above and added the package and exe name

app.setAppUserModelId("com.squirrel.my-app-name.My Exe Name")

Still nothing. (I also tried putting underscores in place of the spaces in the exe).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants