Canop / miaou

A chat server with OAuth2 authentication, persistent and searchable history, video and audio, markdown formatting, private and public rooms, stars, votes, embedded games, and many other features
http://miaou.dystroy.org/
Other
539 stars 73 forks source link

Error: No Row (room) #86

Closed k0fi closed 6 years ago

k0fi commented 6 years ago

Hi, I have a new installation with node 9.3. I have imported schema to postgresql 9.5 from the default postgres-creation.sql. After authentication however, user gets this error:

An error occured

Error: No Row

Apparently there is no room to join:

miaou=> \dt
 List of relations

Schema |        Name        | Type  | Owner 
--------+--------------------+-------+-------
 public | access_request     | table | miaou
 public | ban                | table | miaou
 public | db_version         | table | miaou
 public | message            | table | miaou
 public | message_vote       | table | miaou
 public | ping               | table | miaou
 public | player             | table | miaou
 public | player_name_change | table | miaou
 public | plugin_player_info | table | miaou
 public | pref               | table | miaou
 public | room               | table | miaou
 public | room_auth          | table | miaou
 public | room_tag           | table | miaou
 public | scm_hook           | table | miaou
 public | scm_hook_room      | table | miaou
 public | survey_vote        | table | miaou
 public | tag                | table | miaou
 public | watch              | table | miaou
(18 rows)

miaou=> SELECT * from room;
 id | name | private | listed | dialog | lang | img | description 
----+------+---------+--------+--------+------+-----+-------------
(0 rows)

The error stack:

From previous event:
    at /home/me/miaou/libs/server.js:25:3
    at pass (/home/me/miaou/node_modules/passport/lib/authenticator.js:357:9)
    at Authenticator.deserializeUser (/home/me/miaou/node_modules/passport/lib/authenticator.js:362:5)
    at SessionStrategy.authenticate (/home/me/miaou/node_modules/passport/lib/strategies/session.js:60:10)
    at attempt (/home/me/miaou/node_modules/passport/lib/middleware/authenticate.js:361:16)
    at authenticate (/home/me/miaou/node_modules/passport/lib/middleware/authenticate.js:362:7)
    at Layer.handle [as handle_request] (/home/me/miaou/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/me/miaou/node_modules/express/lib/router/index.js:317:13)
    at /home/me/miaou/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/me/miaou/node_modules/express/lib/router/index.js:335:12)
    at next (/home/me/miaou/node_modules/express/lib/router/index.js:275:10)
    at initialize (/home/me/miaou/node_modules/passport/lib/middleware/initialize.js:53:5)
    at Layer.handle [as handle_request] (/home/me/miaou/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/me/miaou/node_modules/express/lib/router/index.js:317:13)
    at /home/me/miaou/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/me/miaou/node_modules/express/lib/router/index.js:335:12)
    at next (/home/me/miaou/node_modules/express/lib/router/index.js:275:10)
    at /home/me/miaou/node_modules/express-session/index.js:489:7
    at Command.callback (/home/me/miaou/node_modules/connect-redis/lib/connect-redis.js:167:14) message: 'No Row' }
Unexpectedly Missing Row in
select id, name, img, description, private, listed, dialog, lang, auth, (select array(select tag from room_tag where room=689)) as tags from room left join room_auth a on a.room=room.id and a.player=4 where room.id=689

How to fix this? Thanks in advance.

Canop commented 6 years ago

In the configuration file, there, there's an example array for the "welcomeRooms". Empty that array:

welcomeRooms: [],

Don't hesitate to come and ask questions in one of our chat rooms (for example this one)

(I think I'll empty the array in the config-default.js file, it's hard to expect newcomers to read and understand the whole file at first)