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

Error begin.toISOString is not a function when fetching missing events email analytics #22561

Open
1 task done
nickcampbell18 opened this issue Mar 19, 2025 · 0 comments · May be fixed by #22563
Open
1 task done

Error begin.toISOString is not a function when fetching missing events email analytics #22561

nickcampbell18 opened this issue Mar 19, 2025 · 0 comments · May be fixed by #22563
Labels
needs:triage [triage] this needs to be triaged by the Ghost team

Comments

@nickcampbell18
Copy link

Issue Summary

I'm seeing this error in my logs. This is a relatively new install so it's possible that there are no events for it to fetch - but it seems to be tripping up and failing.

From the logs it looks like some other fetchers are succeeding first...

Steps to Reproduce

  1. New Ghost install, self-hosted on Docker
  2. Publish an email on a newsletter with Mailgun
  3. This error appears in the logs

Ghost Version

5.113.0

Node.js Version

18

How did you install Ghost?

Docker alpine: https://github.com/docker-library/ghost/blob/c105170390ce3c47d232d46b255b9472a0185600/5/alpine/Dockerfile

Database type

SQLite3

Browser & OS version

No response

Relevant log / error output

2025-03-19 11:36:54.395	at async EventEmitter.<anonymous> (/var/lib/ghost/versions/5.113.0/node_modules/@tryghost/domain-events/lib/DomainEvents.js:34:17)
2025-03-19 11:36:54.395	at async /var/lib/ghost/versions/5.113.0/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js:60:13
2025-03-19 11:36:54.395	at async EmailAnalyticsServiceWrapper.startFetch (/var/lib/ghost/versions/5.113.0/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js:131:24)
2025-03-19 11:36:54.395	at async EmailAnalyticsServiceWrapper.fetchMissing (/var/lib/ghost/versions/5.113.0/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js:90:29)
2025-03-19 11:36:54.395	at EmailAnalyticsService.fetchMissing (/var/lib/ghost/versions/5.113.0/node_modules/@tryghost/email-analytics-service/lib/EmailAnalyticsService.js:184:39)
2025-03-19 11:36:54.395	at #fetchEvents (/var/lib/ghost/versions/5.113.0/node_modules/@tryghost/email-analytics-service/lib/EmailAnalyticsService.js:292:64)

2025-03-19 11:36:54.395	 begin.toISOString is not a function
	
[2025-03-19 11:36:54] ERROR Error while fetching email analytics begin.toISOString is not a function
[2025-03-19 11:36:54] INFO [EmailAnalytics] Fetch missing events started
[2025-03-19 11:36:54] INFO [EmailAnalytics] Fetched 0 events and aggregated stats in 70ms (latest)
[2025-03-19 11:36:54] INFO [EmailAnalytics] No new events found
[2025-03-19 11:36:54] INFO [EmailAnalytics] Fetching finished
[2025-03-19 11:36:54] INFO [MailgunClient fetchEvents]: Processed 0 batches in 0.07s. Average batch time: 0.00s
[2025-03-19 11:36:54] INFO [EmailAnalytics] Fetching from 2025-03-19T11:04:04.621Z until 2025-03-19T11:35:54.323Z (maxEvents: 10000)
[2025-03-19 11:36:54] INFO [EmailAnalytics] Fetch latest non-opened events started
[2025-03-19 11:36:54] INFO [EmailAnalytics] Fetched 0 events and aggregated stats in 160ms (latest opens)
[2025-03-19 11:36:54] INFO [EmailAnalytics] No new events found
[2025-03-19 11:36:54] INFO [EmailAnalytics] Fetching finished

Code of Conduct

  • I agree to be friendly and polite to people in this repository
@github-actions github-actions bot added the needs:triage [triage] this needs to be triaged by the Ghost team label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:triage [triage] this needs to be triaged by the Ghost team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant