gcloud 崩溃(AttributeError):'NoneType' 对象没有属性 'androidModelId' 运行 XCTests on Firebase Test Lab

gcloud crashed (AttributeError): 'NoneType' object has no attribute 'androidModelId' running XCTests on Firebase Test Lab

按照 Test with the gcloud CLI on iOS 的说明,构建用于测试的应用程序并将所有测试数据保存在一个 zip 文件中后,我执行命令

gcloud firebase test ios run \
    --test MyTests.zip \
    --device model=iphone7,version=12.1,locale=it_IT,orientation=portrait

但是,在 Firebase 上成功上传测试后,我收到此错误:

ERROR: gcloud crashed (AttributeError): 
'NoneType' object has no attribute 'androidModelId'

似乎 gcloud 正在搜索 'androidModelId' 属性(但由于我 运行 在 iOS 上进行测试,因此找不到它...

当 gcloud 想要向您报告设备尺寸无效时,这似乎是一个错误。在您的情况下 iphone7:12.1 不是受支持的设备。 iphone7:12.0 会。请运行

gcloud firebase test ios models list

查看支持的设备和版本列表。

这应该有效:

gcloud firebase test ios run \
    --test MyTests.zip \
    --device model=iphone7,version=12.0,locale=it_IT,orientation=portrait

这应该会在 2019 年 7 月 9 日星期二的下一个 gcloud 版本中修复。