mautrix / imessage

A Matrix-iMessage puppeting bridge
https://go.mau.fi/mautrix-imessage/
GNU Affero General Public License v3.0
345 stars 37 forks source link

Panic: runtime error MacNoSIPConnector #15

Closed tpeacock19 closed 3 years ago

tpeacock19 commented 3 years ago

I'm receiving the below error when I try to run mautrix-imessage set up for mac-nosip. However, I haven't ever gotten no-sip to work even though I believe to have set it up correctly.

I've included logs below:

user@macos mautrix-imessage % ./mautrix-imessage 
[Aug 26, 2021 16:47:43] [INFO] Initializing mautrix-imessage 0.1.0+dev.45190ed2 (Aug 26 2021, 16:41:50)
[Aug 26, 2021 16:47:43] [DEBUG] Initializing database connection
[Aug 26, 2021 16:47:43] [DEBUG] Initializing state store
[Aug 26, 2021 16:47:43] [DEBUG] Initializing Matrix event processor
[Aug 26, 2021 16:47:43] [DEBUG] Initializing Matrix event handler
[Aug 26, 2021 16:47:43] [DEBUG] Initializing iMessage connector
[Aug 26, 2021 16:47:43] [INFO] Bridge initialization complete, starting...
[Aug 26, 2021 16:47:43] [DEBUG] Running database upgrades
[Aug 26, 2021 16:47:43] [Database/Upgrade/INFO] Database currently on v3, latest: v3
[Aug 26, 2021 16:47:43] [DEBUG] Checking connection to homeserver
[Aug 26, 2021 16:47:43] [Crypto/Helper/DEBUG] Initializing end-to-bridge encryption...
[Aug 26, 2021 16:47:43] [Crypto/Helper/DEBUG] Found existing device ID for bot in database: ZJIMZBXVNQ
[Aug 26, 2021 16:47:43] [Crypto/Bot/DEBUG] req #2: GET https://m.example.com/_matrix/client/r0/login
[Aug 26, 2021 16:47:43] [Crypto/Bot/DEBUG] req #3: POST https://m.example.com/_matrix/client/r0/login {"type":"uk.half-shot.msc2778.login.application_service","identifier":{"type":"m.id.user","user":"@imessagebot:example.com"},"device_id":"ZJIMZBXVNQ","initial_device_display_name":"iMessage Bridge"}
[Aug 26, 2021 16:47:43] [Crypto/Helper/DEBUG] Logged in as bridge bot with device ID ZJIMZBXVNQ
[Aug 26, 2021 16:47:43] [DEBUG] Finding bridge user
[Aug 26, 2021 16:47:43] [Matrix/@matrixuser:example.com/DEBUG] req #4: GET https://m.example.com/_matrix/client/r0/account/whoami
[Aug 26, 2021 16:47:43] [User/@matrixuser:example.com/INFO] Successfully automatically enabled custom puppet
[Aug 26, 2021 16:47:43] [DEBUG] Connecting to iMessage
[Aug 26, 2021 16:47:43] [DEBUG] Starting application service websocket
[Aug 26, 2021 16:47:43] [DEBUG] Starting event processor
[Aug 26, 2021 16:47:43] [DEBUG] Starting iMessage handler
[Aug 26, 2021 16:47:43] [DEBUG] Starting IPC loop
[Aug 26, 2021 16:47:43] [INFO] Initialization complete
[Aug 26, 2021 16:47:43] [INFO] Bridge started!
[Aug 26, 2021 16:47:43] [iMessage/Mac-noSIP/DEBUG] Preparing to execute /Users/user/Documents/matrix/imessage-rest/Build/macOS/Build/Products/Debug/barcelona-mautrix
[Aug 26, 2021 16:47:43] [DEBUG] Periodic sync is enabled
[Aug 26, 2021 16:47:43] [DEBUG] Updating bot profile
[Aug 26, 2021 16:47:43] [Crypto/Helper/DEBUG] End-to-bridge encryption is in appservice mode
[Aug 26, 2021 16:47:43] [Portal/iMessage;-;[PHONE NUMBER]/DEBUG] Starting message processing loop
[Aug 26, 2021 16:47:43] [Portal/iMessage;+;[CHAT NUMBER]/DEBUG] Starting message processing loop
[Aug 26, 2021 16:47:43] [Portal/iMessage;+;[CHAT NUMBER]/DEBUG] Starting message processing loop
[Aug 26, 2021 16:47:43] [Portal/iMessage;-;[PHONE NUMBER]/DEBUG] Starting message processing loop
[Aug 26, 2021 16:47:43] [Portal/SMS;-;[PHONE NUMBER]/DEBUG] Starting message processing loop
[Aug 26, 2021 16:47:43] [Portal/iMessage;-;[PHONE NUMBER]/DEBUG] Starting message processing loop
...
[Aug 26, 2021 16:47:43] [Portal/SMS;-;[PHONE NUMBER]/DEBUG] Starting message processing loop
[Aug 26, 2021 16:47:43] [Portal/SMS;-;[PHONE NUMBER]/DEBUG] Starting message processing loop
[Aug 26, 2021 16:47:43] [Portal/iMessage;-;[PHONE NUMBER]/DEBUG] Starting message processing loop
[Aug 26, 2021 16:47:43] [Matrix/DEBUG] Appservice transaction websocket connected
[Aug 26, 2021 16:47:43] [DEBUG] Sending /sync start request through websocket
[Aug 26, 2021 16:47:43] [DEBUG] Sending bridge status to server
[Aug 26, 2021 16:47:43] [iMessage/Mac-noSIP/DEBUG] Process started, PID 4050
[Aug 26, 2021 16:47:43] [iMessage/Mac-noSIP/IPC/DEBUG] Standard input closed, ending IPC loop
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x453a480]

goroutine 52 [running]:
os.(*ProcessState).exited(...)
        /usr/local/opt/go/libexec/src/os/exec_posix.go:82
os.(*ProcessState).Exited(...)
        /usr/local/opt/go/libexec/src/os/exec.go:150
go.mau.fi/mautrix-imessage/imessage/mac-nosip.(*MacNoSIPConnector).Start.func1(0xc00025c0a0, 0xc0000bb220)
        /Users/user/Documents/matrix/mautrix-imessage/imessage/mac-nosip/nosip.go:77 +0x40
created by go.mau.fi/mautrix-imessage/imessage/mac-nosip.(*MacNoSIPConnector).Start
        /Users/user/Documents/matrix/mautrix-imessage/imessage/mac-nosip/nosip.go:75 +0x35a
user@matrix:~/synapse/appservice/syncproxy$ source ./env && ./mautrix-syncproxy 
[Aug 26, 2021 23:46:23] [INFO] Starting old active targets
[Aug 26, 2021 23:46:23] [INFO] Started 0 active targets out of 1 total old targets
[Aug 26, 2021 23:46:23] [INFO] Starting to listen on localhost:29332
[Aug 26, 2021 23:47:45] [DEBUG] Received PUT request with &{AppserviceID:imessage BotAccessToken:syt_aW1lc3NhZ2Vib3Q_iBjbllLOZVCiJoAXGhvV_415HZ6 HSToken:OSxeZNXr7YCCTyFU95irZN7oE1TA0Vd6GAmQpMZxKJHBM4aWTBXwD4vdQJr4ida2 Address:http://localhost:29331 UserID:@imessagebot:example.com DeviceID:ZJIMZBXVNQ IsProxy:false NextBatch: Active:false client:<nil> log:<nil> running:false cancel:<nil> wg:{noCopy:{} state1:[0 0 0]} lock:{state:0 sema:0}}
[Aug 26, 2021 23:47:45] [Target-imessage/DEBUG] Upserting target for PUT request
[Aug 26, 2021 23:47:45] [Target-imessage/DEBUG] Starting target for PUT request
[Aug 26, 2021 23:47:46] [Target-imessage/Sync-1/DEBUG] Locking mutex to start syncing
[Aug 26, 2021 23:47:46] [Target-imessage/Sync-1/INFO] Starting syncing
[Aug 26, 2021 23:47:46] [Target-imessage/DEBUG] Stopping syncing...
[Aug 26, 2021 23:47:46] [Target-imessage/DEBUG] Waiting for syncing to stop
[Aug 26, 2021 23:47:46] [Target-imessage/Sync-1/DEBUG] Sync returned error request error: Get "http://localhost:8008/_matrix/client/r0/sync?filter=0&set_presence=offline&timeout=30000": context canceled, but context had different error context canceled
[Aug 26, 2021 23:47:46] [Target-imessage/Sync-1/INFO] Syncing stopped
[Aug 26, 2021 23:47:46] [Target-imessage/Sync-1/DEBUG] Unlocking mutex
[Aug 26, 2021 23:47:46] [Target-imessage/INFO] Target stopped after DELETE request
user@matrix:~/synapse/appservice/wsproxy$ ./mautrix-wsproxy
2021/08/26 23:46:10 Found 1 appservice in config.yaml
2021/08/26 23:46:10 Starting to listen on localhost:29331
2021/08/26 23:47:45 imessage connected to websocket
2021/08/26 23:47:45 Starting sync proxy for imessage / @imessagebot:example.com / ZJIMZBXVNQ
2021/08/26 23:47:46 Sending response {ReqID:1 Command:response Data:<nil>}
2021/08/26 23:47:46 Unknown command bridge_status in request #0 from websocket. Data: {"state_event":"CONNECTED","timestamp":1630021663,"ttl":600,"source":"bridge","user_id":"@matrixuser:example.com"}
2021/08/26 23:47:46 Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF
2021/08/26 23:47:46 imessage disconnected from websocket
tpeacock19 commented 3 years ago

Sorry for the noise, I did not have amfi properly disabled.