我正在尝试连接jitsi Meet服务器,但出现此错误 无法从https://10.20.1.98/config.js?room=n ...'加载配置,[TypeError:网络请求失败]
i install rocket.chat and jitsi in local server and want to connect my android rocket.chat app to local server and its text messaging is working fine but when i click on video/audio call it
alert me timeout exception for 30 sec and return a white blank screen and it gives us belowenter image description here error in emulator?
Failed to load config from https://10.20.1.98/config.js?room=nimsss6x5hxtgma9wa2wgcv5ex4pubmkhz9jgyq6mfthwd62rghj7ku', [TypeError: Network request failed]
2020-02-23 10:39:12.614 7152-7680/chat.rocket.android.dev E/unknown:ReactNative: console.error: "[__filename]", "<>: ", "Failed to load config from https://10.20.1.98/config.js?room=nimsss6x5hxtgma9wa2wgcv5ex4pubmkhz9jgyq6mfthwd62rghj7ku", {}, stack:
we use self signed certificate (invalid certificate) and i can access config.js file in web browser.
rocket.chat version 3.5.0
答案 0 :(得分:0)
我没有使用rocket.chat,但是如果您可以操纵您的应用,这可能是使其运行的一种方式:
我知道,您拥有自己的内部服务器,并且必须在手机上安装根证书才能连接到服务器。
如果是,则必须执行以下操作:
将android:networkSecurityConfig="@xml/network_security_config"
添加到您的Android清单中的应用程序标签中,并创建相应的文件以:
app/src/main/res/xml
这是network_security_config.xml
文件的内容:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<debug-overrides>
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
因此您的应用知道使用已安装的证书,否则它将使用默认平台。
我不得不说,这个问题在许多开发人员看来都是如此,因此可能还有其他解决方案,例如我在jitsi-meet中找到的解决方案。 但这就是它为我工作的方式。
希望有帮助。