【发布时间】:2021-10-13 11:43:58
【问题描述】:
我已下载并使用以下内容运行 Collabora/Code docker 映像:
docker run -t -d -p 127.0.0.1:9980:9980 -e "domain=localhost" -e "username=admin" -e "password=S3cRet" -e --restart always collabora/code
我还创建了一个本地 WOPI API,它公开了 4 个必需的端点,我可以在浏览器/邮递员/等中成功地点击这些端点。每当我尝试使用指定的文档访问 Collabora 时,都会收到以下错误:
网址:http://localhost:9980/loleaflet/7151e02/loleaflet.html?WOPISrc=http://localhost:5001/wopi/files/test123
VM682:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)
at PostMessageReadyListener (loleaflet.html?WOPISrc=http://localhost:5001/wopi/files/test:23)
在开发工具中查看该代码显示它在 JSON.parse() 行上失败。 e.data 对象不是字符串,它也不包含 MessageId 属性。
window.WOPIpostMessageReady = false;
var PostMessageReadyListener = function(e) {
if (!(e && e.data))
return;
var msg = JSON.parse(e.data);
if (msg.MessageId === 'Host_PostmessageReady') {
window.WOPIPostmessageReady = true;
window.removeEventListener('message', PostMessageReadyListener, false);
}
};
这是 Collabora 的问题吗?我没有正确配置的东西?
【问题讨论】:
-
你找到解决办法了吗?
标签: nextcloud