AFFiNE icon indicating copy to clipboard operation
AFFiNE copied to clipboard

[Bug]: Wrong version in package.json

Open oddlama opened this issue 2 months ago • 5 comments

What happened?

For context, I'm packaging and building the AFFiNE backend server myself instead of using the docker container ghcr.io/toeverything/affine:stable in order to run it natively. Even though the build instructions seem a bit outdated I eventually got everything to work except that the server version reports an older version that what it actually is.

Looking at the source code I noticed that all package.json files, and importantly the packages/backend/server/package.json file, contain version: "0.22.4" instead of the actual version of the selected git tag. I'm not sure why this is the case, but unfortunately it causes the desktop client to refuse connections to the selfhosted server with the message:

Your server version 0.22.4 is not compatible with current client. Please upgrade your server to 0.23.0 or higher to use this client.

But technically the compiled version is actually whatever source code was tagged with the git tag v0.24.3. Now I'm wondering:

  1. Is there a reason as to why the version is not updated in this repository?
  2. How are you building the docker images then? Is there a hidden pre-configuration step that replaces the version?

Looking at a diff between git v0.24.3 and the docker container yields:

> diff -rq packages/backend/server /var/lib/containers/storage/overlay/437a72fce2762271b5a5da93b4b0b65c1633ab613f87a19f6d118efffb30404b/merged/app
Only in /var/lib/containers/storage/overlay/437a72fce2762271b5a5da93b4b0b65c1633ab613f87a19f6d118efffb30404b/merged/app: dist
Only in /var/lib/containers/storage/overlay/437a72fce2762271b5a5da93b4b0b65c1633ab613f87a19f6d118efffb30404b/merged/app: node_modules
Files packages/backend/server/package.json and /var/lib/containers/storage/overlay/437a72fce2762271b5a5da93b4b0b65c1633ab613f87a19f6d118efffb30404b/merged/app/package.json differ
Only in /var/lib/containers/storage/overlay/437a72fce2762271b5a5da93b4b0b65c1633ab613f87a19f6d118efffb30404b/merged/app: static

> diff packages/backend/server/package.json  /var/lib/containers/storage/overlay/437a72fce2762271b5a5da93b4b0b65c1633ab613f87a19f6d118efffb30404b/merged/app/package.json
4c4
<   "version": "0.22.4",
---
>   "version": "0.24.3",

Distribution version

Linux

App Version

v0.24.3

What browsers are you seeing the problem on if you're using web version?

No response

Are you self-hosting?

  • [x] Yes

Self-hosting Version

v0.24.3 (allegedly)

Relevant log output


Anything else?

No response

oddlama avatar Oct 11 '25 12:10 oddlama

Issue Status: 🆕 *Untriaged

*🆕 Untriaged

The team has not yet reviewed the issue. We usually do it within one business day. Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.

affine-issue-bot[bot] avatar Oct 11 '25 12:10 affine-issue-bot[bot]

Hi team!

I’d like to take this issue and open a small PR to align the backend server package.json version with the current tag (v0.24.3). Plan:

  • Update packages/backend/server/package.json "version" to 0.24.3.
  • Verify local build logs/version output.
  • Keep the change minimal (metadata only).

If there’s a preferred release/automation flow for version bumping (e.g., CI replaces versions at build), please let me know so I can follow it. Otherwise, I’ll proceed with the one-line fix.

Thanks!

Rameshkumar31595 avatar Oct 28 '25 05:10 Rameshkumar31595

Hi 👋 I’ve submitted a fix for this problem in PR #13816, which updates the backend package.json version to 0.24.3 so it matches the tagged build.

The PR is currently awaiting workflow approval (3, 2, 1 Launch and Labeler) since this is my first contribution.

Once those checks are approved and run, the PR should be ready for review and merge.

Rameshkumar31595 avatar Oct 28 '25 06:10 Rameshkumar31595

Hi @eximius313 @oddlama, I’ve opened PR #13816 to address this issue.
It updates the backend server package.json version to 0.24.3 to match the tagged build.
Please review when possible — all checks have passed locally.

Rameshkumar31595 avatar Oct 28 '25 07:10 Rameshkumar31595

@Rameshkumar31595 - why are you tagging me here?

eximius313 avatar Oct 28 '25 14:10 eximius313