【问题标题】:Failed to load config from https://10.20.1.98/config.js?room=n...', [TypeError: Network request failed无法从 https://10.20.1.98/config.js?room=n...' 加载配置,[TypeError:网络请求失败
【发布时间】:2020-02-23 11:40:55
【问题描述】:

我正在尝试连接 jitsi meet 服务器,但出现此错误 无法从https://10.20.1.98/config.js?room=n...'加载配置,[TypeError: Network request failed]

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

【问题讨论】:

  • 嘿,有什么解决办法吗?

标签: rocket.chat jitsi-meet


【解决方案1】:

我没有使用rocket.chat,但如果您可以操纵您的应用,这可能是使其工作的一种方法:

我明白了,您有自己的内部服务器,您必须在手机上安装根证书才能连接到您的服务器。

如果是这样,您必须执行以下操作: 将android:networkSecurityConfig="@xml/network_security_config" 添加到您的Android Manifest 中的应用程序标签并创建相应的文件到: 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> 

所以你的App知道要使用安装好的证书,否则会使用平台默认的。

我不得不说,这个问题出现在许多开发人员身上,所以可能还有其他解决方案,比如我在 jitsi-meet 中找到的。 但这就是它对我有用的方式。

希望对你有帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-06-11
    • 2022-01-12
    • 2020-04-09
    • 1970-01-01
    • 1970-01-01
    • 2018-12-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多