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

Unable to install agent on Windows ARM64 #6433

Closed
jacksonattwood opened this issue Oct 6, 2024 · 18 comments
Closed

Unable to install agent on Windows ARM64 #6433

jacksonattwood opened this issue Oct 6, 2024 · 18 comments

Comments

@jacksonattwood
Copy link

Describe the bug
Regardless of what I try, I can't install the native arm64 agent. I do get this when I try running the installer via cmd:

C:\Users\jacks\Downloads>"meshagentarm64-Personal (1).exe"
[2024-10-06 05:31:31 PM] [A7BA9EF4AF0DF952] C:\temp\MeshAgent\microscript\ILibDuktape_ScriptContainer.c:1669 (0,0) uncaught: 'cannot read property \x27split\x27 of null'

To Reproduce
Steps to reproduce the behavior:

  • Run installer as admin
    OR
  • Run installer as user
    OR
  • Run installer as admin or user via cmd

Expected behavior
Agent installs like normal

Server Software (please complete the following information):

  • OS: Windows
  • Virtualization: Native Windows installer
  • Network: WAN
  • Version: 1.1.31
  • Node: 20.17.0

Client Device (please complete the following information):

  • Device: Laptop - Microsoft Surface Laptop 7
  • OS: Windows 11 24H2 (ARM)
  • Network: Remote over WAN
  • Browser: Edge

Remote Device (please complete the following information):
^^ Same as Client Device^^

Your config.json file
Obfuscating details for obvious reasons, however setup has worked for 3+ years across Windows, Linux & MacOS

{
  "settings": {
    "cert": "meshcentral.mydomain.com",
    "wanonly": true,
    "webRTC": true,
    "_minify": true,
    "portBind": "WAN-IP",
    "redirPortBind": "WAN-IP"
  },
  "letsencrypt": {
    "email": "[email protected]",
    "names": "meshcentral.mydomain.com,agents.meshcentral.mydomain.com,relay.meshcentral.mydomain.com",
    "rsaKeySize": 3072,
    "production": true
  }
}

Does kinda look like it's just not compiling the agent properly...

@si458
Copy link
Collaborator

si458 commented Oct 6, 2024

Windows 11 24h2

You need to install wmic as its removed by default now

#6162 (comment)

Duplicate #6162

@si458
Copy link
Collaborator

si458 commented Nov 7, 2024

would you like to test a new build of meshagent for arm64 to run on 24h2 without the wmic?

@jacksonattwood
Copy link
Author

100%, let's do it

@si458
Copy link
Collaborator

si458 commented Nov 7, 2024

@jacksonattwood I will try do a build tomorrow for u and attach instructions here how to update etc

@si458
Copy link
Collaborator

si458 commented Nov 11, 2024

sorry for delay! here goes!

i have an updated agent for people to test if they want!i have a new agent for people to try if they want!
fully compiled with all the bug fixes in the repo including replacing wmic with the win-wmi we already had

  1. download zip and extract zip MeshServiceARM64.exe.zip
  2. backup the MeshServiceARM64.exe from inside node_modules/meshcentral/agents/ (or rename to something else)
  3. place the new MeshServiceARM64.exe back in node_modules/meshcentral/agents/
  4. stop meshcentral
  5. IMPORTANT: DISABLE AUTO AGENT UPDATE OTHERWISE ALL AGENTS WILL GET AUTO UPDATED!!!
    set "noAgentUpdate": 1 inside of settings in your config.json
  6. start meshcentral
  7. IMPORTANT: LET MESHCENTRAL RESIGN/RECUSTOMISE THE SINGLE FILE!
  8. skip this step if you dont code-sign yourself
    copy the new signed agent from inside signed-agents located inside of meshcentral-data to your machine,
    code-sign the exe however you want/do it,
    put the new code-signed exe back into agents replacing the old MeshServiceARM64.exe
    (backing up the old code-signed version of yours first),
    restart meshcentral
  9. pick a device and go into its Console tab and run agentupdate
  10. you should see the device go offline and then back online, and in theory the date/version will of changed!

you can also them download a new meshagent from the 'addagent' tab and it should work on 24h2 machines for install/run

@jacksonattwood
Copy link
Author

jacksonattwood commented Nov 15, 2024

I know I'm not totally stupid, but I let the service sign itself (I don't codesign lol) and I get:

> agentupdate
Downloading update from: https://******.com:443/meshagents?id=43
Self Update FAILED because the downloaded agent FAILED hash check (1), URL: https://******.com:443/meshagents?id=43
a7ba9ef4af0df952ad4cf0944dc554b8a94f3c801f0251c162190b9f13e85e6a7d3b49790408183ce691ac982b749a47 != 841B69C502243C20C4FC89D973C612233AC1C47A4BCA8306D108AE292C40EA127CD1569E74D278B4818503567446C62B
Self Update will try again in 60 seconds...

edit: I just tried uninstalling the agent, removing WMIC and I get "This app can't run on your pc"

@si458
Copy link
Collaborator

si458 commented Nov 15, 2024

@jacksonattwood oh erm that's not right? Will have a look next week for you again as I currently have to use a vm on my mac for windows arm but it's very slow with 4gb ram haha

@jacksonattwood
Copy link
Author

Is there a branch I can try to build from? I'll follow your instructions as close as I can if it's easier for you...

@si458
Copy link
Collaborator

si458 commented Nov 15, 2024

U just clone the meshagent repo https://github.com/Ylianst/MeshAgent
Open the 2022 project in visual studio, then change build open to arm64 from x64, change release to realise from debug, then compile and u should have an output file inside release folder

@jacksonattwood
Copy link
Author

Must be doing something wrong:

  • Clone Repo
  • Open MeshAgent-2022.sln
  • Set to Debug, ARM64
  • Build Solution
    • Fails with RC1015 cannot open include file 'afxres.h' in MeshService-2022

If I try to build MeshConsole-2022 by itself it works fine, but MeshService-2022 fails on every attempt with that same error

@si458
Copy link
Collaborator

si458 commented Nov 15, 2024

@jacksonattwood oh shoot sorry! you need to install the C++ MFC v143 build tools (ARM64) when you install visual studio!
you can edit/modifiy from apps in settings, and add it in there :)

@jacksonattwood
Copy link
Author

Yup that was it, installed and the service runs fine on my laptop! Few bugs tho:

  1. Often on the first connection, the client only seems to receive one single frame of video and then freezes. If you reconnect, it works fine.
  2. Haven't had a proper test, but I can't get my mouse to teleport across the screen anymore when I connect to the same machine I'm using. Makes me think remote control isn't working...

@si458
Copy link
Collaborator

si458 commented Nov 15, 2024

@jacksonattwood ok thats indeed weird? what type of ARM device is it?
as i explained i use UTM and it works no problems! no issues!
have you made sure you havent unticked the Input checkbox at the bottom of the remote tab?

@jacksonattwood
Copy link
Author

jacksonattwood commented Nov 15, 2024

What type of ARM device is it?

Surface Laptop 7, 32GB RAM/1TB SSD

have you made sure you havent unticked the Input checkbox at the bottom of the remote tab?

Yeah, I never touch it

Had a play around this morning, it only seemed to behave this way on Edge on my laptop but works fine on Chrome and Edge on my PC. (edit: Just happened again on Edge on my Surface, weird)

Also, for your pleasure, I compiled the x86_64bit Windows Agent, followed the same steps to add it to server and it works perfectly on a clean Win11 24H2 install.

@si458
Copy link
Collaborator

si458 commented Nov 15, 2024

@jacksonattwood fancy lending us one? even a crappy 8gb 256gb one would be great haha!

seems very weird that it doesnt work on edge running on ARM?
unless ARM does something slightly different in edge maybe?
is ur normal pc also arm or is that x64 ?
what u tried firefox on arm?

@jacksonattwood
Copy link
Author

@jacksonattwood fancy lending us one? even a crappy 8gb 256gb one would be great haha!

HAHAHAHA unfortunately I don't have one to lend to you :(

My PC is x64, Win11 23H2.

Is it meant to be a feature that you can't control the device you're connecting from? I have the same issue on my Win11 24H2 x64 Virtual Machine...

@si458
Copy link
Collaborator

si458 commented Nov 15, 2024

Is it meant to be a feature that you can't control the device you're connecting from? I have the same issue on my Win11 24H2 x64 Virtual Machine...

erm... no?
open up the web ui in your browser,
select ur pc,
then desktop and connect button,
then move the mouse into the screen and see your mouse move on the screen to top corner?

that seems to me a bug? are you using the bootstrap ui at all or the normal ui?

@jacksonattwood
Copy link
Author

see your mouse move on the screen to top corner

Yeah I remember it used to do this, not sure when it changed. Same behavior on my PC running WMIC agent on 23H2

I just tried it, and the cursor disappeared but no input passed through. Reconnected and the cursor doesn't disappear, input doesn't pass through.

Fairly certain I'm on the Normal UI, server version 1.1.31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants