Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getGroupList() 与 getGroupInfo() 被调用之后不返回值 #35

Closed
undefined-moe opened this issue Apr 8, 2020 · 8 comments
Closed
Labels
bug BUG domain: core has solution 已存在解决办法

Comments

@undefined-moe
Copy link
Member

getGroupList()getGroupInfo() 被调用之后不返回值。

const { App: Koishi } = require('koishi');
class Bot {
    constructor(item) {
        this.config = item.config;
        this.app = new Koishi({
            type: 'ws',
            port: 6700,
            server: `ws://${this.config.host || 'localhost'}:${this.config.port || '6700'}`,
            token: this.config.access_token
        });
        this.run();
    }
    async run() {
        this.app.receiver.on('connect', async () => {
            console.log('Connected');
            let groups = await this.app.sender.getGroupList();
            console.log(`Found ${groups.length} groups`); // -> No output
        });
        await this.app.start();
    }
};
let config = require('./config.json');
global.App = new Bot({ config });

CQHTTP 显示 已成功处理一个API请求:get_group_list

Ubuntu 1604
node@13.3.0
CoolQ@5.19.9A
CQHTTP@4.13.0
koishi@1.11.2

@shigma
Copy link
Member

shigma commented Apr 8, 2020

程序输出了什么?Connected 输出了吗?

@undefined-moe
Copy link
Member Author

image

加了个Interval,这个速度显然是不正常的

@shigma
Copy link
Member

shigma commented Apr 8, 2020

我这测试的结果是这样的:

image

image

我没看出有问题的地方?

@undefined-moe
Copy link
Member Author

我测试1.11.1可以用,1.11.2就会炸,

@undefined-moe
Copy link
Member Author

爆炸的lock长这样 https://s.qaq.sh/x10iw

@shigma
Copy link
Member

shigma commented Apr 8, 2020

唔。可能确实是 1.11.2 的问题,我稍后研究一下。

@shigma
Copy link
Member

shigma commented Apr 18, 2020

@masnn 1.12.0 已经发布,应该修复了这个问题。

@shigma shigma reopened this Apr 18, 2020
@shigma shigma added the has solution 已存在解决办法 label Apr 18, 2020
@undefined-moe
Copy link
Member Author

已修复。

shigma added a commit that referenced this issue Aug 2, 2020
* Create FUNDING.yml

* fix(core): fix shouldFetchUsage

* fix(core): fix ws server broken by cqhttp 4.14

* chore: bump version

* dep: cac: ^6.5.7 -> 6.5.8, prompts: ^2.3.1 -> 2.3.2

* fix(core): fix ws server send (close: #35)

* fix(core): handle anonymous message

* feat(plugin-common): support echo -a/-A

* feat(plugin-common): get group member info in contextify

* fix(cli): check require stack when encountered with MODULE_NOT_FOUND

* feat(core): support meta.$app

* fix(core): fix non-negated options

* feat(core): strip quote on rest parameters and support single quotes

* feat(utils): enhanced cqCode.stringify

* chore: tweak

* feat(test-utils): attach sender to meta

* fix(core): fix non-negated options

* bump version (escape-string-regexp 2->3)

koishi-database-level > leveldown: ^5.5.1 -> 5.6.0
koishi-database-level > levelup: ^4.3.2 -> 4.4.0
koishi-database-level > subleveldown: ^4.1.4 -> 5.0.0

* docker: create Dockerfile

* docker: use start.js to init config

* docker: add docker-compose.yml

* docker: pull from docker hub

* docker: delete some ports in docker-compose.yml

* docker: add MySQL

* docker: downgrade MySQL to 5.7

mysqljs library is not compatible with MySQL 8's default auth method

* docker: name containers

Co-authored-by: Shigma <1700011071@pku.edu.cn>
Co-authored-by: Shigma <33423008+Shigma@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug BUG domain: core has solution 已存在解决办法
Projects
None yet
Development

No branches or pull requests

2 participants