anyproto / anytype-heart

Shared library for Anytype clients
https://anytype.io
Other
239 stars 47 forks source link

Can't log in due to: `grpc unary request is taking too long` error #1424

Open arran4 opened 3 months ago

arran4 commented 3 months ago

Have you read a contributing guide?

Current Behavior

When I try login to my local sync vault, either by entering the key or automatically at start it just hangs:

image

When I run it via the CLI:

% Anytype.AppImage -h                   
[ConfigManager].init: { channel: 'alpha', theme: 'system', debug: {}, flagsMw: {} }
[Server] start /tmp/.mount_AnytypQIygpw/resources/app.asar.unpacked/dist/anytypeHelper /home/arran/.config/anytype
mw grpc: build on 2024-07-25 16:43:32 +0000 UTC at #3bae9170cb650b4870e0fd467ce9a9e4f4439880

gRPC server started at: 127.0.0.1:34737
gRPC Web proxy started at: 127.0.0.1:43503

[UpdateManager].init, channel:  alpha
[InstallNativeMessaging] Manifest written: /home/arran/.config/google-chrome/NativeMessagingHosts/com.anytype.desktop.json
[InstallNativeMessaging] Manifest written: /home/arran/.config/chromium/NativeMessagingHosts/com.anytype.desktop.json
[InstallNativeMessaging] Manifest written: /home/arran/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/com.anytype.desktop.json
[InstallNativeMessaging] Manifest skipped: BraveFlatpak
11:33:57.865 › {"level":"WARN","ts":"2024-07-26T11:33:57.865+1000","logger":"common.nodeconf","msg":"periodic call error","error":"unable to connect"}

{"level":"WARN","ts":"2024-07-26T11:33:57.865+1000","logger":"common.nodeconf","msg":"periodic call error","error":"unable to connect"}

11:33:57.875 › 2024/07/26 11:33:57 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.

2024/07/26 11:33:57 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.

11:33:57.905 › {"level":"INFO","ts":"2024-07-26T11:33:57.905+1000","logger":"core.block.editor.spaceview","msg":"set space persistent info","spaceId":"bafyreie7cvsgqvpw3rkm66wpbtcfiaacy4ddqgfx3bl2wb2btm72354ivq.95hwpzouuvt7","spaceId":"bafyreie7cvsgqvpw3rkm66wpbtcfiaacy4ddqgfx3bl2wb2btm72354ivq.95hwpzouuvt7","accountStatus":"Unknown"}

{"level":"INFO","ts":"2024-07-26T11:33:57.905+1000","logger":"core.block.editor.spaceview","msg":"set space persistent info","spaceId":"bafyreie7cvsgqvpw3rkm66wpbtcfiaacy4ddqgfx3bl2wb2btm72354ivq.95hwpzouuvt7","spaceId":"bafyreie7cvsgqvpw3rkm66wpbtcfiaacy4ddqgfx3bl2wb2btm72354ivq.95hwpzouuvt7","accountStatus":"Unknown"}

11:34:02.843 › {"level":"WARN","ts":"2024-07-26T11:34:02.843+1000","logger":"app","msg":"components start in progress","total":0,"in_progress":""}

{"level":"WARN","ts":"2024-07-26T11:34:02.843+1000","logger":"app","msg":"components start in progress","total":0,"in_progress":""}

11:34:07.866 › {"level":"WARN","ts":"2024-07-26T11:34:07.866+1000","logger":"anytype-telemetry","msg":"grpc unary request is taking too long","method":"AccountSelect","ver":2,"in_progress":true,"goroutines":

{"level":"WARN","ts":"2024-07-26T11:34:07.866+1000","logger":"anytype-telemetry","msg":"grpc unary request is taking too long","method":"AccountSelect","ver":2,"in_progress":true,"goroutines":"

After CTRL+C

^C11:34:22.028 › before-quit
before-quit
11:34:22.030 › [Api].exit, relaunch: false
[Api].exit, relaunch: false
11:34:22.031 › {"level":"ERROR","ts":"2024-07-26T11:34:22.028+1000","logger":"anytype-mw-api","msg":"stream eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWVkIjoiaHJPT1FYT00ifQ.holOMHQICL_2gkLBdKi6_AQ4EmWu7lUQvT2pHxwIOWs interrupted"}
{"level":"ERROR","ts":"2024-07-26T11:34:22.029+1000","logger":"app","msg":"can't run service","service":"client.space","error":"init personal space: context canceled"}
{"level":"WARN","ts":"2024-07-26T11:34:22.029+1000","logger":"client.space","msg":"OnViewUpdated.startStatus error","error":"context canceled"}
{"level":"WARN","ts":"2024-07-26T11:34:22.029+1000","logger":"client.space","msg":"OnViewUpdated.startStatus error","error":"context canceled"}
{"level":"WARN","ts":"2024-07-26T11:34:22.029+1000","logger":"common.commonspace.headsync","msg":"periodic call error","spaceId":"bafyreicaz6ttksiupua3uel5byh2evthfkhrsagkokeswgeofo7i6gta6m.95hwpzouuvt7","error":"context canceled"}

{"level":"ERROR","ts":"2024-07-26T11:34:22.028+1000","logger":"anytype-mw-api","msg":"stream eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWVkIjoiaHJPT1FYT00ifQ.holOMHQICL_2gkLBdKi6_AQ4EmWu7lUQvT2pHxwIOWs interrupted"}
{"level":"ERROR","ts":"2024-07-26T11:34:22.029+1000","logger":"app","msg":"can't run service","service":"client.space","error":"init personal space: context canceled"}
{"level":"WARN","ts":"2024-07-26T11:34:22.029+1000","logger":"client.space","msg":"OnViewUpdated.startStatus error","error":"context canceled"}
{"level":"WARN","ts":"2024-07-26T11:34:22.029+1000","logger":"client.space","msg":"OnViewUpdated.startStatus error","error":"context canceled"}
{"level":"WARN","ts":"2024-07-26T11:34:22.029+1000","logger":"common.commonspace.headsync","msg":"periodic call error","spaceId":"bafyreicaz6ttksiupua3uel5byh2evthfkhrsagkokeswgeofo7i6gta6m.95hwpzouuvt7","error":"context canceled"}

11:34:22.034 › {"level":"WARN","ts":"2024-07-26T11:34:22.032+1000","logger":"common.commonspace","msg":"call space.Close on closed space","id":"bafyreicaz6ttksiupua3uel5byh2evthfkhrsagkokeswgeofo7i6gta6m.95hwpzouuvt7"}
{"level":"WARN","ts":"2024-07-26T11:34:22.032+1000","logger":"common.commonspace.headsync","msg":"periodic call error","spaceId":"bafyreie7cvsgqvpw3rkm66wpbtcfiaacy4ddqgfx3bl2wb2btm72354ivq.95hwpzouuvt7","error":"context canceled"}

{"level":"WARN","ts":"2024-07-26T11:34:22.032+1000","logger":"common.commonspace","msg":"call space.Close on closed space","id":"bafyreicaz6ttksiupua3uel5byh2evthfkhrsagkokeswgeofo7i6gta6m.95hwpzouuvt7"}
{"level":"WARN","ts":"2024-07-26T11:34:22.032+1000","logger":"common.commonspace.headsync","msg":"periodic call error","spaceId":"bafyreie7cvsgqvpw3rkm66wpbtcfiaacy4ddqgfx3bl2wb2btm72354ivq.95hwpzouuvt7","error":"context canceled"}

11:34:22.035 › {"level":"ERROR","ts":"2024-07-26T11:34:22.034+1000","logger":"net.transport.quic","msg":"listener closed with error","localAddr":"[::]:34815","error":"context canceled"}

{"level":"ERROR","ts":"2024-07-26T11:34:22.034+1000","logger":"net.transport.quic","msg":"listener closed with error","localAddr":"[::]:34815","error":"context canceled"}

11:34:22.058 › [Api].shutdown, relaunch: false
[Api].shutdown, relaunch: false

When I press back I am greeted with the following message:

vlcsnap-2024-07-26-11h41m36s370

However it's displayed too quickly to read.


### Expected Behavior

I expect to be able to "login" and see my vault+spaces

### Steps To Reproduce

Install it (gentoo)

% sudo emerge -va anytype-ts-appimage --autounmask --autounmask-continue Password:

These are the packages that would be merged, in order:

Calculating dependencies... done! Dependency resolution took 2.11 s (backtrack: 0/20).

[ebuild R ~] app-text/anytype-ts-appimage-0.41.37_alpha::arrans-overlay 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


Use it. Try open it later.

### Environment

```markdown
- OS:

cat /etc/os-release 
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
VERSION_ID="2.15"
0.41.37_alpha


### Anything else?

_No response_
arran4 commented 3 months ago

I've confirmed that the same issue occurs with the non-app image binary distribution too.

arran4 commented 3 months ago

The instructions to run:

arran@arran-desktop:/home/arran/Downloads/anytype-0.41.37-alpha 26635 
% sudo sysctl -w net.core.rmem_max=7500000
sudo sysctl -w net.core.wmem_max=7500000
net.core.rmem_max = 7500000
net.core.wmem_max = 7500000

From https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes

Also doesn't work.

However it does cause the QUIC error to disappear.

Please note:

image

arran4 commented 3 months ago

Devtools during the frozen login process:

image

arran4 commented 3 months ago

image

arran4 commented 3 months ago

stack.20240726.115835.13.zip

Generated a stack dump

arran4 commented 3 months ago

Using CTRL+Q in app while it's trying to login leads to this stack:

12:03:47.386 › [Api].exit, relaunch: undefined
[Api].exit, relaunch: undefined
12:03:47.389 › {"level":"ERROR","ts":"2024-07-26T12:03:47.388+1000","logger":"anytype-mw-api","msg":"stream eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWVkIjoiSnZwQ3VEbFUifQ.ozYcf41Xqne7olrvt_SK9nS-geujtjx4CKubi8bzXAo interrupted"}
{"level":"ERROR","ts":"2024-07-26T12:03:47.389+1000","logger":"app","msg":"can't run service","service":"client.space","error":"init personal space: context canceled"}

{"level":"ERROR","ts":"2024-07-26T12:03:47.388+1000","logger":"anytype-mw-api","msg":"stream eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWVkIjoiSnZwQ3VEbFUifQ.ozYcf41Xqne7olrvt_SK9nS-geujtjx4CKubi8bzXAo interrupted"}
{"level":"ERROR","ts":"2024-07-26T12:03:47.389+1000","logger":"app","msg":"can't run service","service":"client.space","error":"init personal space: context canceled"}

12:03:47.393 › {"level":"WARN","ts":"2024-07-26T12:03:47.389+1000","logger":"client.space","msg":"OnViewUpdated.startStatus error","error":"context canceled"}
{"level":"WARN","ts":"2024-07-26T12:03:47.389+1000","logger":"client.space","msg":"OnViewUpdated.startStatus error","error":"context canceled"}
{"level":"WARN","ts":"2024-07-26T12:03:47.389+1000","logger":"common.commonspace.headsync","msg":"periodic call error","spaceId":"bafyreicaz6ttksiupua3uel5byh2evthfkhrsagkokeswgeofo7i6gta6m.95hwpzouuvt7","error":"context canceled"}
{"level":"WARN","ts":"2024-07-26T12:03:47.393+1000","logger":"common.commonspace","msg":"call space.Close on closed space","id":"bafyreicaz6ttksiupua3uel5byh2evthfkhrsagkokeswgeofo7i6gta6m.95hwpzouuvt7"}

{"level":"WARN","ts":"2024-07-26T12:03:47.389+1000","logger":"client.space","msg":"OnViewUpdated.startStatus error","error":"context canceled"}
{"level":"WARN","ts":"2024-07-26T12:03:47.389+1000","logger":"client.space","msg":"OnViewUpdated.startStatus error","error":"context canceled"}
{"level":"WARN","ts":"2024-07-26T12:03:47.389+1000","logger":"common.commonspace.headsync","msg":"periodic call error","spaceId":"bafyreicaz6ttksiupua3uel5byh2evthfkhrsagkokeswgeofo7i6gta6m.95hwpzouuvt7","error":"context canceled"}
{"level":"WARN","ts":"2024-07-26T12:03:47.393+1000","logger":"common.commonspace","msg":"call space.Close on closed space","id":"bafyreicaz6ttksiupua3uel5byh2evthfkhrsagkokeswgeofo7i6gta6m.95hwpzouuvt7"}

12:03:47.395 › {"level":"WARN","ts":"2024-07-26T12:03:47.393+1000","logger":"common.commonspace.headsync","msg":"periodic call error","spaceId":"bafyreie7cvsgqvpw3rkm66wpbtcfiaacy4ddqgfx3bl2wb2btm72354ivq.95hwpzouuvt7","error":"context canceled"}

{"level":"WARN","ts":"2024-07-26T12:03:47.393+1000","logger":"common.commonspace.headsync","msg":"periodic call error","spaceId":"bafyreie7cvsgqvpw3rkm66wpbtcfiaacy4ddqgfx3bl2wb2btm72354ivq.95hwpzouuvt7","error":"context canceled"}

12:03:47.396 › {"level":"ERROR","ts":"2024-07-26T12:03:47.395+1000","logger":"net.transport.quic","msg":"listener closed with error","localAddr":"[::]:34815","error":"context canceled"}

{"level":"ERROR","ts":"2024-07-26T12:03:47.395+1000","logger":"net.transport.quic","msg":"listener closed with error","localAddr":"[::]:34815","error":"context canceled"}

12:03:47.421 › goroutine 676 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.22.5/x64/src/runtime/debug/stack.go:24 +0x5e
github.com/anyproto/anytype-heart/core.(*Middleware).OnPanic(0x462da20?, {0x2492320, 0x462dc90})
        /home/runner/work/anytype-heart/anytype-heart/core/core.go:98 +0x27
main.onDefaultError(0x2ddebc0?, {0x2492320?, 0x462dc90?}, {0x462da20?, 0xc002573190?})
        /home/runner/work/anytype-heart/anytype-heart/cmd/grpcserver/grpc.go:270 +0x25
main.main.appendInterceptor.func14.1()
        /home/runner/work/anytype-heart/anytype-heart/cmd/grpcserver/grpc.go:259 +0xad
panic({0x2492320?, 0x462dc90?})
        /opt/hostedtoolcache/go/1.22.5/x64/src/runtime/panic.go:770 +0x132
github.com/anyproto/any-sync/app.(*App).Component(0xc002635f80?, {0x2851d43, 0x5})
        /home/runner/go/pkg/mod/github.com/anyproto/any-sync@v0.4.21/app/app.go:156 +0x39
github.com/anyproto/any-sync/app.(*App).MustComponent(0xc000920000?, {0x2851d43, 0x5})
        /home/runner/go/pkg/mod/github.com/anyproto/any-sync@v0.4.21/app/app.go:172 +0x25
github.com/anyproto/anytype-heart/core.(*Middleware).DebugStat(0x46391d0?, {0x284e6c0?, 0x7fb70579c108?}, 0x8?)
        /home/runner/work/anytype-heart/anytype-heart/core/debug.go:105 +0x36
github.com/anyproto/anytype-heart/pb/service._ClientCommands_DebugStat_Handler.func1({0x2e07ac0?, 0xc00246ab40?}, {0x2705a60?, 0x4c3f000?})
        /home/runner/work/anytype-heart/anytype-heart/pb/service/service.pb.go:7936 +0xce
main.main.appendInterceptor.func14({0x2e07ac0?, 0xc00246ab40?}, {0x2705a60?, 0x4c3f000?}, 0x2387220?, 0x2dd7570?)
        /home/runner/work/anytype-heart/anytype-heart/cmd/grpcserver/grpc.go:264 +0x8c
main.main.ChainUnaryServer.func17.1({0x2e07ac0?, 0xc00246ab40?}, {0x2705a60?, 0x4c3f000?})
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:48 +0x45
github.com/anyproto/anytype-heart/metrics.SharedLongMethodsInterceptor({0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, {0x28986e7, 0x9}, 0xc001d48c80)
        /home/runner/work/anytype-heart/anytype-heart/metrics/interceptors.go:196 +0x32e
github.com/anyproto/anytype-heart/metrics.LongMethodsInterceptor({0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, 0xc000058ea0?, 0xc001d48c80)
        /home/runner/work/anytype-heart/anytype-heart/metrics/interceptors.go:160 +0x7f
main.main.ChainUnaryServer.func17.1({0x2e07ac0?, 0xc00246a3f0?}, {0x2705a60?, 0x4c3f000?})
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:48 +0x45
github.com/anyproto/anytype-heart/core.(*Middleware).Authorize(0xc0000b2ba0, {0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, 0x10?, 0xc001d48cc0)
        /home/runner/work/anytype-heart/anytype-heart/core/auth.go:43 +0x250
main.main.func2({0x2e07ac0?, 0xc00246a3f0?}, {0x2705a60?, 0x4c3f000?}, 0xc0009b7818?, 0x49d4af?)
        /home/runner/work/anytype-heart/anytype-heart/cmd/grpcserver/grpc.go:112 +0x4d
main.main.ChainUnaryServer.func17.1({0x2e07ac0?, 0xc00246a3f0?}, {0x2705a60?, 0x4c3f000?})
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:48 +0x45
github.com/anyproto/anytype-heart/metrics.SharedTraceInterceptor({0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, {0x28986e7, 0x9}, 0xc001d48d00)
        /home/runner/work/anytype-heart/anytype-heart/metrics/interceptors.go:65 +0x133
github.com/anyproto/anytype-heart/metrics.UnaryTraceInterceptor({0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, 0x0?, 0xc001d48d00)
        /home/runner/work/anytype-heart/anytype-heart/metrics/interceptors.go:51 +0x7f
main.main.ChainUnaryServer.func17({0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, 0xc0016a4e60, 0x24832c0?)
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:53 +0x123
github.com/anyproto/anytype-heart/pb/service._ClientCommands_DebugStat_Handler({0x284e6c0, 0xc0000b2ba0}, {0x2e07ac0, 0xc00246a3f0}, 0x27e9660?, 0xc00091d4a0)
        /home/runner/work/anytype-heart/anytype-heart/pb/service/service.pb.go:7938 +0x136
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000474e00, {0x2e07ac0, 0xc00236b050}, {0x2e196e0, 0xc00231c1a0}, 0xc003e02480, 0xc00091d5f0, 0x468ebd8, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1379 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc000474e00, {0x2e196e0, 0xc00231c1a0}, 0xc003e02480)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1790 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1029 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 75
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1040 +0x125
{"level":"ERROR","ts":"2024-07-26T12:03:47.421+1000","logger":"anytype-mw-api","msg":"panic recovered: runtime error: invalid memory address or nil pointer dereference","stack":"

goroutine 676 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.22.5/x64/src/runtime/debug/stack.go:24 +0x5e
github.com/anyproto/anytype-heart/core.(*Middleware).OnPanic(0x462da20?, {0x2492320, 0x462dc90})
        /home/runner/work/anytype-heart/anytype-heart/core/core.go:98 +0x27
main.onDefaultError(0x2ddebc0?, {0x2492320?, 0x462dc90?}, {0x462da20?, 0xc002573190?})
        /home/runner/work/anytype-heart/anytype-heart/cmd/grpcserver/grpc.go:270 +0x25
main.main.appendInterceptor.func14.1()
        /home/runner/work/anytype-heart/anytype-heart/cmd/grpcserver/grpc.go:259 +0xad
panic({0x2492320?, 0x462dc90?})
        /opt/hostedtoolcache/go/1.22.5/x64/src/runtime/panic.go:770 +0x132
github.com/anyproto/any-sync/app.(*App).Component(0xc002635f80?, {0x2851d43, 0x5})
        /home/runner/go/pkg/mod/github.com/anyproto/any-sync@v0.4.21/app/app.go:156 +0x39
github.com/anyproto/any-sync/app.(*App).MustComponent(0xc000920000?, {0x2851d43, 0x5})
        /home/runner/go/pkg/mod/github.com/anyproto/any-sync@v0.4.21/app/app.go:172 +0x25
github.com/anyproto/anytype-heart/core.(*Middleware).DebugStat(0x46391d0?, {0x284e6c0?, 0x7fb70579c108?}, 0x8?)
        /home/runner/work/anytype-heart/anytype-heart/core/debug.go:105 +0x36
github.com/anyproto/anytype-heart/pb/service._ClientCommands_DebugStat_Handler.func1({0x2e07ac0?, 0xc00246ab40?}, {0x2705a60?, 0x4c3f000?})
        /home/runner/work/anytype-heart/anytype-heart/pb/service/service.pb.go:7936 +0xce
main.main.appendInterceptor.func14({0x2e07ac0?, 0xc00246ab40?}, {0x2705a60?, 0x4c3f000?}, 0x2387220?, 0x2dd7570?)
        /home/runner/work/anytype-heart/anytype-heart/cmd/grpcserver/grpc.go:264 +0x8c
main.main.ChainUnaryServer.func17.1({0x2e07ac0?, 0xc00246ab40?}, {0x2705a60?, 0x4c3f000?})
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:48 +0x45
github.com/anyproto/anytype-heart/metrics.SharedLongMethodsInterceptor({0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, {0x28986e7, 0x9}, 0xc001d48c80)
        /home/runner/work/anytype-heart/anytype-heart/metrics/interceptors.go:196 +0x32e
github.com/anyproto/anytype-heart/metrics.LongMethodsInterceptor({0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, 0xc000058ea0?, 0xc001d48c80)
        /home/runner/work/anytype-heart/anytype-heart/metrics/interceptors.go:160 +0x7f
main.main.ChainUnaryServer.func17.1({0x2e07ac0?, 0xc00246a3f0?}, {0x2705a60?, 0x4c3f000?})
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:48 +0x45
github.com/anyproto/anytype-heart/core.(*Middleware).Authorize(0xc0000b2ba0, {0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, 0x10?, 0xc001d48cc0)
        /home/runner/work/anytype-heart/anytype-heart/core/auth.go:43 +0x250
main.main.func2({0x2e07ac0?, 0xc00246a3f0?}, {0x2705a60?, 0x4c3f000?}, 0xc0009b7818?, 0x49d4af?)
        /home/runner/work/anytype-heart/anytype-heart/cmd/grpcserver/grpc.go:112 +0x4d
main.main.ChainUnaryServer.func17.1({0x2e07ac0?, 0xc00246a3f0?}, {0x2705a60?, 0x4c3f000?})
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:48 +0x45
github.com/anyproto/anytype-heart/metrics.SharedTraceInterceptor({0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, {0x28986e7, 0x9}, 0xc001d48d00)
        /home/runner/work/anytype-heart/anytype-heart/metrics/interceptors.go:65 +0x133
github.com/anyproto/anytype-heart/metrics.UnaryTraceInterceptor({0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, 0x0?, 0xc001d48d00)
        /home/runner/work/anytype-heart/anytype-heart/metrics/interceptors.go:51 +0x7f
main.main.ChainUnaryServer.func17({0x2e07ac0, 0xc00246a3f0}, {0x2705a60, 0x4c3f000}, 0xc0016a4e60, 0x24832c0?)
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:53 +0x123
github.com/anyproto/anytype-heart/pb/service._ClientCommands_DebugStat_Handler({0x284e6c0, 0xc0000b2ba0}, {0x2e07ac0, 0xc00246a3f0}, 0x27e9660?, 0xc00091d4a0)
        /home/runner/work/anytype-heart/anytype-heart/pb/service/service.pb.go:7938 +0x136
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000474e00, {0x2e07ac0, 0xc00236b050}, {0x2e196e0, 0xc00231c1a0}, 0xc003e02480, 0xc00091d5f0, 0x468ebd8, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1379 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc000474e00, {0x2e196e0, 0xc00231c1a0}, 0xc003e02480)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1790 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1029 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 75
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1040 +0x125
{"level":"ERROR","ts":"2024-07-26T12:03:47.421+1000","logger":"anytype-mw-api","msg":"panic recovered: runtime error: invalid memory address or nil pointer dereference","stack":"
arran4 commented 3 months ago

If I wanted to backup what I have as is, how would I do that?

deff7 commented 3 months ago

@arran4 hey! Did you switch version channel before (from beta to alpha, for example)? Different version channels use different directories for local data storage

arran4 commented 3 months ago

@arran4 hey! Did you switch version channel before (from beta to alpha, for example)? Different version channels use different directories for local data storage

Yes, I stayed "latest"

deff7 commented 3 months ago

Screenshot 2024-07-26 at 10 30 13

Try opening work directory via File -> Show Directory -> Work and looking for the largest dir with your data in either data/{your identity} or beta/data/{your identity}. First of all, close Anytype app, back up all your data directories, then try to copy contents to alpha/data/{your identity}.

Be careful with alpha versions, use them only if you really want to experiment with the latest potentially unstable updates

arran4 commented 3 months ago

So about the issue preventing me from logging in. What should I do?

deff7 commented 3 months ago

you should try to copy your data to alpha/data, I think that Anytype can't find your local data and tries to get it from local peers

arran4 commented 3 months ago

Because I have been through a couple versions it pre-exists:

image

Versions: (in order)

( See: https://github.com/arran4/arrans_overlay/tree/main/app-text/anytype-ts-appimage + I downloaded one or two manually )

I might have attempted to use 34-beta after alpha failed. However when using beta I had to open and close it a couple times. So beta was failing in the same way. Although now I'm worried about the diff between the data sets.

image

Although it looks like you might be spot on. I am going to try clear it out all but beta then rename it. Now that I have a backup.


Okay that worked.


How should I migrate to new versions in the future?

arran4 commented 3 months ago

I must have failed to upgrade to alpha before today.

arran4 commented 3 months ago

Okay.. I slept on it.. My behavior was:

I tested with an Alpha..

Then I used the last stable. Setup ebuild. Preferred the layout of the alpha. Was cautious so used a beta.

Added the alpha ebuilds, upgraded, failed to login.

So I feel as though there needs to be:

It looks like as the alpha didn't have the vault/space I was trying to use, if it just copied the vault/space over it would have been fine. But I haven't looked into the data structure so I can't comment.

arran4 commented 2 months ago

I'm effectively doing this every time I start the app

image