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

RethinkDB + Rest Auth #740

Closed
1 task
vladdnepr opened this issue Apr 5, 2022 · 6 comments
Closed
1 task

RethinkDB + Rest Auth #740

vladdnepr opened this issue Apr 5, 2022 · 6 comments
Labels

Comments

@vladdnepr
Copy link

RethinkDB + Rest Auth

Got Expected type SEQUENCE but found SINGLE_SELECTION erros after login with REST AUTH

Your environment

Server-side

  • Your own setup:
    • Linux
    • 0.18.3
    • RethinkDB
    • standalone

Steps to reproduce

1st console

  1. pip3 install flask
  2. python auth.py

2nd console

  1. docker-compose up -d
  2. tail -f log/tinode.log

Browser

  1. http://localhost:6060/#
  2. Login alice and password "alice123"

Expected behaviour

Login success

Actual behaviour

Disconnected by client

In tinode logs we can see next

I2022/04/05 09:46:09 in: '{"hi":{"id":"102374","ver":"0.18.3","ua":"TinodeWeb/0.18.3 (Chrome/99.0; MacIntel); tinodejs/0.18.3","lang":"ru-RU","platf":"web"}}' sid='KZXz8Z-fixQ' uid='' I2022/04/05 09:46:09 in: '{"login":{"id":"102375","scheme":"basic","secret":"YWxpY2U6YWxpY2UxMjM="}}' sid='KZXz8Z-fixQ' uid='' I2022/04/05 09:46:09 in: '{"sub":{"id":"102376","topic":"me","get":{"what":"sub desc tags cred"}}}' sid='KZXz8Z-fixQ' uid='QVuwC5jz9o4' E2022/04/05 09:46:09 init_topic: failed to load or create topic: usrQVuwC5jz9o4 rethinkdb: Expected type SEQUENCE but found SINGLE_SELECTION: null in: r.DB("tinode").Table("users").Get("QVuwC5jz9o4").Filter(func(var_2 r.Term) r.Term { return r.Row.Field("State").Eq(20).Not() }) E2022/04/05 09:46:09 ws: readLoop KZXz8Z-fixQ websocket: close 1005 (no status)

Server-side log

I2022/04/05 09:46:09 in: '{"hi":{"id":"102374","ver":"0.18.3","ua":"TinodeWeb/0.18.3 (Chrome/99.0; MacIntel); tinodejs/0.18.3","lang":"ru-RU","platf":"web"}}' sid='KZXz8Z-fixQ' uid=''
I2022/04/05 09:46:09 in: '{"login":{"id":"102375","scheme":"basic","secret":"YWxpY2U6YWxpY2UxMjM="}}' sid='KZXz8Z-fixQ' uid=''
I2022/04/05 09:46:09 in: '{"sub":{"id":"102376","topic":"me","get":{"what":"sub desc tags cred"}}}' sid='KZXz8Z-fixQ' uid='QVuwC5jz9o4'
E2022/04/05 09:46:09 init_topic: failed to load or create topic: usrQVuwC5jz9o4 rethinkdb: Expected type SEQUENCE but found SINGLE_SELECTION:
null in:
r.DB("tinode").Table("users").Get("QVuwC5jz9o4").Filter(func(var_2 r.Term) r.Term { return r.Row.Field("State").Eq(20).Not() })
E2022/04/05 09:46:09 ws: readLoop KZXz8Z-fixQ websocket: close 1005 (no status)

@vladdnepr vladdnepr added the bug label Apr 5, 2022
@vladdnepr
Copy link
Author

bug.zip

@or-else
Copy link
Contributor

or-else commented Apr 5, 2022

This is not really a bug in Tinode. The error message could be better but the server is working as intended.
The most likely reason for your trouble is that the response from your authenticator is incorrect.

Please use forum to ask question instead of creating issues. Or at least try to debug your problems first.

@or-else
Copy link
Contributor

or-else commented Apr 5, 2022

Actually this is a bug in the driver.

or-else added a commit that referenced this issue Apr 5, 2022
@or-else
Copy link
Contributor

or-else commented Apr 5, 2022

This fixes it: adfb5f3

@vladdnepr
Copy link
Author

Cool. Waiting for release

@or-else
Copy link
Contributor

or-else commented Apr 26, 2022

@or-else or-else closed this as completed Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants