AFFiNE icon indicating copy to clipboard operation
AFFiNE copied to clipboard

​`acceptInviteById` throws `NotFoundError: No Snapshot found`

Open michalpulpan opened this issue 1 year ago • 4 comments

What happened?

Hello everyone,

firstly - thanks to all contributors for this project. I'm trying to run self-hosted version on my VPS and having a trouble with both sending and accepting invitations. I've setup email connection correctly (sign-up, sing-in and password reset emails are working fine). However, when I try to send invitation to already created/new account I get error from GraphQL (Too many requests). Snímek obrazovky 2024-08-05 v 14 15 41

When I try to run acceptInvitationById in /graphql console I get NotFoundError: No Snapshot found

affine_selfhosted  | [Nest] 110  - 08/05/2024, 12:11:34 PM     LOG [App] AFFiNE Server is running in [selfhosted] mode
affine_selfhosted  | [Nest] 110  - 08/05/2024, 12:11:34 PM     LOG [App] Listening on http://0.0.0.0:3010
affine_selfhosted  | [Nest] 110  - 08/05/2024, 12:11:34 PM     LOG [App] And the public server should be recognized as https://example.com
affine_selfhosted  | [Nest] 110  - 08/05/2024, 12:12:21 PM VERBOSE [CacheInterceptor] cache blobs:8bfa8e1e-6506-40d1-8cf6-b525bac1ae56 miss
affine_selfhosted  | [Nest] 110  - 08/05/2024, 12:12:32 PM VERBOSE [CacheInterceptor] cache blobs:8bfa8e1e-6506-40d1-8cf6-b525bac1ae56 hit
affine_selfhosted  | [Nest] 110  - 08/05/2024, 12:12:47 PM VERBOSE [CacheInterceptor] cache blobs:8bfa8e1e-6506-40d1-8cf6-b525bac1ae56 hit
affine_selfhosted  | [Nest] 110  - 08/05/2024, 12:12:59 PM   ERROR [GraphQL] Internal server error
affine_selfhosted  | NotFoundError: No Snapshot found
affine_selfhosted  |     at /app/node_modules/@prisma/client/runtime/library.js:31:611
affine_selfhosted  |     at async /app/node_modules/@prisma/client/runtime/library.js:31:551
affine_selfhosted  |     at async WorkspaceResolver.getInviteInfo (file:///app/dist/core/workspaces/resolvers/workspace.js:330:26)
affine_selfhosted  |     at async WorkspaceResolver.acceptInviteById (file:///app/dist/core/workspaces/resolvers/workspace.js:363:56)

I've tried both canary and stable versions and get this error. However the hosted version (on affine.pro) works fine for me.

Has anyone experienced this issue?

Thank you in advance

Distribution version

Linux

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

Chrome, Safari

Are you self-hosting?

  • [X] Yes

Relevant log output

affine_selfhosted  | [Nest] 110  - 08/05/2024, 12:12:21 PM VERBOSE [CacheInterceptor] cache blobs:8bfa8e1e-6506-40d1-8cf6-b525bac1ae56 miss
affine_selfhosted  | [Nest] 110  - 08/05/2024, 12:12:32 PM VERBOSE [CacheInterceptor] cache blobs:8bfa8e1e-6506-40d1-8cf6-b525bac1ae56 hit
affine_selfhosted  | [Nest] 110  - 08/05/2024, 12:12:47 PM VERBOSE [CacheInterceptor] cache blobs:8bfa8e1e-6506-40d1-8cf6-b525bac1ae56 hit
affine_selfhosted  | [Nest] 110  - 08/05/2024, 12:12:59 PM   ERROR [GraphQL] Internal server error
affine_selfhosted  | NotFoundError: No Snapshot found
affine_selfhosted  |     at /app/node_modules/@prisma/client/runtime/library.js:31:611
affine_selfhosted  |     at async /app/node_modules/@prisma/client/runtime/library.js:31:551
affine_selfhosted  |     at async WorkspaceResolver.getInviteInfo (file:///app/dist/core/workspaces/resolvers/workspace.js:330:26)
affine_selfhosted  |     at async WorkspaceResolver.acceptInviteById (file:///app/dist/core/workspaces/resolvers/workspace.js:363:56)

Anything else?

No response

michalpulpan avatar Aug 05 '24 12:08 michalpulpan

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 Aug 05 '24 12:08 affine-issue-bot[bot]

the error complains about the data of workspace hasn't been sync to server before you try to invite anyone else to the workspace. if you may check the snapshots table in database on your instance to see whether there is any record save with the id of your workspace, which you can find in the workspace url /workspace/${workspaceId}

forehalo avatar Aug 09 '24 02:08 forehalo

the error complains about the data of workspace hasn't been sync to server before you try to invite anyone else to the workspace. if you may check the snapshots table in database on your instance to see whether there is any record save with the id of your workspace, which you can find in the workspace url /workspace/${workspaceId}

Thank you for this information. Snapshots aren't present in table, do you have any idea why that could happen? Thanks!

michalpulpan avatar Aug 11 '24 20:08 michalpulpan

i've got same error. any workaround what to do?

fforregs avatar Aug 19 '24 14:08 fforregs