MatthieuLemoine / electron-push-receiver

A module to bring Web Push support to Electron allowing it to receive notifications from Firebase Cloud Messaging (FCM).
https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0
MIT License
194 stars 64 forks source link

Add prefix to `credentials` config item (electron-config) #37

Open mjarkk opened 5 years ago

mjarkk commented 5 years ago

After a long time of debugging why a electron app didn't work i found that this package uses electron-config that saves a item named credentials
Because my application also uses electron-config with an saved item named credentials coursed electron-push-receiver to not work with a result that my complete app stopped working.

I think it would be better to add a prefix something like push-receiver-credentials.
I don't think i will be the last one that gets this problem it's also really annoying to debug because the electron error doesn't explain a lot

PedroKantar commented 5 years ago

Went into a similar issue.. the workaround/fix is to not use the default config file provided by electron-config. Use your own settings file by providing your setting file name : const config = new Config("MysettingsFile");

mjarkk commented 5 years ago

Thx for the workaround
I already fixed it in my code by adding a prefix to the things i save in electron-config.

Aside from that this still seems like something that electron-push-receiver needs to handle by specifying another save location or adding a prefix to every item saved with electron-config.
credentials is probably used a lot to save things in electron-config

MatthieuLemoine commented 5 years ago

@mjarkk Feel free to send a PR to fix this