Closed jetfir3 closed 10 months ago
The current "quick fix" for 10.14.6 and below (not contained in this PR) is to remove the panic
code which allows the binary to continue running -- assuming the correct binary offsets for the macOS version are added as well. I'll be providing offsets for 10.14.6 and 10.15.1-10.15.7 in a PR after I submit this.
The change in this PR DOES allow Catalina to work, with no further changes.
If no one submits a PR to fix handling in 10.14 and below, I'll try to fix it myself when I have a bit more time.
It might be more correct to fix this hack: https://github.com/beeper/imessage/blob/main/imessage/direct/albert/activationinfo.go#L74, in other places where the software name is used, it's probably actually supposed to be Mac OS X
on older versions (definitely wasn't macOS
before 11.0)
Possibly! That line of code would certainly explain things failing, as there was no logic to handle Mac OS X
.
I had mentioned this issue and my "workaround" in the pypush discord and another user tried grabbing the cert "manually" while using "Mac OS X" as their DeviceClass and that also failed.. so it's possible it may need something else like Mac OSX
or some other variant to satisfy things. I have personally not tested this further than just forcing "mac-registration-provider" to set my deviceclass/software_name to macOS
on my 10.14 machine.
@tulir
I've added a PR to the beeper/imessage
repo to address this issue rather than deal with a workaround in this repo.
See here, https://github.com/beeper/imessage/pull/11
and an update to my mention of things not working on 10.14.6 or earlier -- I've realized this is due to system_profiler SPHardwareDataType -json
since the -json
flag was not added until Catalina. Prior versions only had the -xml
option. Not sure of the best way to address this... either switching everything over to -xml
or adding a condition if -json
is not present.
macOS 11+ reports
software_name
as "macOS".With software_name reporting as "Mac OS X" the following error can been seen in logcat:
com.beeper.chat.booper.ipc.BridgeCrashedException: {"level":"fatal","error":"failed to generate albert push certificate: failed to decode device cert","time":"2023-12-28T12:58:40.124078741Z","message":"Failed to configure iMessage"}
Once mac-registration-provider is re-built with the
software_name
"spoofed" to "macOS", the issue is gone and the app then prompts for Apple ID sign-in.It may be best to set this hardcoded value on the Beeper/Beeper Mini side of things... but, for now, this specific code change allows Beeper Mini to register while running this binary on macOS 10.15.x.
Additional changes in versions.go for macOS 10.14 and below will be needed as the current error handling with
panic
causes the binary to fail as the various commands to obtain hardware/software info fail on macOS 10.14 and earlier.