ItzNotABug / ghosler

Send newsletter emails to your Ghost CMS subscribers & members, using your own email credentials!
Apache License 2.0
40 stars 5 forks source link

Email Not Sent Due To Error #36

Closed burtiraven closed 3 months ago

burtiraven commented 3 months ago
[2024-03-18 10:42:35 UTC] => [ERROR] => Newsletter: TypeError: Cannot read properties of null (reading 'replace')
at Object.decode (/ghosler/node_modules/he/he.js:232:15)
at file:///ghosler/utils/newsletter.js:218:58
at Array.forEach (<anonymous>)
at #injectUrlTracking (file:///ghosler/utils/newsletter.js:218:11)
at async Newsletter.renderTemplate (file:///ghosler/utils/newsletter.js:147:19)
at async Newsletter.send (file:///ghosler/utils/newsletter.js:33:60)
ItzNotABug commented 3 months ago

Looks like some URL is null and therefore its not handled by the he module. Anyway, I'll add a null check for this in the meantime but would you be able to check what url is null?

ItzNotABug commented 3 months ago

Fixed in 0.93. Please run ghosler update to update.

jubi-git commented 3 months ago

It looks this error returned?

[2024-04-04 11:18:32 UTC] => [ERROR] => Newsletter: TypeError [ERR_INVALID_URL]: Invalid URL at new NodeError (node:internal/errors:405:5) at new URL (node:internal/url:676:13) at Element.<anonymous> (file:///usr/src/app/utils/newsletter.js:238:29) at LoadedCheerio.each (file:///usr/src/app/node_modules/cheerio/lib/esm/api/traversing.js:461:26) at #injectUrlTracking (file:///usr/src/app/utils/newsletter.js:229:45) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Newsletter.renderTemplate (file:///usr/src/app/utils/newsletter.js:148:19) at async Newsletter.send (file:///usr/src/app/utils/newsletter.js:33:60)