Android Virtual Device Testing fails randomly with locale error

Hi there,

Our builds are failing randomly in the “Virtual Device Test” step with the error message:

Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{…}: java.lang.IllegalArgumentException: Unsupported ISO 3166 country: en

The step has been configured with “Nexus9,23,en,landscape”.

Sometimes all tests passes, sometimes a random test fails with this error.

Any idea what could be causing this?

Hello there,

it could be a threading problem I guess if it’s random.
could you send me a successful and a failing build’s url please?
so I can check the logs to look for any difference

Hi, thanks for responding.

Build #315 FAIL:  Device test: "putMultipleProductsInCart"     java.lang.IllegalArgumentException: Unsupported ISO 3166 country: en
Build #316 SUCCESS:

Note that these two builds share the same GIT SHA value.


Could you check out this thread?

I’ve been there already. I’m not sure what to make of it though. Normally Locale.getDefault() returns the proper format as suggested in the accepted StackOverflow answer.
It’s also pretty strange that it works fine on all other devices, and only fails occasionally with the Virtual Device Testing step.

However, I could try and force a locale with language tag: “en-US” when encountering a Locale.getDefault() of “en” in testmode… and see what will happen. I’ll be back…


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.