bamlab / flashlight

📱⚡️ Lighthouse for Mobile - audits your app and gives a performance score to your Android apps (native, React Native, Flutter..). Measure performance on CLI, E2E tests, CI...
https://docs.flashlight.dev
MIT License
1.2k stars 29 forks source link

Support for Apple Silicon - bad CPU type in executable: flashlight #199

Open tormoseng opened 9 months ago

tormoseng commented 9 months ago

I'm running MacOS 14.2.1 on an Apple Mac M3. And after running curl https://get.flashlight.dev | bash, I try:

$ flashlight measure

Then, my response is

bad CPU type in executable: flashlight

Is this due to missing support of Apple Silicon?

Note: I'm able to clone your repo and run test and report as guided in the contribution.md, but it would be nice to do it with only $ flaslight

Almouro commented 9 months ago

Hi, thanks for raising this!

Turns out so far, we've been relying on people having Rosetta installed to run the Flashlight executable as an Intel executable

But we should really have a proper arm64 executable for Apple silicon as well, we'll look into this 👍

tormoseng commented 9 months ago

Thanks so much! It would be very appreciated 🙌

gabimoncha commented 6 months ago

I have an M1 Max and flashlight is working on my device

tormoseng commented 6 months ago

I have an M1 Max and flashlight is working on my device

Without Rosetta?

gabimoncha commented 6 months ago

yes, installed through normal iTerm session, without Rosetta

chanphiromsok commented 2 months ago

it too slow when profiler on M1

tormoseng commented 2 months ago

@gabimoncha I just now saw that you wrote iTerm session, so I tried to get and run flashlight on iTerm (and not the Mac terminal), but it still fails with the same message. I'm on M3 if that is different from M1?

Sumedh-k commented 1 month ago

As a workaround you can run it using Rosetta with this command.

arch -x86_64 flashlight measure

To install Rosetta use this command.

softwareupdate --install-rosetta --agree-to-license

tormoseng commented 1 month ago

Last update from me. I'm now using iTerm with Rosetta to run the flashlight commands, while my regular mac terminal runs as before. It works - even though supporting Apple Silicon would be nice!

Randall71 commented 1 month ago

@Almouro This problem deserves to be pinned

Almouro commented 1 month ago

Good point @Randall71! Still not fixed on our side, it's just a bit annoying since we have to codesign the executable now, but it's underway

In the meantime I've pinned the issue and linked @Sumedh-k's helpful comment to the install docs in https://docs.flashlight.dev/