Issue Details
I'm experiencing issues with Ghost's email analytics service when sending larger articles (specifically one with 1600 words). While tests with shorter articles send correctly, longer articles trigger the following error in my logs:
TypeError: begin.toISOString is not a function
Technical Information
- Ghost Version: 5.113.0
- Domain: https://arcastar.com
- Server: depro7.fcomet.com
Error Details
The error occurs in the email analytics service and repeats approximately every 5 minutes in the logs. The complete stack trace is:
TypeError: begin.toISOString is not a function
at #fetchEvents (/home/soyedmun/arcastar.com/versions/5.113.0/node_modules/@tryghost/email-analytics-service/lib/EmailAnalyticsService.js:292:64)
at EmailAnalyticsService.fetchMissing (/home/soyedmun/arcastar.com/versions/5.113.0/node_modules/@tryghost/email-analytics-service/lib/EmailAnalyticsService.js:184:39)
at async EmailAnalyticsServiceWrapper.fetchMissing (/home/soyedmun/arcastar.com/versions/5.113.0/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js:90:29)
at async EmailAnalyticsServiceWrapper.startFetch (/home/soyedmun/arcastar.com/versions/5.113.0/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js:131:24)
at async /home/soyedmun/arcastar.com/versions/5.113.0/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js:60:13
at async EventEmitter. (/home/soyedmun/arcastar.com/versions/5.113.0/node_modules/@tryghost/domain-events/lib/DomainEvents.js:34:17)
It appears the service is trying to access a toISOString() method on a begin variable that isn't a valid Date object.
Observed Behavior
- Short articles and tests send without issues
- When sending a 1600-word article, the system starts showing this error
- The error repeats cyclically every 5 minutes in the logs
- No visible impact on the user interface, but I'm concerned it's affecting email engagement analytics
Questions
- Has anyone else experienced this issue with larger articles?
- Is there a solution or patch for this specific error?
- Are there any settings I should adjust for email size limits?
I appreciate any guidance on how to fix this issue or whether I should upgrade to a newer Ghost version.