Android Emulator Error in dev environment

Hi,

I am facing an issue when trying to run the shop mini app in an Android emulator. I get the below error in Terminal and it continously tries to open the Emulator even when it’s already open, I also installed the Shop Pay app on the android emulator device and tried to open the app but the app automatically gets closed after a few seconds.

Any help or guidance in this issue would be appreciated.

Android Emulator:

If I try to open it directly on my iPhone from the QR code, then I see a blank white screen

iPhone:

Hi Dhaval, I assume you’re using Windows, right?

We’re currently working on Windows support. I’ll keep you posted.

Hi @Quique-Shopify yes I am working on Windows system. Does that mean that I can’t create an app using Windows system? Although I am using a Windows system, I am trying to preview the QR code generated link on an iPhone but I get a blank white screen, is it related to the same issue or could be something that I can fix?

You can use the –host option as a workaround until we fix the IP address detection on Windows. Run your mini using this command:
npx shop-minis dev --host=192.168.1.100

Replacing the host value with the IP address of your Windows machine. Then, the qr code option should work. Your iPhone and your Windows computer must be in the same network.

Hi @Quique-Shopify ,
I just scaffolded a new project with
npm init @shopify/shop-mini@latest
then immediately ran
npx shop-minis dev
And… it crashed on my Mac.

Filtered com.shopify on logcat to see the error:

Hi! This is happening because it’s not an ARM simulator. Can you create a new simulator (Virtual Device in the Device Manager) and choose ARM architecture?

We don’t support x86_64 simulators.

Hi @Quique-Shopify ,
are you sure it’s possible on an Intel Mac?

can you post a screenshot of your Device Manager screen in Android Studio?

Is Android 14 (UpsideDownCake, API 34, arm64-v8a) supported?

yes!

Dynamic_Dreamz

Dchar

Shazzad_Hossain

BACKLIP

Dhaval_Dave

Can you please update to the latest Android Studio version, create a new Virtual Device using API 34, 35 or 36, check that the architecture is set to ARM and let us if you face any issues? If you do, try to share as many details as possible about your setup and a screenshot of the simulator config.

Thank you!

1 Like

Hey @Quique-Shopify I downloaded the Google APIs ARM 64 architecture, and tried to create a new Virtual Device using API 34, but there I could not find the “Google APIs ARM 64“ that I had downloaded, so I checked the “Show unsupported system images“ checkbox and then I was able to see the “Google APIs ARM 64“ architecture (although I see a small warning icon next to the architecture). I finish setting up the device and try to run the “npx shop-minis dev“ cmd and now the emulator fails to open, please check the attached screenshot of the error.

Android 14 - Google APIs ARM 64 architecture download

New Virtual device configuration

CLI error when trying to open the emulator

Yes. On my end, I’m also getting the same error. Also, the ARM simulator is not supported in Android Studio.

@Quique-Shopify Is there any way to run it on Windows?

I also got issue with npx shop-minis devwhen press ‘i‘ to open ios simulator, the error make me can open my minis on xcode simulator:
xcrun simctl openurl error An error was encountered processing the command (domain=NSPOSIXErrorDomain, error code = 60)

Does anyone have a solution to fix it?

Hey @Quique-Shopify can you please check my comment above and let me know how I can fix it?

We are working on a CLI fix for Android for Windows. We will post here once it’s ready to be tested.

@Quique-Shopify

I am also experiencing Android testing issues on Windows (both emulator and physical device).

Currently developing in PC browser as a workaround. Is this acceptable until the CLI fix is released?

Looking forward to the fix!