MeshAgent icon indicating copy to clipboard operation
MeshAgent copied to clipboard

Agent not launching on Macos 10.13 = "dyld: Symbol not found: ____chkstk_darwin"

Open Belvedus2 opened this issue 2 years ago • 43 comments

Hi,

On the readme.md, it's not specified if old version of macos are still supported.

Some times ago I notice that my old macos computer doesn't show anymore in Meshcentral. When I launch /usr/local/mesh_services/meshagent/meshagent_osx64, i have this result:

Connecting to: wss://meshcentralserveur.fr:443/agent.ashx
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /usr/local/mesh_services/meshagent/./meshagent_osx64 (which was built for Mac OS X 11.0)
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /usr/local/mesh_services/meshagent/./meshagent_osx64 (which was built for Mac OS X 11.0)
  Expected in: /usr/lib/libSystem.B.dylib

Abort trap: 6

Same result with launchctl start meshagent.

Tests were made on Macos 10.13.6 in imac and macmini. I don't have any 10.14.X macos anymore. It's working really fine on 10.5 and after.

If it's just for development convinience, i understand. Is it possible to indicate this information in the meshcentral documentation and in the interface of meshcentral ?

Thank you in advance.

Belvedus2 avatar Apr 29 '22 07:04 Belvedus2

I complete with new information :

I have 1 macos on 10.14 and it's still work. So the problem is on 10.13 sure, maybe earlier. I forced my company to end 10.12 utilisation.

Belvedus2 avatar Apr 29 '22 08:04 Belvedus2

Interesting, I'll take a look

krayon007 avatar Apr 29 '22 14:04 krayon007

Following. We are also getting this on 10.12

MrGurns avatar May 05 '22 23:05 MrGurns

@krayon007

Any new findings on this? I'm getting the same issue on macOS 10.12 and 10.13. In many cases, for compatibility reasons, we can't upgrade certain computers in our organization past macOS 10.12. After running the .mpkg installer, it says that the installation was successful. But seems that the app is crashing. When running "sudo /usr/local/mesh_services/meshagent/meshagent_osx64" from terminal, it returns the following errors:

Connecting to: wss://[SERVER URL]/agent.ashx dyld: lazy symbol binding failed: Symbol not found: chkstk_darwin Referenced from: /usr/local/mesh_services/meshagent/meshagent_osx64 Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: chkstk_darwin Referenced from: /usr/local/mesh_services/meshagent/meshagent_osx64 Expected in: /usr/lib/libSystem.B.dylib

Just to be sure, I also installed node.js and NPM, and tried running the mesh agent again. Same error. Also tried installing from the binary file instead of the .mpkg, but that didn't work either. From everything I've read, this seems to be an issue with compilation, where the installer is compiled for more recent versions of macOS. Any way we can compile some installers that are compatible with older versions of macOS? Say, as far back as 10.8? or even 10.5 if possible, just for the sake of increased platform compatibility.

zoltan151 avatar May 05 '22 23:05 zoltan151

I set the build flag to compile for 10.5 -mmacosx-version-min=10.5

I think I know what it is tho. I think when I compiled OpenSSL when I did the last OpenSSL update I may have forgot to set that flag. I'll check it tomorrow.

krayon007 avatar May 06 '22 08:05 krayon007

Ah, that makes sense. Thank you for looking in to it!

zoltan151 avatar May 06 '22 15:05 zoltan151

Ok, I verified and reproduced it on 10.10... It was the OpenSSL that was causing it... When I compiled 1.1.1n, I forgot set the flag to target 10.5.

It will be in the next update, but I also attached the updated binaries if you needed to update sooner... You can just unzip this file drop the binaries into your server macOS_May-2022.zip .

krayon007 avatar May 06 '22 18:05 krayon007

Awesome! Thank you so much!

zoltan151 avatar May 06 '22 18:05 zoltan151

I can't seem to find the location of the binaries on the server, which is running Ubuntu. Where am I supposed to put these files?

On May 6, 2022, 12:13 PM, at 12:13 PM, Bryan Roe @.***> wrote:

Ok, I verified and reproduced it on 10.10... It was the OpenSSL that was causing it... When I compiled 1.1.1n, I forgot set the flag to target 10.5.

It will be in the next update, but I also attached the updated binaries if you needed to update sooner... You can just unzip this file drop the binaries into your server macOS_May-2022.zip ..

-- Reply to this email directly or view it on GitHub: https://github.com/Ylianst/MeshAgent/issues/137#issuecomment-1119867605 You are receiving this because you commented.

Message ID: @.***>

zoltan151 avatar May 06 '22 20:05 zoltan151

Nevermind, just found it! For other Ubuntu users looking, I found the agent files on our server in

./home/[INSTALL USERNAME]/node_modules/meshcentral/agents/

zoltan151 avatar May 06 '22 20:05 zoltan151

Sweet, everything looks golden with that. well, once the signed binary is deployed in an update ;) Thanks for the fix.

MrGurns avatar May 06 '22 23:05 MrGurns

Thank you a lot for this issue !

Belvedus2 avatar May 23 '22 11:05 Belvedus2

This still doesn't work for me. I am using OS X 10.13.6 (High Sierra) on MacBook Air 2013. I placed the new binary from your link above in /usr/local/mesh_services/meshagent and renamed it to what the existing file was called meshagent_osx64 after backing up the old one. I tried both the XXX-x86-64 and XXX-universal-64 variants. This also happens with the binary downloaded from the meshcentral server.

$sudo ./meshagent_osx64
Connecting to: wss://meshcentral.com:443/agent.ashx
2022-07-10 02:26:01 PM: Control Channel Idle Timeout = 120 seconds
Connected.
2022-07-10 02:26:01 PM: MeshCore: Stop
SelfUpdate -> Updating Agent...
SelfUpdate -> Restarting Agent...
Connecting to: wss://meshcentral.com:443/agent.ashx
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /usr/local/mesh_services/meshagent/./meshagent_osx64 (which was built for Mac OS X 11.0)
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /usr/local/mesh_services/meshagent/./meshagent_osx64 (which was built for Mac OS X 11.0)
  Expected in: /usr/lib/libSystem.B.dylib

Abort trap: 6

frakman1 avatar Jul 10 '22 18:07 frakman1

Download that link again, and run it this way:

./meshagent_osx-universal64 -info

It looks like the way you ran it, it immediately updated to the version you had on the server.

krayon007 avatar Jul 11 '22 01:07 krayon007

Thank you, but running it with -info doesn't actually launch the service or installs it. It just dumps out commit information about the file.

$sudo ./meshagent_osx64 -info
Compiled on: 10:59:14, May  6 2022
   Commit Hash: 37024e2e286334850e3ed4201262f497433b1392
   Commit Date: 2022-Apr-27 22:36:09-0700
Using OpenSSL 1.1.1n  15 Mar 2022
Agent ARCHID: 16
Detected OS: Mac OS X 10.13.6 - x64

How can I run it without it auto-updating? I tried running it without parameters and with the -install options. They both fail

frakman1 avatar Jul 11 '22 12:07 frakman1

Any update on this? The above log shows I am using the latest binary and yet I get the same error. How is it meant to run without updating if it does so by default?

frakman1 avatar Jul 22 '22 15:07 frakman1

To install that binary without self updating, you run it this way, making sure your .msh file is in the same folder

./meshagent --fullinstall --copy-msh=1 --disableUpdate=1

We're working on the next agent update, I'm tracking down one issue as we speak. We anticipate an agent update next week.

krayon007 avatar Jul 22 '22 15:07 krayon007

That didn't work either. I deleted everything in the /usr/local/mesh_services/meshagent folder and used the .msh file from the .pkg file downloaded from the website and used the binary from the zip file macOS_May-2022.zip

When using the command above, I get a one-line output but no error.

Generating Certificate... 

Subsequent runs show no output. No meshagent shows up in running processes and nothing shows up under devices on the MeshCentral website. FYI. I am on High Sierra.

$sudo ./meshagent_osx64 -info
Compiled on: 10:59:14, May  6 2022
   Commit Hash: 37024e2e286334850e3ed4201262f497433b1392
   Commit Date: 2022-Apr-27 22:36:09-0700
Using OpenSSL 1.1.1n  15 Mar 2022
Agent ARCHID: 16
Detected OS: Mac OS X 10.13.6 - x64

frakman1 avatar Jul 23 '22 23:07 frakman1

Interesting. I have a sierra system, let me try on that... It should at least tell you that it is attempting to connect to the server. Looks like it didn't even finish generating the cert.

krayon007 avatar Jul 24 '22 00:07 krayon007

Is there a verbose mode or logs to examine?

frakman1 avatar Jul 24 '22 01:07 frakman1

That's why it's strange, because when you run it from the command line like that, it's supposed to be verbose.

krayon007 avatar Jul 24 '22 01:07 krayon007

I Iooked at the Console app output and it shows this message:

no system signature for unsigned /usr/local/mesh_services/meshagent/meshagent_osx64[99583]

Not sure if it's a warning or a blocker. Usually, I enable apps that are blocked from running by the OS in the Security & Privacy page in Settings, but nothing showed up there.

image

frakman1 avatar Jul 24 '22 01:07 frakman1

Interesting. I've never ran across that before. I'll see if I can reproduce that. I plan on signing the binary, so hopefully that will just go away by itself.

krayon007 avatar Jul 24 '22 04:07 krayon007

Should this issue be reopened? This is failing on all my Macs from El Capital, High Sierra and now Ventura (latest). Something happened a month or so ago on the server side that broke everything ( I am using the meshcentral.com public site).

frakman1 avatar Jul 30 '22 14:07 frakman1

The error is still here in Meshcentral 1.0.72

Sorry

Belvedus2 avatar Aug 23 '22 08:08 Belvedus2

Problem solve with Meshcentral 1.0.75 . Thank You !! A lot !!!

Belvedus2 avatar Aug 30 '22 07:08 Belvedus2

Still does not work on my Macbook Air on High Sierra (10.13) I uninstalled and used the latest from the meshcentral.com website's Add Agent->Apple OS and installed the MeshAgent.mpkg. Nothing shows up under running services and nothing populates under devices on the website.

Judging from the -info output, it doesn't look like the meshagent binary on the website has been updated.

frakman1 avatar Aug 31 '22 14:08 frakman1

Problem solve with Meshcentral 1.0.75 . Thank You !! A lot !!!

How do I know what version the meshcentral.com website is running?

frakman1 avatar Aug 31 '22 14:08 frakman1

So after much trial and error, I was able to sort-of make it work. Using the May zip file executable meshagent_osx-x86-64, and ensuring that the msh file is named meshagent_osx-x86-64.msh and using the following command in /usr/local/mesh_services/meshagent

sudo ./meshagent_osx-x86-64 --disableUpdate=1

I was able to get it to run and appear on the website as a listed device. However, the only problem is that the command hangs and doesn't return to the prompt. I had to add a & at the end of the command before it would continue to run in the background. Otherwise, it would hang on the Launching meshcore message. It also displayed the message Server verified meshcore... meshcore already running... once before hanging on a previous attempt.

$sudo ./meshagent_osx-x86-64 --disableUpdate=1
Connecting to: wss://meshcentral.com:443/agent.ashx
2022-08-31 03:17:14 PM: Control Channel Idle Timeout = 120 seconds
Connected.
Server verified meshcore... Launching meshcore...

Using any other command line option (--fullinstall or --copy-msh=1 ) would fail.

frakman1 avatar Aug 31 '22 19:08 frakman1

Using any other command line option (--fullinstall or --copy-msh=1 ) would fail.

What type of failure did you get? You should be able to do: sudo ./meshagent_osx-x86-64 -fullinstall --copy-msh=1 --disableUpdate=1

krayon007 avatar Aug 31 '22 20:08 krayon007