瀏覽代碼

Workaround for #3: You need to patch matrix-js-sdk for a longer timeout

develop
ar 3 年之前
父節點
當前提交
b8db96e4e2
共有 1 個檔案被更改,包括 8 行新增0 行删除
  1. 8
    0
      README.md

+ 8
- 0
README.md 查看文件

@@ -15,6 +15,14 @@ To use Matrix Recorder, you need to have installed a recent version of [Node.js]

The last line will install all required dependencies in the `node_modules` subfolder.

### Long-running pulls from homeserver

Note: Newer `matrix-js-sdk` versions work with a hardcoded timeout of 80 seconds for the initial sync - if no data is received during those 80 seconds, it will throw a `ORG.MATRIX.JSSDK_TIMEOUT` error and exit. Unfortunately, at the moment this is not a setting we can overwrite from Matrix Recorder. So if you experience this issue, you need to manually patch `matrix-js-sdk` by giving a longer period (such as an hour) for the `BUFFER_PERIOD_MS` constant in the `lib/sync.js` module:

sed -i "" "s/var BUFFER_PERIOD_MS = 80 \\* 1000;/var BUFFER_PERIOD_MS = 3600 \\* 1000;/" node_modules/matrix-js-sdk/lib/sync.js

If you run `npm install` again to upgrade to a newer version of `matrix-js-sdk`, you will have to re-perform the patch. We are currently looking into how to make that configurable.


## Usage
If Matrix Recorder is installed properly, you can use it by telling it where you want to store your session data and the retrieved message data (this should be an empty or to-be-created directory), for example like this (you need to run it from the folder you installed it in above):

Loading…
取消
儲存