-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
hub: missing both subscriptions for 'p2pxEtcnfc1MVZ3RBB_Vu_lgQ' (SHOULD NEVER HAPPEN!) #738
Comments
This issue should be fixed in a81440d. Please verify. Thanks. |
Fixed, thanks. |
This issue still happens. Tested with fresh install of master. This HTML reproduces the problem: <!DOCTYPE html>
<html lang="en">
<head>
<script crossorigin="anonymous"
src="https://cdn.jsdelivr.net/npm/tinode-sdk/umd/tinode.dev.js">
</script>
<meta charset="UTF-8">
</head>
<body id="home">
<h1>HTML5 boilerplate</h1>
<script>
u1 = {
u: "alice",
p: "alice123",
}
u2 = {
u: "bob",
p: "bob123",
}
t1 = new Tinode({
host: "localhost:6060",
apiKey: "AQEAAAABAAD_rAp4DJh05a1HAwFT3A6K",
});
t2 = new Tinode({
host: "localhost:6060",
apiKey: "AQEAAAABAAD_rAp4DJh05a1HAwFT3A6K",
});
async function run() {
await t1.connect()
await t1.loginBasic(u1.u, u1.p)
await t2.connect()
await t2.loginBasic(u2.u, u2.p)
await t1.subscribe(t2.getCurrentUserID())
await t2.subscribe(t1.getCurrentUserID())
await t1.delTopic(t2.getCurrentUserID())
await t2.delTopic(t1.getCurrentUserID())
await t1.subscribe(t2.getCurrentUserID())
}
run()
</script>
</body>
</html> server logs:
|
released in 0.18.4 |
The tinode sdk from https://cdn.jsdelivr.net/npm/tinode-sdk/umd/tinode.dev.js is at 0.18.3. |
I think I know what happened. |
Fixed in 16be737 |
This issue is still there in v0.18.5 and it happens for {del}.
del.html: <!DOCTYPE html>
<html lang="en">
<head>
<script crossorigin="anonymous"
src="https://cdn.jsdelivr.net/npm/tinode-sdk/umd/tinode.dev.js">
</script>
<meta charset="UTF-8">
</head>
<body id="home">
<h1>HTML5 boilerplate</h1>
<script>
u1 = {
u: "alice",
p: "alice123",
}
u2 = {
u: "bob",
p: "bob123",
}
t1 = new Tinode({
host: "localhost:6060",
apiKey: "AQEAAAABAAD_rAp4DJh05a1HAwFT3A6K",
});
t2 = new Tinode({
host: "localhost:6060",
apiKey: "AQEAAAABAAD_rAp4DJh05a1HAwFT3A6K",
});
async function run() {
await t1.connect()
await t1.loginBasic(u1.u, u1.p)
await t2.connect()
await t2.loginBasic(u2.u, u2.p)
await t1.subscribe(t2.getCurrentUserID())
await t2.subscribe(t1.getCurrentUserID())
await t1.delTopic(t2.getCurrentUserID())
await t2.delTopic(t1.getCurrentUserID())
await t1.subscribe(t2.getCurrentUserID())
}
run()
</script>
</body>
</html> |
Fixed in devel:
|
{del} still gives |
I cannot reproduce:
|
Your test uses {leave}. I don't know how to get this across. I said it 3 times; it's {del} packets that still trigger the problem. |
|
tinode version: master
To reproduce:
expected: user B subs successfully
got:
tinode | 2022/03/30 08:31:45 hub: missing both subscriptions for 'p2pxEtcnfc1MVZ3RBB_Vu_lgQ' (SHOULD NEVER HAPPEN!) tinode | 2022/03/30 08:31:45 init_topic: failed to load or create topic: p2pxEtcnfc1MVZ3RBB_Vu_lgQ internal
user A logs:
user B logs:
The same problem appears if instead of {del}, {leave} unsub=true packets are used.
The text was updated successfully, but these errors were encountered: