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

ARM M1 support? :) #2964

Closed
LouisStAmour opened this issue Dec 21, 2020 · 22 comments · Fixed by JCMais/node-libcurl#312 or #4140
Closed

ARM M1 support? :) #2964

LouisStAmour opened this issue Dec 21, 2020 · 22 comments · Fixed by JCMais/node-libcurl#312 or #4140
Assignees
Labels
D-electron Dependency: Electron S-blocked Status: Blocked waiting-for-author

Comments

@LouisStAmour
Copy link
Contributor

See https://www.electronjs.org/blog/apple-silicon and https://www.electronjs.org/blog/electron-11-0

We're currently using Electron 9, so we'd have to consider upgrading Electron first: https://github.com/Kong/insomnia/blob/develop/packages/insomnia-app/package.json#L200

@nijikokun
Copy link
Contributor

Luckily, upgrading electron is on the roadmap, currently slated for this quarter!

@nijikokun nijikokun added S-blocked Status: Blocked D-electron Dependency: Electron labels Dec 23, 2020
@morkov4o
Copy link

morkov4o commented Feb 9, 2021

any updates here ?

@Deninc
Copy link

Deninc commented Mar 30, 2021

waiting for updates here, or at least a roadmap.

@dimitropoulos
Copy link
Contributor

We did indeed upgrade electron recently, but not far enough to get to Arm M1 support. We upgraded to 9.3.5, but electron support for Arm M1 landed in v11 https://www.electronjs.org/blog/electron-11-0. While I would love to say that we'll be on v11 soon: I can't. We might be on v11 soon, don't get me wrong, but we're probably going to let the dust settle on the recent upgrade for a few days/weeks, and then forge ahead to v10, and then to v11, and then to v12. I do know we are trying harder than ever to get caught up and be more up-to-date with electron versions.

@camerons2001
Copy link

can I hope that I'll able to download insomnia for my Mac on m1?

@gordio
Copy link

gordio commented Apr 25, 2021

can I hope that I'll able to download insomnia for my Mac on m1?

Until 2023? Yep 🤓
What we can do? Just wait…

@LilaQ
Copy link

LilaQ commented May 6, 2021

Meh, off to other clients, who don't take years to transition.

@jrgarciadev
Copy link

Waiting for this... 🙏🏻

@dimitropoulos
Copy link
Contributor

Hey everyone. Thanks for the support. This is on my mind, I promise, but the "+1" comments don't help and just spam our GitHub inboxes.

If you would like to voice your support for this, please throw a 👍 on the issue description.

This will definitely come in time, since it comes for free with an electron upgrade. The team is super focused on spaces right now, so although I can't say when this upgrade will land, I can say that it won't land for a few weeks, at least.

@dimitropoulos
Copy link
Contributor

dimitropoulos commented Jul 16, 2021

Hey everyone: 😄

Just to update, we just merged in Electron 11 a few minutes ago.

We hope to have a beta out soon that you will be able to test this with. I'll update again at that time.

Thank you for your patience

@jbrooksuk
Copy link

@dimitropoulos this was a couple of months ago now, do you have any updates? :)

@jrgarciadev
Copy link

Still waiting...

@johnwchadwick
Copy link
Contributor

johnwchadwick commented Sep 24, 2021

Sorry for all of the delays, everyone. Just to let you know, we will be looking into this again. I've taken a look at this a couple times before, so I'd like to add some technical details to make it clearer why this has not happened yet.

One of the bigger blockers in our way was GitHub Actions, but unbeknownst to me it seems like GitHub Actions is unblocked and now has Big Sur runners generally available. This is important, because our CI is based on GitHub Actions, and the previous generally-available macOS runners were running a version of macOS too old to install a new-enough version of XCode to cross-compile for the M1/ARM64 architecture.

We're not totally unblocked, however. We thought that we'd be able to deliver an M1 build once we got to Electron 11, but unfortunately, we also need to upgrade to a version of Electron Builder that supports Apple M1, which needs Node 14, and our Node version is currently synchronized to the Node version that ships with our Electron version (which makes keeping NAPI versions in sync and possibly some other issues a bit easier to deal with.) Electron Builder needs Node 14 because it began to refactor to use fs/promises (electron-userland/electron-builder#5880) which is only available in Node 14. We want to upgrade to Electron 12, but we have been running into some confounding issues getting things stable and may need more time to debug it.

This is all a bit unfortunate, but the end result is that we may need to do some work arounds to enable M1 binaries for the time being.

Just to be clear, for the time being, Insomnia does run just fine on M1 macOS devices by virtue of Rosetta 2. So you needn't hold off on switching to machines with the M1 architecture if this is blocking you. Nothing is required to use Rosetta 2, it is fully automated by macOS:

Screenshot showing Insomnia 2021.5.3 running on a 2020 M1 Mac mini with macOS Big Sur installed

That having been said, we do understand that this is unideal, and do not intend to lean on it for any longer than necessary. We don't have any exact timeline right now since there are too many unknowns, but it is not being ignored by any means.

@voltuer
Copy link

voltuer commented Oct 5, 2021

so in 1 year you haven't been able to get this working?

@muuvmuuv
Copy link

muuvmuuv commented Oct 6, 2021

If native requirements aren't that necessary, a switch to https://github.com/tauri-apps/tauri would be great to reduce resource footprint on all systems. Maybe an ARM build (or anything that comes in the future) will be easier to transition to with Tauri?

@johnwchadwick
Copy link
Contributor

johnwchadwick commented Oct 6, 2021

@tr4g

so in 1 year you haven't been able to get this working?

(Sorry for such a long response, but I hope it clears up what's going on. The tl;dr is that work is proceeding, but there was (and is) a lot in our way for getting to the road to native Apple Silicon builds. I hope that we are able to clear the path soon so that you may use Insomnia natively on your Apple Silicon devices.)

Let's talk about this. This ticket was created on December 20th, 2020 and included the important bit, which is that we needed to update Electron before we could hope to work on an M1 build. In July 2021, this finally came to pass as we updated to Electron 11, a major release of Electron that supports ARM64 builds on macOS.

At this point, it became possible to work on making Insomnia build on M1 Mac. However, as I covered, we are still blocked due to a versioning conundrum with electron-builder. We are also blocked due to build issues with node-libcurl on M1 macOS, which I have been working on resolving just this week. This screenshot is from yesterday, showing node-libcurl running on my M1 Mac Mini:

Screenshot of node-libcurl, built for arm64, running on Apple Silicon.

I understand that it's upsetting seeing a ticket opened this long ago and not being resolved, because I have also been on the other end of that. I also understand that people are excited by their new M1 Mac computers (me too!) However, we're being as open as possible about the fact that it's simply been a difficult process, and yes, this is in part due to our own technical debt, and in part due to issues with upstream dependencies. (It's also worth considering that not everyone on the Insomnia team has an M1 Mac, there are plenty of other urgent feature and bug fixes being worked on, and Rosetta 2 does at least run Insomnia just fine. These all certainly impact prioritization a bit.)


@muuvmuuv

If native requirements aren't that necessary, a switch to https://github.com/tauri-apps/tauri would be great to reduce resource footprint on all systems. Maybe an ARM build (or anything that comes in the future) will be easier to transition to with Tauri?

Tauri is very cool, but I believe such a transition is not really in the cards for the near to mid-term future. A lot of the re-architecting that will be necessary to get Insomnia running well on newer Electron versions would be even more work if we switched to Tauri, because part of what's challenging is how much Insomnia architecturally depends on Electron (and sometimes, older Electron features that would be better replaced with newer features or perhaps even web standards.) Definitely understand the concerns with memory/disk footprint that Electron brings.


I would like to politely suggest trying to keep this thread as on-topic as possible as a number of people get notified by replies here. It would probably be a good idea to move tangential suggestions/comments into discussions or other issues. As soon as we have tangible progress with M1 builds, I will try to keep this thread up to date.

@citypaul
Copy link

citypaul commented Dec 1, 2021

Thanks for all the work you're doing on this! Excited for when you're finally able to get this out

@fractalzombie
Copy link

Hello Guys! What about progress on this issue?

@johnwchadwick
Copy link
Contributor

We were unable to ship an M1 build using Electron 11 because of a bug in Electron 11 that accidentally violates the W^X restrictions in some situations in hardened runtime and crashes immediately. Unfortunately, no release rectified this issue, and the official recommendation is to upgrade to Electron 12. This was a huge setback for getting an M1 build out quickly, but of course we will upgrade to Electron 12 and beyond.

What we have done, so far:

@albertbronsky
Copy link

We were unable to ship an M1 build using Electron 11 because of a bug in Electron 11 that accidentally violates the W^X restrictions in some situations in hardened runtime and crashes immediately. Unfortunately, no release rectified this issue, and the official recommendation is to upgrade to Electron 12. This was a huge setback for getting an M1 build out quickly, but of course we will upgrade to Electron 12 and beyond.

@johnwchadwick

So, any ETA for that? :)

@johnwchadwick
Copy link
Contributor

So, any ETA for that? :)

The good news: The update to Electron 12 was merged, and a beta build was released. Please, feel free to test it and make sure none of your workflows are broken. Catching major Electron 12 regressions early is key to ensuring we don't have to roll it back, so it definitely helps. (It is a beta though, so please also consider ensuring your data is backed up before running it.)

On the other hand, the M1 support pull request is not merged, and therefore not present in that build, and I don't think it will be ready until after the next stable release. This is probably for the best so that we can ensure Electron 12 is stable in the next release without additional confounding factors.

That all having been said... I do have something that may be of interest to those eager to run Insomnia natively: a Universal preview build from m1-support@e65774e. This is an unofficial build, made on my personal M1 device which is signed and notarized with my personal Apple developer certificate, so please bear that in mind; when this is merged, we will be able to provide an official Kong-signed beta build from CI.

Insomnia.Core-2021.7.2.zip (on Google Drive)

Please note that this is a preview build. I would recommend backing up your application data before running it.

@johnwchadwick
Copy link
Contributor

Barring any unforeseen circumstances, M1 support should ship in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-electron Dependency: Electron S-blocked Status: Blocked waiting-for-author
Projects
None yet
Development

Successfully merging a pull request may close this issue.