MarcelRobitaille / bbyen

Bring Back YouTube Email Notifications! YouTube upload email notification replacement
MIT License
10 stars 0 forks source link

Exception is not defined #11

Closed Jozko568 closed 2 years ago

Jozko568 commented 2 years ago

Hey, I was going to upgrade to latest version of bbyen but unfortunately upon entering the auth code from Google I was prompted with an error message Exception is not defined. Bbyen is stuck on this point and won't continue checking subscriptions. Could you check where is the issue?

Auth code is removed for obvious reasons.

Paste the entire URL of the page you are redirected to (even if you receive 404): 
[info] [google-auth]: Storing tokens
[error] [main]: Exception is not defined
MarcelRobitaille commented 2 years ago

Hi @Jozko568. That's a strange error. Sorry you are experiencing that. Would you please try the latest commit? I added better logging. I hope I will finally see stack traces in the logs, which came up before.

Jozko568 commented 2 years ago

Now it shows this error. I don't think there's something wrong in my config as it worked previously without any issues but I pasted it below regardless.

ReferenceError: Exception is not defined
    at normalizeChannel (/opt/bbyen-upgrade/bbyen/src/config.js:46:3)
    at Array.map (<anonymous>)
    at normalizeConfig (/opt/bbyen-upgrade/bbyen/src/config.js:57:46)
    at loadConfig (/opt/bbyen-upgrade/bbyen/src/config.js:65:33)
    at async main (/opt/bbyen-upgrade/bbyen/src/index.js:21:18)
{
    "email": {
        "host": "smtp.gmail.com",
        "port": 465,
        "secure": true,
        "auth": {
            "user": "my.secret.sender",
            "pass": "my.secret.sender.password"
        },
        "sendingContact": "\"Youtube\" my.secret.sender@gmail.com",
        "destination": "my.secret.adress@gmail.com"
    },
    "port": 9020,
    "database": {
        "filename": "database.sqlite"
    },
    "timers": {
        "subscriptions": "2 hours",
        "videos": "10 minutes"
    },
    "kickoff": {
        "subscriptions": true,
        "videos": true
    },
    "logging": {
        "level": "verbose"
    },
    "whitelistedChannelIds":[
   "UCP-hGpCZf5XNxC_oMEVGOXw",
   "UCkWQ0gDrqOCarmUKmppD7GQ",
   "UCfqaSR8bTICp6S9K4jp8z3w",
   "UCegEbxS54ee3fh19N56cG2A",
   "UCWFKCr40YwOZQx8FHU_ZqqQ",
   "UCBNG0osIBAprVcZZ3ic84vw",
   "UChBEbMKI1eCcejTtmI32UEw",
   "UCFCLm6HxfrIH_NSRgqqbpAg",
   "UCKDhbg8zZxiQ7esOnQSe4Hw",
   "UClLCyPEGGJq4m_LhHl0egJA",
   "UCGC8o-hW_TS-UpnThU0Wa1w",
   "UC2J-0g_nxlwcD9JBK1eTleQ"
]
}
MarcelRobitaille commented 2 years ago

@Jozko568 Would you try the latest commit please? I just mixed up Exception and Error. I've been doing too much Python lately I guess...

Jozko568 commented 2 years ago

Slightly different error now


[error] [main]: Exhausted all methods of getting the ID for channel 'UCP-hGpCZf5XNxC_oMEVGOXw'. If this is a mistake              , please open a GitHub issue and show them this message: https://github.com/MarcelRobitaille/bbyen/issues/new {}
Error: Exhausted all methods of getting the ID for channel 'UCP-hGpCZf5XNxC_oMEVGOXw'. If this is a mistake, please               open a GitHub issue and show them this message: https://github.com/MarcelRobitaille/bbyen/issues/new
    at normalizeChannel (/opt/YoutubeNotifiy-bbyen-upgrade/bbyen/src/config.js:46:9)
    at Array.map (<anonymous>)
    at normalizeConfig (/opt/YoutubeNotifiy-bbyen-upgrade/bbyen/src/config.js:57:46)
    at loadConfig (/opt/YoutubeNotifiy-bbyen-upgrade/bbyen/src/config.js:65:33)
    at async main (/opt/YoutubeNotifiy-bbyen-upgrade/bbyen/src/index.js:21:18)
MarcelRobitaille commented 2 years ago

Should be working now. I was just not aware channel IDs could have hyphens. I have updated the checks so that channel ID should pass now.

Jozko568 commented 2 years ago

Works perfectly now, thanks!