You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use NodeJS.Timeout for scheduled interval handles so the production TypeScript build accepts clearInterval
give AddExternalIdToContacts1750299580000 an explicit migration name so TypeORM can identify it after production minification
Why
The packaged development build currently fails in two places:
TypeScript rejects NodeJS.Timer when it is passed to clearInterval with the current locked typings.
When upgrading an existing server database, the production-minified contact migration has the runtime class name t. TypeORM requires migration names to end in a 13-digit timestamp and aborts startup with:
t migration name is wrong. Migration class name should have a JavaScript timestamp appended.
The older migrations already define an explicit name property for this reason.
Verification
ESLint passes for both changed files.
npm run build --workspace @bluebubbles/server succeeds.
A packaged ARM64 build starts successfully against an existing BlueBubbles 1.9.9 configuration database on macOS 15.7.7.
Confirming this fixes startup of a packaged development build on macOS 26.6.2 (Tahoe, 25G83), Apple Silicon (M2).
Without it I hit both problems described here. The TypeScript build failed on clearInterval(this.handle) in ScheduledService.ts. After working around that, the packaged app started once on a fresh install (no config.db, so synchronize is used). Every later launch hung at Initializing server database.... Running the binary with its console captured showed the swallowed rejection:
TypeORMError: t migration name is wrong. Migration class name should have a JavaScript timestamp appended.
at MigrationExecutor.getMigrations (.../typeorm/migration/MigrationExecutor.js:415:55)
With the same two changes as this PR (NodeJS.Timeout, and name = "AddExternalIdToContacts1750299580000"), the build succeeds. The app then starts normally on repeated launches against the existing database, with HTTP service up and iMessage listeners running.
Build details: development @ e2a5bf6 plus #832, Node 20.11.1, electron-builder arm64 target.
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
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.
Summary
NodeJS.Timeoutfor scheduled interval handles so the production TypeScript build acceptsclearIntervalAddExternalIdToContacts1750299580000an explicit migration name so TypeORM can identify it after production minificationWhy
The packaged development build currently fails in two places:
TypeScript rejects
NodeJS.Timerwhen it is passed toclearIntervalwith the current locked typings.When upgrading an existing server database, the production-minified contact migration has the runtime class name
t. TypeORM requires migration names to end in a 13-digit timestamp and aborts startup with:t migration name is wrong. Migration class name should have a JavaScript timestamp appended.The older migrations already define an explicit
nameproperty for this reason.Verification
npm run build --workspace @bluebubbles/serversucceeds.