Giter VIP home page Giter VIP logo

e-quizz's Introduction

Hi there, I'm Arthur 👋

 

I am a dedicated full-stack web developer, fervently engaged in deepening my technical skills and absorbing new tech knowledge on a daily basis.

 

In pursuit of expanding my academic foundation in Computer Science, I am actively studying at CESi, and concurrently, I am gaining practical experience by working at the French Air and Space Force Academy.

 

github stats

 

TopTech Skills

Front-End Development

Front-End Skills

Back-End Development

Back-End Skills

Software Development

Software Dev Skills

Tools and Platforms

Tools and Platforms

Stats

github stats

Need to get in touch? Reach out via my personal website.

e-quizz's People

Contributors

baamed avatar esteubed avatar khylpe avatar tristan13r avatar

Stargazers

 avatar

e-quizz's Issues

Disconnect users when session is reseted

Disconnecting users

We are trying to disconnect all users when the session must be reseted.
The chosen way to do it crashes the server, see commit : cf3e0dd

See bellow error :

E-Quizz\server.js:421
       socket.disconnect();
       ^

ReferenceError: socket is not defined
    at resetSession (D:\Dev\Projet\node-server\E-Quizz\E-Quizz\server.js:421:8)
    at Socket.<anonymous> (D:\Dev\Projet\node-server\E-Quizz\E-Quizz\server.js:63:22)
    at Socket.emit (node:events:513:28)
    at Socket.emitUntyped (D:\Dev\Projet\node-server\E-Quizz\E-Quizz\node_modules\socket.io\dist\typed-events.js:69:22)
    at D:\Dev\Projet\node-server\E-Quizz\E-Quizz\node_modules\socket.io\dist\socket.js:614:39
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

Node.js v18.12.1

Node server crashes

Node server crashes when no student is connected and the teacher tries to start the session anyway.

To reproduce error :

  1. Do not register any student
  2. Create a session
  3. Try to start a session (wont work since there is no student connected
  4. refresh the page (teacher)

--> Teacher is asked to create a session (which should already be done), and nothing happens when clicking "Créer la session", bellow error appears :

See error below :

/server.js:130
                     client.to('boitier').emit('test', quizzQuestionsAndAnswers[1][questionNumber - 1][3]);
                                                                                                      ^

TypeError: Cannot read properties of undefined (reading '3')
    at Socket.<anonymous> (/home/equizz/website/server.js:130:103)
    at Socket.emit (node:events:513:28)
    at Socket.emitUntyped (/home/equizz/website/node_modules/socket.io/dist/typed-events.js:69:22)
    at /home/equizz/website/node_modules/socket.io/dist/socket.js:614:39
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

Node.js v18.15.0
/home/equizz/.pm2/logs/server-error.log last 15 lines:
0|serverSo |     at getQuestion (/home/equizz/website/server.js:464:74)
0|serverSo |     at getSession (/home/equizz/website/server.js:339:32)
0|serverSo |     at Namespace.<anonymous> (/home/equizz/website/server.js:46:50)
0|serverSo |     at Namespace.emit (node:events:513:28)
0|serverSo |     at Namespace.emitReserved (/home/equizz/website/node_modules/socket.io/dist/typed-events.js:56:22)
0|serverSo |     at /home/equizz/website/node_modules/socket.io/dist/namespace.js:234:22
0|serverSo |     at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
0|serverSo | TypeError: Cannot read properties of undefined (reading '0')
0|serverSo |     at getQuestion (/home/equizz/website/server.js:464:74)
0|serverSo |     at getSession (/home/equizz/website/server.js:339:32)
0|serverSo |     at Namespace.<anonymous> (/home/equizz/website/server.js:46:50)
0|serverSo |     at Namespace.emit (node:events:513:28)
0|serverSo |     at Namespace.emitReserved (/home/equizz/website/node_modules/socket.io/dist/typed-events.js:56:22)
0|serverSo |     at /home/equizz/website/node_modules/socket.io/dist/namespace.js:234:22
0|serverSo |     at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.