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

Issue with backend #4

Open
digbee42 opened this issue Sep 30, 2022 · 12 comments
Open

Issue with backend #4

digbee42 opened this issue Sep 30, 2022 · 12 comments

Comments

@digbee42
Copy link

image

I get this issue with the backend while running npm start.

@VardanMelik
Copy link

VardanMelik commented Feb 19, 2023

Hi, did you find solution? I have the same with empty/new MongoDB database.

@Mi-Boss
Copy link

Mi-Boss commented Mar 3, 2023

hi anyone find a solution on this please update regarding same mangodb connection error

@roxtar-venture
Copy link

@wbrandon25
seems like we need migration files for db.

@Jacob-Petro
Copy link

Hi i have tried recreating the game_loop collection and added default data but still getting the same error

@BustAces
Copy link

hi anyone find a solution on this please update regarding same mangodb connection error

Its not a connection error, i added a console log and that confirms that the connection to the mongodb is successfully.. But still get this error

@nakamoto-dev
Copy link

i fixed by creating the schema manually then i exported my Game_loop id and updated and got fixed

@nakamoto-dev
Copy link

use mydb
switched to db mydb
show collections
collection
users
db.game_loops.insertOne({ round_number: 1, active_player_id_list: [], multiplier_crash: 0, b_betting_phase: false, b_game_phase: false, b_cashout_phase: false, time_now: -1, previous_crashes: [], round_id_list: [], chat_messages_list: [] })
{
"acknowledged" : true,
"insertedId" : ObjectId("6491ea03b8255fc2af655e71")
}
show collections
collection
game_loops
users

@nakamoto-dev
Copy link

With this new id , update GAME_LOOP constant

@nakamoto-dev
Copy link

const Game_loop = require("./models/game_loop")
require('dotenv').config()

const GAME_LOOP_ID = 'update here'

const { Server } = require('socket.io')
const http = require('http')
const Stopwatch = require('statman-stopwatch');
const { update } = require("./models/user");
const sw = new Stopwatch(true);``

@VardanMelik
Copy link

@nakamoto-dev You right with that data database work.
Try test in long time, You will have an issue with No User Authentication, and after that you can't bet.

@nakamoto-dev
Copy link

nakamoto-dev commented Jul 4, 2023 via email

@BustAces
Copy link

BustAces commented Nov 9, 2023

I found a way to make it working, it works for me 100% now after getting this error, the fix i posted here:
#6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants