Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js 无法在matrix js sdk中加密消息_Vue.js - Fatal编程技术网

Vue.js 无法在matrix js sdk中加密消息

Vue.js 无法在matrix js sdk中加密消息,vue.js,Vue.js,我使用的是“olm”版本“3.1.4”和“matrix js sdk”版本“2.4.6” 尝试使用olm使用矩阵中支持的端到端加密 我正在使用以下代码剪切: const cryptoStore = new sdk.MemoryCryptoStore(window.localStorage); const webStorageSessionStore = new sdk.WebStorageSessionStore(window.localStorage);

我使用的是“olm”版本“3.1.4”和“matrix js sdk”版本“2.4.6” 尝试使用olm使用矩阵中支持的端到端加密

我正在使用以下代码剪切:

    const cryptoStore = new sdk.MemoryCryptoStore(window.localStorage);
         const webStorageSessionStore = new sdk.WebStorageSessionStore(window.localStorage);
         var matrixStore = new sdk.MatrixInMemoryStore();

         matrixClient = sdk.createClient({
           baseUrl: 'SERVER_HOME',
           accessToken: token,
           userId: 'USER_ID',
           store: matrixStore,
           sessionStore: webStorageSessionStore,
           cryptoStore: cryptoStore,
           deviceId: 'DEVICE_ID'});

matrixClient.initCrypto()
       .then(() => {
         matrixClient.startClient({ initialSyncLimit: 10 });
       })
1-我的post密钥/上载API请求错误

REQUEST: POST Request URL: https://SERVER_HOME/_matrix/client/r0/keys/upload/DEVICE_ID?access_token=XXXX

RESPONSE: 400 Bad Request {"errcode":"M_UNKNOWN","error":"One time key signed_curve25519:XXXX already exists. Old key: {\"key\":\"64zJVMH61Toei8Kaz2SRXEZ4VyNBjjG2vfaGjSXXXX\",\"signatures\":{\"@USER_ID\":{\"ed25519:869254020336060\":\"HBnlhazYGY+IrvImq5d4OcIYsXeo094St2p/SMYWobMfteML1gH1jMSUmAh9o7EYIXQMnshiPSh6FSdL4XXXXw\"}}}; new key: {'key': 'VSfPQ7NFzdPl0owA1pVK8CqTzLCyF6NQCuS8aTIIYmc', 'signatures': {'@USER_ID': {'ed25519:869254020336060': 'rIQHea/3kh5w8PaC91H83zsTKQDevbkPpnJ5Dpj7YHv3o4Jzq1O3AmgMzfhFzhlXBwn1N6gRPfC+jNMCIPXXXX'}}}"}
2-当我使用加密Roit室测试它,并尝试从sdk向Roit发送消息时,发现这是一个错误获取此错误

Error sending event UnknownDeviceError: This room contains unknown devices which have not been verified. We strongly recommend you verify them before continuing.
Error decrypting event (id=xxxx): DecryptionError[msg: The sender's device has not sent us the keys for this message., session: FoIZTb4W906iFiQofhzgyZlkjeR9XazjN9vfIC9uzFQ|nCwWvT+VU/FVz7uNLojW51+PtkrXj++eMC1d/Xxxxxxx]
3-当我用加密Roit室测试它并将消息从Roit发送到sdk时,我得到了这个错误

Error sending event UnknownDeviceError: This room contains unknown devices which have not been verified. We strongly recommend you verify them before continuing.
Error decrypting event (id=xxxx): DecryptionError[msg: The sender's device has not sent us the keys for this message., session: FoIZTb4W906iFiQofhzgyZlkjeR9XazjN9vfIC9uzFQ|nCwWvT+VU/FVz7uNLojW51+PtkrXj++eMC1d/Xxxxxxx]

您是否解决了发送事件未知代理错误:?您是否解决了发送事件未知代理错误:?