Repository navigation
Fix server crashes reported by 25.03 servers - #8246
Merged
Merged
Conversation
runLocally now logs a failed save of the done state instead of leaving a rejected promise, and schedule() returns a rejected promise (logged by its caller) when a stored schedule cannot be compiled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both jobs run their work in an async callback; an error there is now logged and the job completes instead of the error becoming an unhandled rejection with done() never called. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n-array event segments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A handler that throws or rejects in a dispatch without a callback and without params.promises is now logged instead of becoming an unhandled rejection. updateApplicationConfigs logs through a logger instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g and legacy FCM keys The batcher skips or fails a batch whose connection pool is gone, the /i hook skips user work when there is no app user, the connector skips a platform with no config, and an FCM credential without a service account file answers with a credentials error instead of crashing the sending worker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…idgets and period The report plugin timeout and a late plugin answer no longer both call the metric callback; star-rating does not call it again from its catch after a successful answer. multiple-widgets-by-id answers 400 when widgets is not an array and method=star answers 400 for a non-string period. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… missing sub-paths, reject unparseable periods dashboards retries scheduling its refresh job until the job manager has found the job class; system-utility treats a missing sub-path as an unknown path; views answers 400 for a period that cannot be parsed instead of throwing while building the pipeline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ar2rsawseen
approved these changes
Nov 9, 2026
ar2rsawseen
added a commit
that referenced
this pull request
Nov 26, 2026
Same fixes as master's #8246, for crashes 24.05 servers have the same code for: - events: a segment list stored as something other than an array - ping and server-stats jobs log errors and finish once - job manager: a failure computing the next run, clearing a job - dashboards: retry while the job class is not loaded yet - plugin dispatch: log failing handlers nobody waits for - push: missing app user, closed connection pools, missing push config, legacy FCM credentials - reports and star-rating reports answer once - system-utility: missing sub-path - views: an unparseable period answers 400 Conflicts kept 24.05's versions where it already had a fix (#8245 views period fallback, star-rating period check, request docs); the push connector keeps 24.05's id handling with master's guard. (cherry picked from commit 4a0868e) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes server crashes reported to the crash tracker by 25.03 servers. Each fix is local to the code that crashed: guard a missing value, answer 400 for a bad request parameter, catch and log a promise rejection, or make a callback fire once. No routing or response-shape changes for valid requests.
Fixes
api/parts/jobs/manager.js(runLocally)api/parts/jobs/manager.js(schedule)clear()now actually logs (its.catchreturned a bound function without calling it)api/utils/render.jspageerrorwithout an Error object is logged as-is instead of throwing inside the listenerapi/jobs/ping.jsapi/utils/requestProcessor.js/instead of calling.splitonnullplugins/server-stats/api/jobs/stats.jsdonecalled onceplugins/reports/api/reports.js,plugins/star-rating/api/api.js(/email/report)api/parts/data/events.js.indexOfon itplugins/push/api/jobs/util/batcher.jsmulticastskips recipients whose connection pool is gone;do_flushfails the batch with a PushError instead of writing to a missing poolplugins/push/api/api.js(/i)la, auto-trigger and token-session work are skipped instead of reading properties ofundefinedplugins/push/api/jobs/util/connector.jsplugins.push.<platform> = null) is skipped when loading credentialsplugins/push/api/send/platforms/a.jsplugins/star-rating/api/api.js(/o/feedback/multiple-widgets-by-id)widgetsthat does not parse to an array answers 400Invalid widgetsplugins/star-rating/api/api.js(/o?method=star)period(e.g. a number in a JSON body) answers 400Bad request parameter: periodplugins/dashboards/api/api.js(/master).replace()onundefinedin the master processplugins/system-utility/api/api.js/o/system,/i/inspector,/i/profilerwithout a sub-path fall to the existing unknown-path branchplugins/pluginManager.js(updateApplicationConfigs)log.eon the log module factory threwplugins/views/api/api.jsBad request parameter: periodforgetTable,getTotalsandgetExportQuery(a dashboard widget gets empty data) instead of throwing fromJSON.parsewhile building the pipelineplugins/pluginManager.js(dispatch)params.promisesis logged ([plugins] Error in handler of <event>) instead of becoming an unhandled rejection. Logged, no longer crashes only: the handler bugs themselves and how the default branch ofrequestProcessordispatches unknown paths are unchanged here and handled separatelyNot in this PR
countly-sdk-nodejsbulk iteratingcluster.workers) is not changed; the job now survives it./dashboard/datawidget path keeps its stored period handling; an unparseable period there now yields empty data instead of a thrown error.How it was checked
npx eslinton every changed file: 0 errors (the 5 warnings are pre-existing lines).node --checkon every changed file.test/unit-tests/api.plugins.dispatch-results.js: a dispatch with no consumer whose handlers throw and reject leaves no unhandled rejection. Passes with the fix, fails without it (npx mocha test/unit-tests/api.plugins.dispatch-results.js).send()rejects with a PushError whoseisCredentialsis true, whichSplitter.connect()turns into "credentials rejected".getTable/getTotalswith periods]]>and[1,answer 400; star-ratingmultiple-widgets-by-idwithwidgets=nullanswers 400.scheduleon a job), ping job on a database without$dateFromParts, report metric timeout racing a late answer, push batcher with a pool closed mid-batch, dashboards/masterwith a slow job scan,/o/systemwith no sub-path (now 400Invalid path), a request whose target has no path, and an event whose stored segment list is not an array.🤖 Generated with Claude Code