zoukankan      html  css  js  c++  java
  • iphone设备在stf平台不展示,报错string: undefined (not a string) at Field

    throw Error("Illegal value for " + this.toString(true) + " of type " + this.type.name + ": " + val + " (" + msg + ")");

      因为没有该设备, "iPhone12,8": "iPhone SE" 添加到 DeviceType  中即可。

    2021-08-11T05:34:09.844Z INF/ios-device 5738 [00008030-001278DC21E3802E] Fully operational

    stf/node_modules/protobufjs/dist/ProtoBuf.js:2641 throw Error("Illegal value for "+this.toString(true)+" of type "+this.type.name+": "+val+" ("+msg+")"); ^ Error: Illegal value for Message.Field .DeviceIdentityMessage.model of type string: undefined (not a string) at Field. (stf/node_modules/protobufjs/dist/ProtoBuf.js:2641:27) at ...

     

    原因:获取不到this.type.name,因为设备没有在lib/units/ios-device/support/TypeToModel.js中维护导致,添加设备即可。

    已有设备记录:

    DeviceType = {
    "iPhone6,1": "iPhone 5s"
    , "iPhone6,2": "iPhone 5s"
    , "iPhone7,2": "iPhone 6"
    , "iPhone7,1": "iPhone 6 Plus"
    , "iPhone8,1": "iPhone 6s"
    , "iPhone8,2": "iPhone 6s Plus"
    , "iPhone8,4": "iPhone SE"
    , "iPhone9,1": "iPhone 7"
    , "iPhone9,3": "iPhone 7"
    , "iPhone9,2": "iPhone 7 Plus"
    , "iPhone9,4": "iPhone 7 Plus"
    , "iPhone10,1": "iPhone 8"
    , "iPhone10,4": "iPhone 8"
    , "iPhone10,2": "iPhone 8 Plus"
    , "iPhone10,5": "iPhone 8 Plus"
    , "iPhone10,3": "iPhone X"
    , "iPhone10,6": "iPhone X"
    , "iPhone11,8": "iPhone XR"
    , "iPhone11,2": "iPhone XS"
    , "iPhone11,6": "iPhone XS Max"
    , "iPhone11,4": "iPhone XS Max"
    , "iPad6,11": "iPad air 2"
    , "iPhone13,2": "iPhone 12"
    , "iPhone12,8": "iPhone SE"
    }
  • 相关阅读:
    Vue
    Vue
    Vue
    Vue
    Vue
    kubernetes
    kubernetes
    kubernetes
    django源码bug解决方案
    UNI-APP 桌面LOGO角标设置(ios)
  • 原文地址:https://www.cnblogs.com/Tanwheey/p/15127978.html
Copyright © 2011-2022 走看看