Error when logining in
Happy Holidays! I'm trying to connect imessages to my Matrix homeserver but whenever I login and send the authentication code I get this error in the logs: "ERR Panic in Matrix command handler error="invalid memory address or nil pointer dereference". Is there anything I can do?
@juliettebee I was running into this issue also. I was able to resolve it by modifying the nac_validation_data_url: value in the bridge's config.yaml file.
The placeholder value is "http://example.com/validation_data", and I initially left the "/validation_data" path in the value. Setting this value to the url for my relay server, without a trailing / or anything else, got it working. Hope this helps you or others that may have this same problem.
I'm getting this error too and also set the nac_validation_data_url to the URL without any trailing slashes and nac_validation_is_relay to true and nac_validation_data_token to the same value as the REGISTRATION_RELAY_SECRET environment variable but I'm also getting the same nil pointer dereference with the following stack trace:
goroutine 213 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x5e
maunium.net/go/mautrix/bridge/commands.(*Processor).Handle.func1()
/builds/mautrix/imessagego/.cache/pkg/mod/maunium.net/go/[email protected]/bridge/commands/processor.go:67 +0x5f
panic({0xe8a840?, 0x17e4a50?})
/usr/local/go/src/runtime/panic.go:914 +0x21f
github.com/beeper/imessage/imessage/direct/ids.(*User).addPushHeaders(0xc0001dc300, 0xc000506300, {0xc000368140, 0x1e, 0x0?})
/builds/mautrix/imessagego/imessage/direct/ids/sign.go:51 +0x176
github.com/beeper/imessage/imessage/direct/ids.(*User).fetchHandles(0xc0001dc300, {0x1270698?, 0xc000241740?}, {0xc0008e5100, 0xd}, 0xc000695410)
/builds/mautrix/imessagego/imessage/direct/ids/user.go:143 +0x375
github.com/beeper/imessage/imessage/direct/ids.(*User).UpdateHandles(0xc0001dc300, {0x1270698, 0xc000241740})
/builds/mautrix/imessagego/imessage/direct/ids/user.go:170 +0x13a
github.com/beeper/imessage/imessage/direct.(*Connector).fetchHandlesForRegistration(0xc0008df9e0, {0x1270698?, 0xc000241740?})
/builds/mautrix/imessagego/imessage/direct/connector.go:275 +0x12e
github.com/beeper/imessage/imessage/direct.(*Connector).registerIDSWithRefreshCredentialErrors(0xc0008df9e0, {0x1270698?, 0xc000241740}, 0x0)
/builds/mautrix/imessagego/imessage/direct/connector.go:424 +0x2e7
github.com/beeper/imessage/imessage/direct.(*Connector).registerIDSForLogin(0xc0008df9e0, {0x1270698, 0xc000241740})
/builds/mautrix/imessagego/imessage/direct/connector.go:259 +0x28
github.com/beeper/imessage/imessage/direct.(*Connector).Login(0xc0008df9e0, {0x1270698?, 0xc000241740}, {0xc00059f4c6, 0x16}, {0xc00059f4dd, 0x19}, {0xc000981f60, 0x6})
/builds/mautrix/imessagego/imessage/direct/connector.go:624 +0xa45
main.fnLogin2fa(0xc0008a2b60)
/builds/mautrix/imessagego/commands.go:132 +0x118
main.init.wrapCommand.func1(0xc000344e00)
/builds/mautrix/imessagego/commands.go:43 +0xec
maunium.net/go/mautrix/bridge/commands.(*FullHandler).Run(0x17f4d40, 0xc000344e00)
/builds/mautrix/imessagego/.cache/pkg/mod/maunium.net/go/[email protected]/bridge/commands/handler.go:98 +0xfb
maunium.net/go/mautrix/bridge/commands.(*Processor).Handle(0xc00021a260, {0x1270698, 0xc000241740}, {0xc0005a1fb0, 0x22}, {0xc0005a1f80, 0x2c}, {0x1273c58?, 0xc00078c1c0}, {0xc000981f60, ...}, ...)
/builds/mautrix/imessagego/.cache/pkg/mod/maunium.net/go/[email protected]/bridge/commands/processor.go:115 +0xa86
created by maunium.net/go/mautrix/bridge.(*MatrixHandler).HandleMessage in goroutine 211
/builds/mautrix/imessagego/.cache/pkg/mod/maunium.net/go/[email protected]/bridge/matrix.go:579 +0xa0c
I'm also a bit confused on when we are even supposed to give the registration code that consists of four alphanumeric words of 4 characters.
The token is the registration code, not related to the relay secret
Ah, thanks a lot for clarifying that!
Logging in seems to be successful now :tada:, although messages aren't being bridged.
Ah, I got it now. I forgot to disable iMessage on the iPhone. After doing that, I was able to log in after 2 attempts and messages are actually being bridged!