强制安装的 Chrome 扩展:chrome.enterprise.deviceAttributes.getDeviceAssetId() 返回一个空字符串

问题描述

我们构建了一个 Chrome 扩展程序,它尝试读取 Google 管理控制台中定义的设备资产 ID。 该扩展程序是强制安装在 Chromebook 上的。

资产 ID 似乎被推送到 Chromebook,因为可以在登录设备之前按“Alt”+“V”进行查看。

但是,调用 chrome.enterprise.deviceAttributes.getDeviceAssetId() 会返回一个空字符串。 示例:

chrome.enterprise.deviceAttributes.getDeviceAssetId(function (assetId) {
    console.log("getDeviceAssetId() assetId=" + assetId); // <= this prints an empty string 
});

登录用户是关联的,并且设备已连接到网络。

清单摘录:

   "permissions": [
    "enterprise.deviceAttributes","storage","background","https://[...]",],

是否有人对可能导致资产 ID 为空的原因有任何建议?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)