Meteor Cordova iOS HCP 失败,日志显示 PNG 文件在不存在时已存在
Meteor Cordova iOS HCP fails, log says PNG file already exists when it doesn't
我 运行 meteor run ios-device ...
正在 Xcode 中查看日志。我在本地主机上使用热代码推送来进行 css 更改,这些更改会立即显示在 iOS 模拟器设备中。我将 user_white.png 添加到图像文件夹,并在 css 中指向一个 url(...) 。我得到这个错误,我不明白,因为 user_white.png 没有 "already exist"。即使我在 Xcode 中停止启动模拟器,此错误仍然存在。知道这个错误是什么意思吗?
2018-07-28 12:48:51.511632-0400 Vium[41847:2439935] Download failure:
Could not link to cached asset: Error Domain=NSCocoaErrorDomain Code=516
"“user_white.png” couldn’t be linked to “images” because an item
with the same name already exists."
...
NSFilePath=/Users/opx/Library/Developer/CoreSimulator/Devices/6E759135-D5E3-
4AC0-AF35-92FCC473A61D/data/Containers/Data/Application/D92D9589-4D22-4006-
8A08-0AC35932E769/Library/NoCloud/meteor/PartialDownload/app/images/user_white.png,
NSUnderlyingError=0x60000024b520 {Error Domain=NSPO
2018-07-28 12:48:51.516594-0400 Vium[41847:2438252] ERROR:
{"line":36,"column":30,
"sourceURL":"http://localhost:12072/plugins/cordova-plugin-meteor-webapp/www/webapp_local_server.js"}
更新:
这是 Meteor 中的一个错误——参见 https://github.com/meteor/meteor/issues/10181 for details, specifically https://github.com/meteor/cordova-plugin-meteor-webapp/issues/56。该问题导致iOS Meteor Cordova热码推送失败。在导致 HCP 失败的情况下,下面的答案是不够的,但问题也出现在 Xcode 调试中 由 [=20] 解决=] 如下所述。
郑重声明,此问题的答案是错误消息听起来非常具有误导性,user_white.png 尚未以对用户有意义的方式存在。解决方案很简单:停止 Xcode/iOS 模拟器,停止本地主机上的 Meteor 服务器 运行,然后重新运行 meteor run ios-device ...
.
在 Xcode 中重建服务器端和随后重建设备客户端使问题消失。热代码推送和 Xcode 设备模拟器的组合显然不能以报告您真正需要知道的方式来处理添加新的 css 引用图像,即:停止一切并重建应用程序!
这是实际的答案:修复已合并到 cordova-plugin-meteor-webapp 插件的 meteor 代码中,因此从该插件的 1.7.0 版开始,此问题已解决。有关详细信息,请参阅我之前 "answer" 和 https://github.com/meteor/meteor/issues/10277 中的链接,但它已在 meteor 中修复。
我 运行 meteor run ios-device ...
正在 Xcode 中查看日志。我在本地主机上使用热代码推送来进行 css 更改,这些更改会立即显示在 iOS 模拟器设备中。我将 user_white.png 添加到图像文件夹,并在 css 中指向一个 url(...) 。我得到这个错误,我不明白,因为 user_white.png 没有 "already exist"。即使我在 Xcode 中停止启动模拟器,此错误仍然存在。知道这个错误是什么意思吗?
2018-07-28 12:48:51.511632-0400 Vium[41847:2439935] Download failure:
Could not link to cached asset: Error Domain=NSCocoaErrorDomain Code=516
"“user_white.png” couldn’t be linked to “images” because an item
with the same name already exists."
...
NSFilePath=/Users/opx/Library/Developer/CoreSimulator/Devices/6E759135-D5E3-
4AC0-AF35-92FCC473A61D/data/Containers/Data/Application/D92D9589-4D22-4006-
8A08-0AC35932E769/Library/NoCloud/meteor/PartialDownload/app/images/user_white.png,
NSUnderlyingError=0x60000024b520 {Error Domain=NSPO
2018-07-28 12:48:51.516594-0400 Vium[41847:2438252] ERROR:
{"line":36,"column":30,
"sourceURL":"http://localhost:12072/plugins/cordova-plugin-meteor-webapp/www/webapp_local_server.js"}
更新: 这是 Meteor 中的一个错误——参见 https://github.com/meteor/meteor/issues/10181 for details, specifically https://github.com/meteor/cordova-plugin-meteor-webapp/issues/56。该问题导致iOS Meteor Cordova热码推送失败。在导致 HCP 失败的情况下,下面的答案是不够的,但问题也出现在 Xcode 调试中 由 [=20] 解决=] 如下所述。
郑重声明,此问题的答案是错误消息听起来非常具有误导性,user_white.png 尚未以对用户有意义的方式存在。解决方案很简单:停止 Xcode/iOS 模拟器,停止本地主机上的 Meteor 服务器 运行,然后重新运行 meteor run ios-device ...
.
在 Xcode 中重建服务器端和随后重建设备客户端使问题消失。热代码推送和 Xcode 设备模拟器的组合显然不能以报告您真正需要知道的方式来处理添加新的 css 引用图像,即:停止一切并重建应用程序!
这是实际的答案:修复已合并到 cordova-plugin-meteor-webapp 插件的 meteor 代码中,因此从该插件的 1.7.0 版开始,此问题已解决。有关详细信息,请参阅我之前 "answer" 和 https://github.com/meteor/meteor/issues/10277 中的链接,但它已在 meteor 中修复。