Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when logining in #12

Open
juliettebee opened this issue Dec 31, 2023 · 5 comments
Open

Error when logining in #12

juliettebee opened this issue Dec 31, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@juliettebee
Copy link

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 juliettebee added the bug Something isn't working label Dec 31, 2023
@ricardo-maestas
Copy link

@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.

@gabrc52
Copy link

gabrc52 commented Jan 15, 2024

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.

@tulir
Copy link
Member

tulir commented Jan 15, 2024

The token is the registration code, not related to the relay secret

@gabrc52
Copy link

gabrc52 commented Jan 15, 2024

Ah, thanks a lot for clarifying that!

image

Logging in seems to be successful now 🎉, although messages aren't being bridged.

@gabrc52
Copy link

gabrc52 commented Jan 15, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

4 participants