https://rancher.com/ logo
Title
q

quick-keyboard-83126

06/13/2022, 8:47 PM
Anyone know offhand why rancher desktop is still an x86_64 app on m1 (macOS)?
/Applications/Rancher <http://Desktop.app/Contents/MacOS/Rancher|Desktop.app/Contents/MacOS/Rancher> Desktop: Mach-O 64-bit executable x86_64
% hdiutil info; file /Volumes/Rancher\ Desktop\ 1.4.1/Rancher\ <http://Desktop.app/Contents/MacOS/Rancher\|Desktop.app/Contents/MacOS/Rancher\> Desktop
framework       : 623.100.1
driver          : 623.100.1
================================================
image-path      : /Users/jsoref/Downloads/Rancher.Desktop-1.4.1.aarch64.dmg
image-alias     : /Users/jsoref/Downloads/Rancher.Desktop-1.4.1.aarch64.dmg
shadow-path     : <none>
icon-path       : <none>
image-type      : read-only disk image
system-image    : false
blockcount      : 2669856
blocksize       : 512
writeable       : false
autodiskmount   : TRUE
removable       : TRUE
image-encrypted : false
mounting user   : jsoref
mounting mode   : <unknown>
process ID      : 16402
framework name  : DiskImages2
/dev/disk4	GUID_partition_scheme
/dev/disk4s1	48465300-0000-11AA-AA11-00306543ECAC	/Volumes/Rancher Desktop 1.4.1
/Volumes/Rancher Desktop 1.4.1/Rancher <http://Desktop.app/Contents/MacOS/Rancher|Desktop.app/Contents/MacOS/Rancher> Desktop: Mach-O 64-bit executable x86_64
@proud-jewelry-46860 is there a reason to run
ssh
and friends as
Intel
?
p

proud-jewelry-46860

06/13/2022, 9:12 PM
Nope; but we should just move to arch64 electron…
q

quick-keyboard-83126

06/13/2022, 9:13 PM
Is there anything actually stopping that at this point?
p

proud-jewelry-46860

06/13/2022, 9:13 PM
Just finding somebody to do it, I think
q

quick-keyboard-83126

06/13/2022, 9:13 PM
is it just a packaging thing? I'm tempted...
I see there's this fun bit, but that seems ancillary and like one could make it smarter: https://github.com/rancher-sandbox/rancher-desktop/blob/fb7af96b541f24fff05910a8185feda527f05e7c/scripts/download/tools.mjs#L122
@proud-jewelry-46860: here you go, it works in
npm run dev
, it only changes electron and lima since they're fairly closely coupled. We can separately switch out docker and the other underlying support tools. https://github.com/rancher-sandbox/rancher-desktop/pull/2387
@fast-garage-66093 working on making the CI a bit happier right now...
f

fast-garage-66093

06/14/2022, 9:37 PM
Thanks! Just for my understanding: with your changes, you can still build the M1 version on Intel, right?
q

quick-keyboard-83126

06/14/2022, 9:38 PM
I'm pretty sure, I do actually have an intel mac behind this m1, so I suppose I could try locally... I locally have added the ability to only build the intel version on m1 using M1=0, since it seems like maybe someone might oddly want that... note: I don't have signing working locally, so i can't actually run any of these packages (I don't understand that and don't really want to).
f

fast-garage-66093

06/14/2022, 9:40 PM
Right now we build both packages on Intel, and only deploy on M1 for testing, and it would not be easy to change this quickly
q

quick-keyboard-83126

06/14/2022, 9:40 PM
right, not trying to break that
f

fast-garage-66093

06/14/2022, 9:41 PM
Not sure why you think you need signing; I regularly run packages build by CI on both Intel and M1, and they work fine
q

quick-keyboard-83126

06/14/2022, 9:41 PM
when i try to open the app (m1 or not) from the .app it opens for a split second and quits
f

fast-garage-66093

06/14/2022, 9:42 PM
You do need to remove the Quarantine bit though, if you download from Github:
xattr -d com.apple.quarantine /Applications/Rancher\ <http://Desktop.app/|Desktop.app/>
q

quick-keyboard-83126

06/14/2022, 9:42 PM
AMFI: '/private/var/folders/r3/n29fz25x72x191fdv6mhhr3m0000gp/T/.io.rancherdesktop.app.3bv7jR': Unrecoverable CT signature issue, bailing out.
this isn't a downloaded
.app
, it's a locally built and packaged
.app
f

fast-garage-66093

06/14/2022, 9:43 PM
I'm pretty sure the packaging code is running ad-hoc signing, so if this isn't working on the build machine, then something is broken
q

quick-keyboard-83126

06/14/2022, 9:43 PM
not build machine, my machine
f

fast-garage-66093

06/14/2022, 9:44 PM
You said you build locally, so build machine should be your machine. Or I'm confused now
q

quick-keyboard-83126

06/14/2022, 9:44 PM
oh, ok, yes, i'm not used to thinking of my machine as the "build machine"
to me, "build machines" are project resources that I (or others) ask to do work at times
f

fast-garage-66093

06/14/2022, 9:46 PM
Anyways, the builds created by Github Actions on public Github runners work on all my machines (after clearing quarantine bits), and they are not signed except with a ad-hoc signatures
Well, the main app has not signature at all (on Intel):
$ codesign -dvvvv /Applications/Rancher\ <http://Desktop.app|Desktop.app>
/Applications/Rancher <http://Desktop.app|Desktop.app>: code object is not signed at all
q

quick-keyboard-83126

06/14/2022, 9:47 PM
yeah, that's what i have
ok, so, how do i debug it not properly starting?
npm run dev
works fine
f

fast-garage-66093

06/14/2022, 9:50 PM
Sorry, I can't remember; everything regarding signing/notarization is somewhat arcane and changes with time 😞
q

quick-keyboard-83126

06/14/2022, 9:51 PM
is there a basic flag to beg for stderr/stdout logging?
f

fast-garage-66093

06/14/2022, 9:52 PM
Did you try running it from the commandline?
$ /Applications/Rancher\ <http://Desktop.app/Contents/MacOS/Rancher\|Desktop.app/Contents/MacOS/Rancher\> Desktop
q

quick-keyboard-83126

06/14/2022, 9:53 PM
I tried using the MacOS/... thing too
it opened for a few moments and then quit
f

fast-garage-66093

06/14/2022, 9:53 PM
And nothing on the console? Just returned to the shell prompt with no output?
idk what the
MacOS/...
thing is
q

quick-keyboard-83126

06/14/2022, 9:54 PM
Rancher <http://Desktop.app|Desktop.app> % ./Contents/MacOS/Rancher\ Desktop
hmm, right now that actually is giving me an error dialog, but i have no idea which iteration of the app it is, so i need to go repackage the app and try a fresh one 🙂
(if i can remember which incantation will build the packages...)
f

fast-garage-66093

06/14/2022, 9:58 PM
Maybe it is due to your OS version: I'm running Catalina on Intel, and Big Sur on M1. Let me try on Intel Monterey laptop, to see if that makes a difference
q

quick-keyboard-83126

06/14/2022, 10:05 PM
ok, right now the arm .app just spits out a single line to the console before quitting:
objc[79123]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x22ebb7808) and /Applications/Rancher Desktop 4.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib (0x1088713c8). One of the two will be used. Which one is undefined.
f

fast-garage-66093

06/14/2022, 10:07 PM
Did you try to run a CI version on that machine? If that works, then you know the issue is with your build. If it doesn't, then the issue with how the machine is configured?
q

quick-keyboard-83126

06/14/2022, 10:08 PM
I've tried various things and a bunch of things didn't work that i expected to work, i'll grab those two dmgs and see how they behave
ok, so, this gets me the standard quarantine bit that i need to clear w/...
f

fast-garage-66093

06/14/2022, 10:11 PM
Yes, that is normal.
xattr -d com.apple.quarantine /Applications/Rancher\ <http://Desktop.app/|Desktop.app/>
q

quick-keyboard-83126

06/14/2022, 10:12 PM
xattr -d com.apple.quarantine ...
So, it runs, but, amusingly it tells me there's an update available (which is probably wrong)
f

fast-garage-66093

06/14/2022, 10:13 PM
Yes, you need to disable auto-update, otherwise it will downgrade (and fail)
Because CI builds have broken semver settings based on
git describe
q

quick-keyboard-83126

06/14/2022, 10:14 PM
yeah, i had to give git a tag to get the build to work at all (i default to stripping all tags)
f

fast-garage-66093

06/14/2022, 10:14 PM
In semver
1.4.2-22
is a pre-release for
1.4.1
and not a later version
q

quick-keyboard-83126

06/14/2022, 10:14 PM
could we eventually fix it to not say there's an update available if it can't find an update?
The problem is that it does find an update (see above)
q

quick-keyboard-83126

06/14/2022, 10:15 PM
So, 1/2 of the images from the build i picked worked ?
oh, it found a thing, but didn't find the release notes for the thing?
f

fast-garage-66093

06/14/2022, 10:16 PM
You are running the wrong version on your M1.
q

quick-keyboard-83126

06/14/2022, 10:17 PM
oh, the x86_64 build won't work at all?
f

fast-garage-66093

06/14/2022, 10:17 PM
No
q

quick-keyboard-83126

06/14/2022, 10:17 PM
ok
f

fast-garage-66093

06/14/2022, 10:17 PM
I forgot the reason, but it doesn't work. Even if it did, it would be terribly slow
q

quick-keyboard-83126

06/14/2022, 10:17 PM
this i know 🙂
we spent a few months fixing our docker images to have arm images so we could run our db w/o it being painfully slow
then i spent a bit of time (yesterday?) helping a colleague who claimed that intellij was slow (it was because they were using the x86_64 version of intellij = x86_64 version of jre)
f

fast-garage-66093

06/14/2022, 10:18 PM
I see that with Ventura you ran now use Rosetta2 from inside a Linux VM
q

quick-keyboard-83126

06/14/2022, 10:19 PM
yeah, i saw that
f

fast-garage-66093

06/14/2022, 10:19 PM
But it will require using Virtualization framework instead of QEMU, so not a simple change
q

quick-keyboard-83126

06/14/2022, 10:19 PM
right
anyway, so, clearly i can run builds from github
f

fast-garage-66093

06/14/2022, 10:20 PM
Yes, and they are unsigned. So if you cannot run your local builds, then there is something wrong with the way you build them
q

quick-keyboard-83126

06/14/2022, 10:20 PM
right, so, then the question is how to debug this 😞
f

fast-garage-66093

06/14/2022, 10:22 PM
idk. There is a reason that we still use Rosetta with the Electron app...
I don't have time to dig into this now; so you are on your own for now, sorry 😞
q

quick-keyboard-83126

06/14/2022, 10:23 PM
that's ok, thanks for the time