BlueBubblesApp / bluebubbles-server

Server for forwarding iMessages to clients within the BlueBubbles App ecosystem
https://bluebubbles.app
Apache License 2.0
554 stars 47 forks source link

Cannot read properties of null (reading 'client') at getClientConfig #538

Closed ssafar closed 1 year ago

ssafar commented 1 year ago

Installed BlueBubbles on 10.13; it works nicely in terms of actually picking up messages from iMessage (as per the debug logs). However, when trying the web app (... or just curl http://[server uri:port]/api/v1/fcm/client?guid=[password]), it fails & supplies a stack trace of

TypeError: Cannot read properties of null (reading 'client') 
at getClientConfig (/Applications/BlueBubbles.app/Contents/Resources/app.asar/dist/main.js:1:171081) 
at dispatch (/Applications/BlueBubbles.app/Contents/Resources/app.asar/node_modules/koa-compose/index.js:42:32) 
at Jl (/Applications/BlueBubbles.app/Contents/Resources/app.asar/dist/main.js:1:87527) 
at dispatch (/Applications/BlueBubbles.app/Contents/Resources/app.asar/node_modules/koa-compose/index.js:42:32) at ld (/Applications/BlueBubbles.app/Contents/Resources/app.asar/dist/main.js:1:178511) 
at dispatch (/Applications/BlueBubbles.app/Contents/Resources/app.asar/node_modules/koa-compose/index.js:42:32) 
at cd (/Applications/BlueBubbles.app/Contents/Resources/app.asar/dist/main.js:1:178891) 
at dispatch (/Applications/BlueBubbles.app/Contents/Resources/app.asar/node_modules/koa-compose/index.js:42:32) at gd (/Applications/BlueBubbles.app/Contents/Resources/app.asar/dist/main.js:1:179270) 
at dispatch (/Applications/BlueBubbles.app/Contents/Resources/app.asar/node_modules/koa-compose/index.js:42:32)

I tried building the app but got stuck at trying to persuade node-mac-permissions & node-mac-contacts to work (... 10.13, a lot of required APIs don't exist... although I'm kinda curious how do you build it so that it _works_on 10.13?). Is there a non-obfuscated, dev version I could try?

(the app is 1.7.3)

zlshames commented 1 year ago

Fixed on the development branch. It will now return a 404 if FCM isn't even configured. Rather than error out like that, throwing a 500 error

ssafar commented 1 year ago

Awesome, thank you for the super quick fix!!!