PDA

View Full Version : Project-Cars Dedicated Server Live App



Ph0eNiX
02-07-2015, 15:36
Hi all !

To help the community to move forward, I want to share you my work. I present you my application that aims to record all the time that are performed on the dedicated server, and provide you with statistics, and livetiming, as well as monitoring pilot.

You can find on github the repo and documentation in progress. https://github.com/JcPires/Project-Cars-DS-LiveApp

Once installed on my production server, and a few laps, you'd share the link so that you can report to you on what I offer.

Hope this helps some community, many things are still to come, as the league management. But at first there will be a long phase of debug, and pending the next update of the announced dedicated servers, no new function will be added.

exemples : http://eracing.fr:1337

Features available:


- Livetiming
- Save all the LAPS performed on the server
- Creation of an output file at the end of the session with "incidents / revolutions / outputs track / contact" per session.
- Ability to create events
- Ability to search bestlaps by some criterion
- Some general statistics


You will find here (http://forum.projectcarsgame.com/showthread.php?33757-Project-Cars-Dedicated-Server-Live-App&p=1028019&viewfull=1#post1028019) all futur addition, bug reports, and dev log

Unfortunately it is quite difficult to debug because everything is live and I needed active drivers on the server, which delayed me as much.


Language / Library / framework used:


- Node JS
- Sails Js
- Grunt
- Less
- Mustache
- Ejs
- Jquery
- Bootstrap 3
- Velocity Js
- Bcrypt
- Fs-extra
- Async
- OwlCarousel
- Trumbowyg
- DatePicker
- Weather icon
- Font-awesome



PS: I don't want to released now, but i need beta tester to debug much faster. Keep in mind, this is a BETA version. The design was not really worked





-------------------------------------------------------------------------------------------------------------------------------------
You want to support me: Paid me a beer ! (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=L7LJGKZRV8CE8)

Ph0eNiX
02-07-2015, 18:43
Dev log:

EDIT 2015/07/02 20:37 CET : FIX foldername try this new version!
EDIT 2015/07/02 22:15 CET : FIX foldername in controllers need update
EDIT 2015/07/02 22:15 CET : REMOVE event association on lap save()
EDIT 2015/07/06 16:00 CET : http://forum.projectcarsgame.com/showthread.php?33757-Project-Cars-Dedicated-Server-Live-App&p=1032955&viewfull=1#post1032955
EDIT 2015/07/07 17:30 CET : http://forum.projectcarsgame.com/showthread.php?33757-Project-Cars-Dedicated-Server-Live-App&p=1035554&viewfull=1#post1035554
EDIT 2015/07/07 19:00 CET : http://forum.projectcarsgame.com/showthread.php?33757-Project-Cars-Dedicated-Server-Live-App&p=1035714&viewfull=1#post1035714
EDIT 2015/07/08 11:30 CET : http://forum.projectcarsgame.com/showthread.php?33757-Project-Cars-Dedicated-Server-Live-App&p=1036812&viewfull=1#post1036812
EDIT 2015/07/08 17:50 CET : http://forum.projectcarsgame.com/showthread.php?33757-Project-Cars-Dedicated-Server-Live-App&p=1037381&viewfull=1#post1037381
EDIT 2015/07/08 18:30 CET : http://forum.projectcarsgame.com/showthread.php?33757-Project-Cars-Dedicated-Server-Live-App&p=1037455&viewfull=1#post1037455 Major update add "Automation tools by TylerBre"
EDIT 2015/07/09 11:30 CET : controller refactoring, better template conventions, small css fixes - By TylorBre
EDIT 2015/07/10 01:30 CET : Fix pagination on Driver page / Fix homepage with empty event content / Fix error on hook/index on pushPlayerNewAttributes()
EDIT 2015/07/11 16:30 CET : Fix #16 (https://github.com/JcPires/Project-Cars-DS-LiveApp/issues/16) Tracks/Groups/Cars are updated on listerner started

norbs
03-07-2015, 05:22
I would like to help with testing. Is it only for Linux servers?

Ph0eNiX
03-07-2015, 06:12
No i run it on my windows computer for developpement don't worry. NodeJs are multiplateforme.

norbs
03-07-2015, 06:24
No i run it on my windows computer for developpement don't worry. NodeJs are multiplateforme.

Thanks. Well if I can get it running, I will be happy to help test it.

MrBlacky
03-07-2015, 07:38
Awesome. Thank you!

Stepan Vondrak
03-07-2015, 08:30
Looks ace, link added to the API post.

Maddox
04-07-2015, 12:25
Hello There,
Great work and thank you for sharing your project.
Unfortunately, I have a problem with starting the app.
Get the start the following error message:


info: Starting app...

error: A hook (`orm`) failed to load!
error: Error (E_UNKNOWN) :: Encountered an unexpected error
: Could not connect to MySQL:
Error: getaddrinfo ENOTFOUND
at afterwards (/home/****/steamcmd/pcars_ds/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
at /home/****/steamcmd/pcars_ds/node_modules/sails-mysql/lib/connections/spawn.js:40:7
at Handshake.onConnect (/home/****/steamcmd/pcars_ds/node_modules/sails-mysql/node_modules/mysql/lib/Pool.js:54:9)
at Handshake.Sequence.end (/home/****/steamcmd/pcars_ds/node_modules/sails-mysql/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Protocol.handleNetworkError (/home/****/steamcmd/pcars_ds/node_modules/sails-mysql/node_modules/mysql/lib/protocol/Protocol.js:355:14)
at PoolConnection.Connection._handleNetworkError (/home/****/steamcmd/pcars_ds/node_modules/sails-mysql/node_modules/mysql/lib/Connection.js:367:18)
at Socket.emit (events.js:95:17)
at net.js:834:16
at process._tickDomainCallback (node.js:492:13)


All this runs on a Linux VServer.
Mysql works and specifying Host, User, Password agree 100%

Maybe someone has a tip or idea?

CeYa & Thx
Maddox

Ph0eNiX
04-07-2015, 14:39
Have you try this:

GRANT ALL PRIVILEGES ON YOUR-DATABASE-CREATED.* TO 'YOUR-USER'@'%' IDENTIFIED BY 'YOUR-PASSWORD' WITH GRANT OPTION;

On my virtual machine all mysql request are not passed through localhost, but by "root@locationvps"

Maddox
04-07-2015, 18:18
Have you try this:
GRANT ALL PRIVILEGES ON YOUR-DATABASE-CREATED.* TO 'YOUR-USER'@'%' IDENTIFIED BY 'YOUR-PASSWORD' WITH GRANT OPTION;
DB and User grant all privileges


On my virtual machine all mysql request are not passed through localhost, but by "root@locationvps"
I have tried all possible variants
user@localhost, user@ip, new_user@localhost new_user@ip, root@localhost, root@ip
I have really no idea what I am doing wrong

CeYa
Deadmike

Ph0eNiX
05-07-2015, 02:11
Have you tried looking in the logs of Mysql, if you can find an error created by the sails lift action?

That 's how I realized, all queries passed by root@locationvps

Maddox
05-07-2015, 08:09
Hi,
what do you mean exactly with locationvps?

[QUOTE]Have you tried looking in the logs of Mysql, if you can find an error created by the sails lift action?
I have enable the error.log but no Errors found in the log file ?

What needs to be specified in the connections.js ?
As for me, only the MYSQL database is running I have entered only these credentials
In MongodbServer I have nothing changed but installs the package
In PostgresqlServer I have nothing changed but installs the package


/**
* Connections
* (sails.config.connections)
*
* `Connections` are like "saved settings" for your adapters. What's the difference between
* a connection and an adapter, you might ask? An adapter (e.g. `sails-mysql`) is generic--
* it needs some additional information to work (e.g. your database host, password, user, etc.)
* A `connection` is that additional information.
*
* Each model must have a `connection` property (a string) which is references the name of one
* of these connections. If it doesn't, the default `connection` configured in `config/models.js`
* will be applied. Of course, a connection can (and usually is) shared by multiple models.
* .
* Note: If you're using version control, you should put your passwords/api keys
* in `config/local.js`, environment variables, or use another strategy.
* (this is to prevent you inadvertently sensitive credentials up to your repository.)
*
* For more information on configuration, check out:
* http://sailsjs.org/#!/documentation/reference/sails.config/sails.config.connections.html
*/

module.exports.connections = {

/***************************************************************************
* *
* Local disk storage for DEVELOPMENT ONLY *
* *
* Installed by default. *
* *
***************************************************************************/
localDiskDb: {
adapter: 'sails-disk'
},

/***************************************************************************
* *
* MySQL is the world's most popular relational database. *
* http://en.wikipedia.org/wiki/MySQL *
* *
* Run: npm install sails-mysql *
* *
***************************************************************************/
Mysql: {
adapter: 'sails-mysql',
host: 'localhost',
user: '***mytgcdbuser***',
password: '***mytgcdbuserpassword***'',
database: 'pcars'
},


MysqlServer: {
module : 'sails-mysql',
host : '_HOST_',
port : 3306,
user : '_USERNAME_',
password : '_PASSWORD_',
database : '_DATABASE_NAME_',
// Optional
charset : 'utf8',
collation : 'utf8_swedish_ci'
},

/***************************************************************************
* *
* MongoDB is the leading NoSQL database. *
* http://en.wikipedia.org/wiki/MongoDB *
* *
* Run: npm install sails-mongo *
* *
***************************************************************************/
MongodbServer: {
adapter: 'sails-mongo',
host: 'localhost',
port: 27017,
// user: 'username',
// password: 'password',
// database: 'your_mongo_db_name_here'
},

/***************************************************************************
* *
* PostgreSQL is another officially supported relational database. *
* http://en.wikipedia.org/wiki/PostgreSQL *
* *
* Run: npm install sails-postgresql *
* *
* *
***************************************************************************/
PostgresqlServer: {
adapter: 'sails-postgresql',
host: 'YOUR_POSTGRES_SERVER_HOSTNAME_OR_IP_ADDRESS',
user: 'YOUR_POSTGRES_USER',
password: 'YOUR_POSTGRES_PASSWORD',
database: 'YOUR_POSTGRES_DB'
}


/***************************************************************************
* *
* More adapters: https://github.com/balderdashy/sails *
* *
***************************************************************************/

};


Must the PostgresqlServer be installed in addition to MySQL?

CeYa
Maddox

Ph0eNiX
05-07-2015, 09:40
Okay i know where are the problem. I have to write the doc ... Write your DB info into MysqlServer Object where there are _USERNAME_ / _PASSWORD_ / _DATABASE_NAME not in Mysql object. Or if you want to change the configuration, you have to change the adaptater selected in config/models.js ans config/env/production.js.

I put all adaptater on the dependencies normally "Mongo/postGre" but you have to change the adaptater selected into config/models.js. Or you can select the adaptater used in all model "Car/Track/..." into api/models . You can run the app with Mysql/Postgre/Mongo together. Take a look to the documentation of sailsjs

http://sailsjs.org/documentation/concepts/models-and-orm

Maddox
05-07-2015, 12:50
Hi,
oh man my mistake :(, thank you for your help:)
Now can start the App :)

But if I now in the admin area and click on "update track / Group" comes following error


Server start!
ok
{ [Error: connect ECONNREFUSED]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect' }
debut des resultats

TypeError: Cannot read property 'response' of undefined
at /home/***user/steamcmd/pcars_ds/api/hooks/pcarsServer/index.js:591:46
at /home/***user/steamcmd/pcars_ds/node_modules/sails/node_modules/async/lib/async.js:629:17
at /home/***user/steamcmd/pcars_ds/node_modules/sails/node_modules/async/lib/async.js:154:25
at /home/***user/steamcmd/pcars_ds/node_modules/sails/node_modules/async/lib/async.js:626:21
at /home/***user/steamcmd/pcars_ds/api/hooks/pcarsServer/index.js:584:29
at Object.helpers.parseBody (/home/***user/steamcmd/pcars_ds/node_modules/request-json/main.js:74:12)
at Request._callback (/home/***user/steamcmd/pcars_ds/node_modules/request-json/main.js:119:24)
at self.callback (/home/***user/steamcmd/pcars_ds/node_modules/request-json/node_modules/request/request.js:344:22)
at Request.emit (events.js:95:17)
at Request.onRequestError (/home/***user/steamcmd/pcars_ds/node_modules/request-json/node_modules/request/request.js:961:8)
at ClientRequest.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1548:9)
at Socket.emit (events.js:95:17)
at net.js:441:14
at process._tickDomainCallback (node.js:492:13)

CeYa
Maddox

Ph0eNiX
05-07-2015, 17:41
First you have to update track and groups / after the cars. Don't start the listener at this stage.

So it looks the call to http://127.0.0.1:9000/api/list/vehicle_groups are refused by the server

Your Project cars Dedicated server api are available on the default port "9000" ?

If not, on /api/hook/index.js on the first line you have the client default configuration take a look.

Have you take a look to your database if there are some datas stored "Tracks, groups, or Car"


I will update the package and the readme monday with some bug fix

Maddox
05-07-2015, 18:55
Hi,
yes now it works. Thanks again for the help :)
CeYa
Maddox

Ph0eNiX
06-07-2015, 13:09
EDIT 2015/07/06 16:00 CET :

1. Remove the recording of IA laps and session/driver Association because IA have the same SteamID as the admin of the game.
2. Modify the default adapatater to "MySql" in place of "MySqlServer"
3. DS Url and port move to globals configuration in place on /api/hooks/pcarsServer/index.js
4. Css import improved - Now all css dependencies are registred into importer.less

File Updated:
/config/connection.js ,
/config/models.js
/config/env/production.js
/assets/styles/importer.less
/tasks/pipeline.js
/tasks/config.less.js
/views/layout.ejs
/config/globals.js "MUST BE UPDATED FOR OLD INSTALLATION"
/api/hook/pcarsServer/index.js "MUST BE UPDATED FOR OLD INSTALLATION"

Maddox
07-07-2015, 13:43
Hi,
i have update to the new Version ( 2015/07/06 16:00 CET )

Now I'm no longer in the Admin menu.
When I log in, and then click the link on the Admin I'll then come to the Dashboard.
When I try a new user is to apply after confirming the email and password HTTP Error 400 (The site was not found)

The same thing happens when I create a new database, and there will create a new user (HTTP Error 400)

No Error on Sails/Nodes


CeYa
Maddox

PS:Sorry for my bad english i am use Google Translator

Scav3nger
07-07-2015, 14:54
Oh how I wish we could get something like this for consoles. Why must they be such a closed platform!

This looks absolutely fantastic so far, can't wait to see what more you add to it in the future.

Ph0eNiX
07-07-2015, 15:25
Oh how I wish we could get something like this for consoles. Why must they be such a closed platform!

This looks absolutely fantastic so far, can't wait to see what more you add to it in the future.

The app running on a dedicated server where is located the Project Cars dedicated server application, but there are not the possibility for console's user to have Dedicated server. So if one day you can have Dedicated server with console "PS4/Xone/..." it will possible to running it also. Sorry :(

Ph0eNiX
07-07-2015, 15:26
Hi,
i have update to the new Version ( 2015/07/06 16:00 CET )

Now I'm no longer in the Admin menu.
When I log in, and then click the link on the Admin I'll then come to the Dashboard.
When I try a new user is to apply after confirming the email and password HTTP Error 400 (The site was not found)

The same thing happens when I create a new database, and there will create a new user (HTTP Error 400)

No Error on Sails/Nodes


CeYa
Maddox

PS:Sorry for my bad english i am use Google Translator

I will send you a private message

Ph0eNiX
07-07-2015, 15:41
EDIT 2015/07/07 17:30 CET :

1. Adding pagination

File Updated:

/views/Elements/pagination.ejs "Added"

/views/Driver/index.ejs
/views/Results/index.ejs

/views/Admin/Laps/index.ejs "Added"
/views/Admin/Session/index.ejs
/views/Admin/Event/index.ejs/
/views/Admin/Cars/index.ejs
/views/Admin/Tracks/index.ejs
/views/Admin/Drivers/index.ejs

/controller/LapController.js "Added"
/controller/DriverController.js
/controller/LivetimingController.js
/controller/DriverController.js
/controller/SessionsController.js
/controller/TrackController.js
/controller/CarController.js
/controller/EventController.js

/assets/js/laps.js "Added"
/assets/styles/dependencies/bootswatch/variable.less "Line 455-456"

/config/routes.js

Sascha Brandenburg
07-07-2015, 15:47
I Got a Problem. When i entering the 213.155.231.96 IP inside the config file and try to start the server inside pcars , the game tells me that there is no suitable server . When i enter the 127.0.0.1 IP he can find the Server .

So which IP is the right one and how i can reach the server via pCARS when i need to use the 213.155.231.96 IP ? Or does the App works with the 127.0.0.1 IP ?

Ph0eNiX
07-07-2015, 16:00
I Got a Problem. When i entering the 213.155.231.96 IP inside the config file and try to start the server inside pcars , the game tells me that there is no suitable server . When i enter the 127.0.0.1 IP he can find the Server .

So which IP is the right one and how i can reach the server via pCARS when i need to use the 213.155.231.96 IP ? Or does the App works with the 127.0.0.1 IP ?

The application working with the Local IP, be sure the port used on the "Pcars DS api" by default 9000 is callable locally and if you have enabled the "Pcars DS Httpapi" also

The /config/globals.js file have the same configuration like on the "Pcars DS Httpapi" the server.cfg file



//MyApp/config/personnalConfig.js

DsApiUrl : {
protocol: 'http://',
host: '127.0.0.1',
port: '9000'
}





//DsApi/server.cfg

enableHttpApi : true
httpApiLogLevel : "warning"
httpApiInterface : "127.0.0.1"
httpApiPort : 9000



Please let me know if you can solved the issue

Ph0eNiX
07-07-2015, 17:08
EDIT 2015/07/07 19:00 CET :

1. adding new configuration file "personnalConfig"

File Updated:

/config/personnalConfig.js "Added"
/config/globals.js "Remove old entries"


/views/Elements/menu.ejs
/views/layout.ejs

/api/hooks/pcarsServer/index.js
/api/controller/LapController.js "Added"
/api/controller/DriverController.js
/api/controller/LivetimingController.js
/api/controller/DriverController.js
/api/controller/SessionsController.js
/api/controller/TrackController.js
/api/controller/CarController.js
/api/controller/EventController.js

Sascha Brandenburg
07-07-2015, 17:38
Now i see the problem. Our problem ist that we have you Tool on a Webserver to distribute the Stats via our website. The Dedicated Server runs on a different Server. So we got the Problem that we need to give the pcars dedi config the 213.155.231.96 IP to send the datas to the webserver. But pcars wont find a suitable Server with these IP because this isn't the local 127.0.0.1 IP.

I dont thimk that u have a solution for this kind of improvements/features on you todo list or ?

So at the moment the only way to bring you tool alive is to have the dedicated Server and you tool on the same Server ?

Thanks for you help so far

Ph0eNiX
07-07-2015, 18:05
The things you have to do, is to unlock the httpApi port on the server there are installed the Pcars server, and on mine app on the new package into /config/personnalConfig.js, write your server Ip and port. Normally it will works

Try to unlock http Api port on the pcars server side, and try to call it http://your.pcarsserver.ip:9000 if you can have the native live tab, my app will work also

But is not very safe for the security, because if someone know your pcars server ip, he can kick/ban anyone he want, or soon modify track/car/...

Sascha Brandenburg
07-07-2015, 18:23
Ok thank you very much Ph0enix !!!

I think me and my mate have to test it and i will give u a feedback if its works or not :)

norbs
08-07-2015, 01:52
I would love to get this working, but sadly it is beyond my feeble brain.

Ph0eNiX
08-07-2015, 09:36
EDIT 2015/07/07 11:30 CET :

1. Fix Driver/Session association and AI Name on Live page

File Updated:

/assets/js/app.js
/api/hook/pcarsServer/index.js

IMPORTANT FIX CLOSE THE APP AND PLEASE COPY AND PASTE THOSE TWO FILES ON YOUR OLD PROJECT, OR REBUILD NEW ONE AND LIFT THE APP AGAIN

Maddox
08-07-2015, 13:41
Hi,
I've noticed an error.
In the list of "Driver" only the first page is displayed. If you want to display the second or third page is Error 404 :(

CeYa
Maddox

Ph0eNiX
08-07-2015, 15:51
EDIT 2015/07/07 17:50 CET :

1. Fix Driver frontend pagination error

File Updated:

/api/controller/DriverController.js

Ph0eNiX
08-07-2015, 16:28
EDIT 2015/07/07 18:20 CET :

Okay , so ...

The project just got a major update, with the addition of a new feature by TylerBre on Github .

The application now controls the dedicated server project cars. When launching the application, the game server will be updated as needed, and all dependencies also. Now when you will lift the app, the game server, will start or restart to ensure it is ready for use by the application.

I would leave TylerBre explain in more detail this new addition .

Before you update your project , make sure its stability and some of our test, after the comment TylerBre . I would say when you can update your project.


Another big thank you to TylerBre that I think the project will take on new dimensions.

Stay tuned !

Sascha Brandenburg
08-07-2015, 16:41
Hi Ph0oenix its me again :D

So we tested your App today and it works with Live Timing. The App is on the Webserver and the Dedi on another Server. www.racersleague.com:777

But we got 2 Problems at the moment. The first problem is or question ist how to bind the App to the 127.0.0.1 IP ? My mate want set the Web Frontend to WAF / ReverseProxy (He told me that but i'am dont understand what he mans cause im an Coding Noob :D, he means you will now what he wants to do XD )

The other problem ist that we have Live Timings but we cannot create an Event and he didnt save the Time to look after the race into the statistics.

Does the App needs a whole complete Session ? Training, Quali and Race or does the App works when only for example a Quali was driven and after the Quali we bring the Dedi in Sleep Mode ?

I hope i dont annoying you :D

Greets from Sascha B. :)

Ph0eNiX
08-07-2015, 16:52
Hi Ph0oenix its me again :D

So we tested your App today and it works with Live Timing. The App is on the Webserver and the Dedi on another Server. www.racersleague.com:777

But we got 2 Problems at the moment. The first problem is or question ist how to bind the App to the 127.0.0.1 IP ? My mate want set the Web Frontend to WAF / ReverseProxy (He told me that but i'am dont understand what he mans cause im an Coding Noob :D, he means you will now what he wants to do XD )



I don't know how too, i will try to found a response, sorry.



The other problem ist that we have Live Timings but we cannot create an Event and he didnt save the Time to look after the race into the statistics.

Does the App needs a whole complete Session ? Training, Quali and Race or does the App works when only for example a Quali was driven and after the Quali we bring the Dedi in Sleep Mode ?

I hope i dont annoying you :D

Greets from Sascha B. :)

Don't lift the server on production mode at this stage off the app, try to "sails lift" only, because the minification breaks some script yet.

For lap saving i solved the problem on the "EDIT 2015/07/07 11:30 CET : " now it works.

There was an error in the file:
/api/hooks/pcarsServer/index.js
On line 342 and 387 where I write:



if ( player.participant.IsPlayer === 1) {


instead of



if ( player.participant.attributes.IsPlayer === 1) {

tylervanbach
08-07-2015, 17:24
But we got 2 Problems at the moment. The first problem is or question ist how to bind the App to the 127.0.0.1 IP ? My mate want set the Web Frontend to WAF / ReverseProxy (He told me that but i'am dont understand what he mans cause im an Coding Noob :D, he means you will now what he wants to do XD )


Hi, I helped dev on this a bit. You do not need a reverse proxy to run the app.

The best way is to use PM2 (https://github.com/Unitech/pm2). But even with PM2, you need to allow a non root user to have access to port 80, this is one way to do it:

https://github.com/Unitech/PM2/blob/master/ADVANCED_README.md#allow-pm2-to-bind-applications-on-ports-80443-without-root

Another would be iptables.

Alternatively, you could run the app as root, and in dev mode by passing the --port flag, 'sails lift --port 80'

If it's of interest, I can set up a pm2.json file that would automate server start

Sascha Brandenburg
08-07-2015, 17:28
Thank you for your quick replies . I think we have to test tomorrow some of your suggestions and i will report if it works or not :)

Tank You !

tylervanbach
08-07-2015, 17:31
I created an issue here: https://github.com/JcPires/Project-Cars-DS-LiveApp/issues/6

kjay
09-07-2015, 11:52
I want to assist in the testing.
What applications do I need to install first?

I know I need to install sails and node.js but what else?
Is this the list?

Language / Library / framework used:



- Node JS
- Sails Js
- Grunt
- Less
- Mustache
- Ejs
- Jquery
- Bootstrap 3
- Velocity Js
- Bcrypt
- Fs-extra
- Async
- OwlCarousel
- Trumbowyg
- DatePicker
- Weather icon
- Font-awesome



I saw a reference to sails-mysql in connection.js. Do I need to install that or is plain old mysql good enough?

Ph0eNiX
09-07-2015, 11:59
sails-mysql is an adapater and is installed by dependencies.

You just need a database "Mysql" for exemple and by default, NodeJs and Sails.

surtic86
09-07-2015, 14:08
Hello PhOeNiX,

Thanks for Publishing your App and make it OpenSource :) when i have time i will do some Pull Request. Eventually you can make Issues on Github for any Feature you want in the App so the Devs can join on it to help you.

Is there any plan for Supporting more then one Dedicated Server? I seen on some Communities who used more then one Dedicated Server and for them should be good to only have one Live Timing App.


Also it would be better when you put all Config stuff who the User need to change into the config/env/*.js so they need only one File to change.

Ph0eNiX
09-07-2015, 16:12
Regarding the possibility of launching several listener on multiple server , it will be for the latest addition , for now we are focusing on stabilizing the app and fix big problems .

I'll take care of open issues on github for all features's addition.

As for the configuration like has Proposed TaylerBre I think it ' d be wise to go through https://www.npmjs.com/package/grunt-prompt

Ph0eNiX
09-07-2015, 16:13
EDIT 2015/07/09 18:13 CET : Fix events errors, and comment the grunt steam task at this stage.

You can use TaylerBre addition by uncomment it on /tasks/register/default or use the app like before.

Maddox
09-07-2015, 18:46
Hi,
update to EDIT 2015/07/09 18:13 CET

Only now when I logged in and click on the Admin link, the overview is but the Admin menu is missing. Like on the picture

211300

CeYa
Maddox

Ph0eNiX
09-07-2015, 19:06
It is not below the menu bar?. Because with your name too large , and the size of the window, the menu bar are 2x larger than the original .

Maddox
09-07-2015, 19:33
OK Name was too large, but Page 2 from the Drivers not worked

CeYa
Maddox

Sascha Brandenburg
09-07-2015, 20:53
So today we tested to integrate an Event and it works as u can see here www.racersleague.com:777/event

But the Problem is that the Home Site dont work anymore after integrate an Event , the Log gives following failure Message


TypeError: /opt/pcars-ds-app.new/views/Pages/homepage.ejs:32
30| </div>
31| <p>
>> 32| <%- events[i].content.slice(0, 250) %><% if(events[i].content.length > 250){%>...<%}%>
33| </p>
34| </div>
35| <div class="panel-footer">

Cannot read property 'slice' of null
at eval (<anonymous>:30:1675)
at eval (<anonymous>:30:3776)
at /opt/pcars-ds-app.new/node_modules/ejs/lib/ejs.js:250:15
at Object.exports.render (/opt/pcars-ds-app.new/node_modules/ejs/lib/ejs.js:288:13)
at Object.exports.renderFile (/opt/pcars-ds-app.new/node_modules/ejs/lib/ejs.js:318:20)
at [object Object].module.exports [as engine] (/opt/pcars-ds-app.new/node_modules/sails/node_modules/ejs-locals/index.js:85:7)
at [object Object].View.render (/opt/pcars-ds-app.new/node_modules/sails/node_modules/express/lib/view.js:76:8)
at Function.app.render (/opt/pcars-ds-app.new/node_modules/sails/node_modules/express/lib/application.js:523:10)
at ServerResponse.res.render (/opt/pcars-ds-app.new/node_modules/sails/node_modules/express/lib/response.js:827:7)
at ServerResponse.res.view (/opt/pcars-ds-app.new/node_modules/sails/lib/hooks/views/res.view.js:237:16)
at /opt/pcars-ds-app.new/api/controllers/PagesController.js:31:28
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:409:17
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:251:17
at async.each (/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:118:20)
at _asyncMap (/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:245:13)
at Object.map (/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:216:23)
at Object.async.sortBy (/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:391:15)
at /opt/pcars-ds-app.new/api/controllers/PagesController.js:25:19
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:629:17
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:154:25
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:626:21
at /opt/pcars-ds-app.new/api/controllers/PagesController.js:21:21
at bound (/opt/pcars-ds-app.new/node_modules/sails/node_modules/lodash/dist/lodash.js:957:21)
at applyInOriginalCtx (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:416:80)
at wrappedCallback (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:315:18)
at callback.success (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
at _switch (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/factory.js:48:28)
at returnResults (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:356:9)
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:256:16
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:77:45
at bound (/opt/pcars-ds-app.new/node_modules/sails/node_modules/lodash/dist/lodash.js:957:21)
at applyInOriginalCtx (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:416:80)
at wrappedCallback (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:315:18)
at callback.success (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
at _switch (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/factory.js:48:28)
at /opt/pcars-ds-app.new/node_modules/sails-mysql/lib/connections/spawn.js:114:16
at Object.module.exports.poolfully [as releaseConnection] (/opt/pcars-ds-app.new/node_modules/sails-mysql/lib/connections/release.js:28:12)
at /opt/pcars-ds-app.new/node_modules/sails-mysql/lib/connections/spawn.js:99:35
at Cursor.attachRecords (/opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/waterline-cursor/cursor/cursor.js:117:10)
at afterPopulateBuffers (/opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/waterline-cursor/cursor/cursor.js:55:10)
at /opt/pcars-ds-app.new/node_modules/sails-mysql/lib/adapter.js:785:15
at /opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/async/lib/async.js:451:17
at /opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/async/lib/async.js:441:17
at _each (/opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/async/lib/async.js:46:13)
at Immediate.taskComplete (/opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/async/lib/async.js:440:13)
at processImmediate [as _immediateCallback] (timers.js:358:17)
{ [TypeError: /opt/pcars-ds-app.new/views/Pages/homepage.ejs:32
30| </div>
31| <p>
>> 32| <%- events[i].content.slice(0, 250) %><% if(events[i].content.length > 250){%>...<%}%>
33| </p>
34| </div>
35| <div class="panel-footer">

Cannot read property 'slice' of null] path: '/opt/pcars-ds-app.new/views/Pages/homepage.ejs' }


Maybe its a known bug maybe not but has someone an advice how to solve that problem ?

Ph0eNiX
09-07-2015, 23:18
So today we tested to integrate an Event and it works as u can see here www.racersleague.com:777/event

But the Problem is that the Home Site dont work anymore after integrate an Event , the Log gives following failure Message


TypeError: /opt/pcars-ds-app.new/views/Pages/homepage.ejs:32
30| </div>
31| <p>
>> 32| <%- events[i].content.slice(0, 250) %><% if(events[i].content.length > 250){%>...<%}%>
33| </p>
34| </div>
35| <div class="panel-footer">

Cannot read property 'slice' of null
at eval (<anonymous>:30:1675)
at eval (<anonymous>:30:3776)
at /opt/pcars-ds-app.new/node_modules/ejs/lib/ejs.js:250:15
at Object.exports.render (/opt/pcars-ds-app.new/node_modules/ejs/lib/ejs.js:288:13)
at Object.exports.renderFile (/opt/pcars-ds-app.new/node_modules/ejs/lib/ejs.js:318:20)
at [object Object].module.exports [as engine] (/opt/pcars-ds-app.new/node_modules/sails/node_modules/ejs-locals/index.js:85:7)
at [object Object].View.render (/opt/pcars-ds-app.new/node_modules/sails/node_modules/express/lib/view.js:76:8)
at Function.app.render (/opt/pcars-ds-app.new/node_modules/sails/node_modules/express/lib/application.js:523:10)
at ServerResponse.res.render (/opt/pcars-ds-app.new/node_modules/sails/node_modules/express/lib/response.js:827:7)
at ServerResponse.res.view (/opt/pcars-ds-app.new/node_modules/sails/lib/hooks/views/res.view.js:237:16)
at /opt/pcars-ds-app.new/api/controllers/PagesController.js:31:28
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:409:17
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:251:17
at async.each (/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:118:20)
at _asyncMap (/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:245:13)
at Object.map (/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:216:23)
at Object.async.sortBy (/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:391:15)
at /opt/pcars-ds-app.new/api/controllers/PagesController.js:25:19
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:629:17
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:154:25
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:626:21
at /opt/pcars-ds-app.new/api/controllers/PagesController.js:21:21
at bound (/opt/pcars-ds-app.new/node_modules/sails/node_modules/lodash/dist/lodash.js:957:21)
at applyInOriginalCtx (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:416:80)
at wrappedCallback (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:315:18)
at callback.success (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
at _switch (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/factory.js:48:28)
at returnResults (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:356:9)
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:256:16
at /opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:77:45
at bound (/opt/pcars-ds-app.new/node_modules/sails/node_modules/lodash/dist/lodash.js:957:21)
at applyInOriginalCtx (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:416:80)
at wrappedCallback (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:315:18)
at callback.success (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
at _switch (/opt/pcars-ds-app.new/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/factory.js:48:28)
at /opt/pcars-ds-app.new/node_modules/sails-mysql/lib/connections/spawn.js:114:16
at Object.module.exports.poolfully [as releaseConnection] (/opt/pcars-ds-app.new/node_modules/sails-mysql/lib/connections/release.js:28:12)
at /opt/pcars-ds-app.new/node_modules/sails-mysql/lib/connections/spawn.js:99:35
at Cursor.attachRecords (/opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/waterline-cursor/cursor/cursor.js:117:10)
at afterPopulateBuffers (/opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/waterline-cursor/cursor/cursor.js:55:10)
at /opt/pcars-ds-app.new/node_modules/sails-mysql/lib/adapter.js:785:15
at /opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/async/lib/async.js:451:17
at /opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/async/lib/async.js:441:17
at _each (/opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/async/lib/async.js:46:13)
at Immediate.taskComplete (/opt/pcars-ds-app.new/node_modules/sails-mysql/node_modules/async/lib/async.js:440:13)
at processImmediate [as _immediateCallback] (timers.js:358:17)
{ [TypeError: /opt/pcars-ds-app.new/views/Pages/homepage.ejs:32
30| </div>
31| <p>
>> 32| <%- events[i].content.slice(0, 250) %><% if(events[i].content.length > 250){%>...<%}%>
33| </p>
34| </div>
35| <div class="panel-footer">

Cannot read property 'slice' of null] path: '/opt/pcars-ds-app.new/views/Pages/homepage.ejs' }


Maybe its a known bug maybe not but has someone an advice how to solve that problem ?

My bad, is because you have to edit it and write a content. I will fix it soon

thuro76
09-07-2015, 23:23
Ph0eNiX but when it comes out the new GUI of the dedicated server, you will need to make changes?

ps. if you do not ask too much you can get a hand practice to install your app ???

Ph0eNiX
09-07-2015, 23:44
EDIT 2015/07/09 18:13 CET Fix pagination on Driver page / Fix homepage with empty event content / Fix error on hook/index on pushPlayerNewAttributes()


Ph0eNiX but when it comes out the new GUI of the dedicated server, you will need to make changes?

ps. if you do not ask too much you can get a hand practice to install your app ???

I normally only dev the new features.

I don't know why you mean by "you can get a hand practice to install your app " sorry

Ph0eNiX
10-07-2015, 10:41
So today we tested to integrate an Event and it works as u can see here www.racersleague.com:777/event

I just saw your app crash on your server , can you please give me the error . The listener have a big problem , I 'll handle this this afternoon .

Sascha Brandenburg
10-07-2015, 11:17
Ph0enix you are awesome :D I talked with our Conding Men and he sad the he has a new Crash Log which i has to give u and at these moment i saw that u wrote your message :D


...
/opt/pcars-ds-app.new/api/hooks/pcarsServer/index.js:386
if (typeof player != "undefined" || player.length >
^
TypeError: Cannot read property 'length' of undefined
/opt/pcars-ds-app.new/api/hooks/pcarsServer/index.js:386:99
/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:122:13
_each (/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:46:13)
Object.async.each (/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:121:9)
/opt/pcars-ds-app.new/api/hooks/pcarsServer/index.js:243:51
/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:629:17
/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:154:25
/opt/pcars-ds-app.new/node_modules/sails/node_modules/async/lib/async.js:626:21
/opt/pcars-ds-app.new/api/hooks/pcarsServer/index.js:105:41
Object.helpers.parseBody (/opt/pcars-ds-app.new/node_modules/request-json/main.js:74:12)
Request._callback (/opt/pcars-ds-app.new/node_modules/request-json/main.js:119:24)
Request.self.callback (/opt/pcars-ds-app.new/node_modules/request-json/node_modules/request/request.js:344:22)
Request.emit (events.js:110:17)
Request.<anonymous> (/opt/pcars-ds-app.new/node_modules/request-json/node_modules/request/request.js:1239:14)
Request.emit (events.js:129:20)
IncomingMessage.<anonymous> (/opt/pcars-ds-app.new/node_modules/request-json/node_modules/request/request.js:1187:12)
IncomingMessage.emit (events.js:129:20)
_stream_readable.js:908:16
at process._tickDomainCallback (node.js:381:11)
...

Maybe it helps to find the failure better. I saw the the Live Event Frame doenst shows something and 5 minutes later the App crashed. At these moment i was in Sector 3 of Spa Francorchamps and saw that he didnt shown the Sector 3 and my best lap which i has driven.

Thanks for you fix support. At the next 2 weeks we will be unable to Update the App because our Coding Men goes to holidays. But we will test the version which is at the moment on our server to find more bugs .

One Bug we have found is that when u make an event for example our event the E30 @ Zolder with the Date 12.07.2015 to 12.07.2015 at the Event page u see that the tool writes 11.07.2015 but when u go on the stats page and scroll down to Event Stats the date is 12.07.2015 .

Ph0eNiX
10-07-2015, 11:42
This is a problem that I do not meet since the last fix , if you can try the latest version , it seem to me more stable .

I'll look for the date.

Ph0eNiX
10-07-2015, 11:49
Okay date fixed, update your project to the latest version

New dependencies with the new package, don't forget to "npm update"

kjay
10-07-2015, 16:41
.........

kjay
10-07-2015, 16:45
group is not defined
at eval (<anonymous>:37:23)
at eval (<anonymous>:47:10404)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/ejs/lib/ejs.js:250:15
at Object.exports.render (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/ejs/lib/ejs.js:288:13)
at Object.exports.renderFile (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/ejs/lib/ejs.js:318:20)
at [object Object].module.exports [as engine] (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/ejs-locals/index.js:85:7)
at [object Object].View.render (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/express/lib/view.js:76:8)
at Function.app.render (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/express/lib/application.js:523:10)
at ServerResponse.res.render (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/express/lib/response.js:827:7)
at ServerResponse._addResViewMethod.res.view (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/lib/hooks/views/res.view.js:237:16)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/api/controllers/LivetimingController.js:234:24
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/async/lib/async.js:629:17
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/async/lib/async.js:154:25
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/async/lib/async.js:626:21
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/api/controllers/LivetimingController.js:230:21
at bound (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/lodash/dist/lodash.js:957:21)
at applyInOriginalCtx (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:416:80)
at wrappedCallback (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:315:18)
at _normalizeCallback.callback.success (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
at _switch (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/factory.js:48:28)
at returnResults (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:356:9)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:256:16
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:77:45
at bound (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/lodash/dist/lodash.js:957:21)
at applyInOriginalCtx (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:416:80)
at wrappedCallback (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:315:18)
at _normalizeCallback.callback.success (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
at _switch (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/factory.js:48:28)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/lib/connections/spawn.js:114:16
at Object.module.exports.poolfully [as releaseConnection] (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/lib/connections/release.js:28:12)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/lib/connections/spawn.js:99:35
at Cursor.attachRecords (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/waterline-cursor/cursor/cursor.js:78:12)
at afterPopulateBuffers (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/waterline-cursor/cursor/cursor.js:55:10)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/lib/adapter.js:785:15
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/async/lib/async.js:451:17
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/async/lib/async.js:441:17
at _each (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/async/lib/async.js:46:13)
at Object.taskComplete (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/async/lib/async.js:440:13)
at processImmediate [as _immediateCallback] (timers.js:354:15)
{ [ReferenceError: /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/views/Livetiming/stats.ejs:37
35| <td><%- sessions.length %></td>
36| <td><%- events.length %></td>
>> 37| <td><%
38| var GroupPlayed = 0;
39| for(var i in groups) {
40| if (groups[i].laps.length > GroupPlayed) {


group is not defined]


I get these errors when clicking on the Stats menu.

Ph0eNiX
10-07-2015, 16:59
group is not defined
at eval (<anonymous>:37:23)
at eval (<anonymous>:47:10404)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/ejs/lib/ejs.js:250:15
at Object.exports.render (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/ejs/lib/ejs.js:288:13)
at Object.exports.renderFile (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/ejs/lib/ejs.js:318:20)
at [object Object].module.exports [as engine] (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/ejs-locals/index.js:85:7)
at [object Object].View.render (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/express/lib/view.js:76:8)
at Function.app.render (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/express/lib/application.js:523:10)
at ServerResponse.res.render (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/express/lib/response.js:827:7)
at ServerResponse._addResViewMethod.res.view (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/lib/hooks/views/res.view.js:237:16)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/api/controllers/LivetimingController.js:234:24
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/async/lib/async.js:629:17
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/async/lib/async.js:154:25
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/async/lib/async.js:626:21
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/api/controllers/LivetimingController.js:230:21
at bound (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/lodash/dist/lodash.js:957:21)
at applyInOriginalCtx (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:416:80)
at wrappedCallback (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:315:18)
at _normalizeCallback.callback.success (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
at _switch (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/factory.js:48:28)
at returnResults (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:356:9)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:256:16
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:77:45
at bound (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/lodash/dist/lodash.js:957:21)
at applyInOriginalCtx (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:416:80)
at wrappedCallback (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:315:18)
at _normalizeCallback.callback.success (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
at _switch (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/factory.js:48:28)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/lib/connections/spawn.js:114:16
at Object.module.exports.poolfully [as releaseConnection] (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/lib/connections/release.js:28:12)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/lib/connections/spawn.js:99:35
at Cursor.attachRecords (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/waterline-cursor/cursor/cursor.js:78:12)
at afterPopulateBuffers (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/waterline-cursor/cursor/cursor.js:55:10)
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/lib/adapter.js:785:15
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/async/lib/async.js:451:17
at /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/async/lib/async.js:441:17
at _each (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/async/lib/async.js:46:13)
at Object.taskComplete (/home/kevin/liveapp/Project-Cars-DS-LiveApp-master/node_modules/sails-mysql/node_modules/async/lib/async.js:440:13)
at processImmediate [as _immediateCallback] (timers.js:354:15)
{ [ReferenceError: /home/kevin/liveapp/Project-Cars-DS-LiveApp-master/views/Livetiming/stats.ejs:37
35| <td><%- sessions.length %></td>
36| <td><%- events.length %></td>
>> 37| <td><%
38| var GroupPlayed = 0;
39| for(var i in groups) {
40| if (groups[i].laps.length > GroupPlayed) {


group is not defined]


I get these errors when clicking on the Stats menu.

Have you alrezdy done some laps before, have you updated tracks / groups and cars ?

kjay
10-07-2015, 23:14
I've done some laps but no data is saved to the database.

How do I update the tracks. groups and cars?

kjay
10-07-2015, 23:36
I've done some laps but no data is saved to the database.

How do I update the tracks. groups and cars?

Nevermind...Updating now.

tylervanbach
10-07-2015, 23:54
I'm making this an issue,

https://github.com/JcPires/Project-Cars-DS-LiveApp/issues/16

you shouldn't have to manually update this - it can update automatically on server connect.

Sascha Brandenburg
11-07-2015, 01:07
So we updated the tool 4 hours ago and now it works really good !!!

One bug we found . Inside the Live Events and inside the Server Standings u have the Player name. Problem is that the tool doent shows the name of the last person who joins the session. As Example Player 1 brings the Server alive and join it. After 1 minute Player2 joins the session but inside the Live Standins end Server Standings the name field is blank . When Player3 joins the session the Name Field of Player2 shows the name but of Player3 it is blank.

I will report u the next days if something crashes or didnt work.

If u want some suggestions of our league members to improve the functions , for example at live standings a task where u can see the track temperatures i can make u a small list. But i dont know how much u already have on your ToDo list and which functions are possible :)

So far thank u very much for these excellent tool and you excellent support !

Ph0eNiX
11-07-2015, 01:28
So we updated the tool 4 hours ago and now it works really good !!!
One bug we found . Inside the Live Events and inside the Server Standings u have the Player name. Problem is that the tool doent shows the name of the last person who joins the session. As Example Player 1 brings the Server alive and join it. After 1 minute Player2 joins the session but inside the Live Standins end Server Standings the name field is blank . When Player3 joins the session the Name Field of Player2 shows the name but of Player3 it is blank


Yes I saw , the error comes from the call to PCARS dedicated server . The participant name is empty . I will report that.



I will report u the next days if something crashes or didnt work.

There was an error when the drivers who do laps before leave and return in the session.



If u want some suggestions of our league members to improve the functions , for example at live standings a task where u can see the track temperatures i can make u a small list. But i dont know how much u already have on your ToDo list and which functions are possible :)


On a future update of the pcars dedicated server, like i ask earlier , there will be the track temp, and some other info. But do a list of your request ;)

You can follow some future additions here : https://github.com/JcPires/Project-Cars-DS-LiveApp/issues

Sascha Brandenburg
11-07-2015, 10:36
Quick found Bug : When u logged in as admin and change a driver specific thumb i got an error message


{
"path": "/opt/pcars-ds-app/views/Admin/Driver/index.ejs"
}

But the thumb applying works . He only gives out this error message and after that i go on drivers and he shows the Thumb :)

tylervanbach
11-07-2015, 18:44
Quick found Bug : When u logged in as admin and change a driver specific thumb i got an error message


{
"path": "/opt/pcars-ds-app/views/Admin/Driver/index.ejs"
}



Fixed: https://github.com/TylerBre/Project-Cars-DS-LiveApp/commit/5e296c67116fcc015255a6b1f6057c382bdb0247

I assume this will get added in soon

surtic86
17-07-2015, 19:02
Push :) i had some Question postet in the Issues on Github would be nice when you answer this. And should i make the merge for you from my open Pull Request that you can easy merge it into your Repo?

Hondo
20-07-2015, 00:52
Hi There, I would like to test this app. I run a dedicated server for couple of leagues and lookign for an app that will record all data as well as useful real-time data for admins during a race.

Can this tool keep track of pit stop during a race....?

Sidonicus
20-07-2015, 10:30
No i run it on my windows computer for developpement don't worry. NodeJs are multiplateforme.

What chance of getting this to work off an AWS Windows Server 2012 env? Without using Vagrant & VM?

surtic86
20-07-2015, 10:55
...

Why should it not work? Have you testet it? Install NodeJS (https://nodejs.org/download/) and go on you don't need a Vargant VM.

Sidonicus
20-07-2015, 22:59
Why should it not work? Have you testet it? Install NodeJS (https://nodejs.org/download/) and go on you don't need a Vargant VM.

Will give it bash later, was basing the need for Vagrant/VM on whats written on the github "This app requires a 64 bit linux environment to run. If you're on OS X or Windows, I've included a vagrant file to easily spool up a 64bit Ubuntu vm"

surtic86
21-07-2015, 06:37
Ah yes sorry about that.... then it will not work only in Windows. They had included directly a Script for Downloading the pCars Server and run it on its own. I think that is not the right solution but its not my Project.

For me it should to only the Web stuff and shouldn't be the App who do all also the Server Managing. Sure access over the API to the Server but every should set up his pCars Server on its own.

Right now there is no Config Option to don't load the Server and Start it... we should Implement it.

What does @Ph0eNiX and @tylervanbach mean to this?

Hondo
21-07-2015, 21:50
Guys,

Im trying to figure if I can get this to run on a dedicated Windows Server 2008 servers? Thus far been unable to get it to work. Is there a guide I can follow?

surtic86
02-08-2015, 07:17
You can install it with Vargant (VirtualBox Wrapper) you can follow the Readme on Github.

But right now i would say wait with Installation :)

kjay
06-08-2015, 14:51
I just updated the application and noticed the following errors when lifting the application:

error: Ignored attempt to bind route (/upd) to unknown controller.action :: server.updatetracksandcar
error: Ignored attempt to bind route (/updCars) to unknown controller.action :: server.updatecars

It seems that the application is trying to update the cars and track automatically but is unable. Is there something that I am missing.
I am able to update the cars and track manually.

kjay
06-08-2015, 20:09
The following error occurs shortly after starting the server.


/home/kevin/Project-Cars-DS-LiveApp/api/controllers/DriverController.js:103
Lap.find({owner: record.id}).sort('createdAt DESC').limit(50).popula
^
TypeError: Cannot read property 'id' of undefined
at Object.async.series.laps (/home/kevin/Project-Cars-DS-LiveApp/api/controllers/DriverController.js:103:34)
at /home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/async/lib/async.js:620:25
at iterate (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/async/lib/async.js:146:13)
at Object.async.eachSeries (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/async/lib/async.js:162:9)
at Object.async.series (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/async/lib/async.js:619:19)
at /home/kevin/Project-Cars-DS-LiveApp/api/controllers/DriverController.js:101:13
at applyInOriginalCtx (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:421:80)
at wrappedCallback (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:320:18)
at callback.success (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
at _switch (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/factory.js:48:28)
at returnResults (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:180:9)
at /home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:91:16
at /home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:77:45
at wrapper (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/node_modules/lodash/index.js:3602:19)
at applyInOriginalCtx (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:421:80)
at wrappedCallback (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:320:18)
at callback.success (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
at _switch (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/factory.js:48:28)
at /home/kevin/Project-Cars-DS-LiveApp/node_modules/sails-mysql/lib/connections/spawn.js:114:16
at Object.module.exports.poolfully [as releaseConnection] (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails-mysql/lib/connections/release.js:28:12)
at /home/kevin/Project-Cars-DS-LiveApp/node_modules/sails-mysql/lib/connections/spawn.js:99:35
at Cursor.attachRecords (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails-mysql/node_modules/waterline-cursor/cursor/cursor.js:78:12)
at afterPopulateBuffers (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails-mysql/node_modules/waterline-cursor/cursor/cursor.js:55:10)
at /home/kevin/Project-Cars-DS-LiveApp/node_modules/sails-mysql/lib/adapter.js:785:15
at /home/kevin/Project-Cars-DS-LiveApp/node_modules/sails-mysql/node_modules/async/lib/async.js:451:17
at /home/kevin/Project-Cars-DS-LiveApp/node_modules/sails-mysql/node_modules/async/lib/async.js:441:17
at _each (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails-mysql/node_modules/async/lib/async.js:46:13)
at Immediate.taskComplete (/home/kevin/Project-Cars-DS-LiveApp/node_modules/sails-mysql/node_modules/async/lib/async.js:440:13)
at processImmediate [as _immediateCallback] (timers.js:367:17)

LordKnut
14-08-2015, 15:16
After the patch 3.0 update for the server I get this error:


TypeError: Cannot read property 'list' of undefined
at /home/steam/pCarsDSlive/api/hooks/pcarsServer/index.js:607:47
at /home/steam/pCarsDSlive/node_modules/sails/node_modules/async/lib/async.js:629:17
at /home/steam/pCarsDSlive/node_modules/sails/node_modules/async/lib/async.js:154:25
at /home/steam/pCarsDSlive/node_modules/sails/node_modules/async/lib/async.js:626:21
at /home/steam/pCarsDSlive/api/hooks/pcarsServer/index.js:594:15
at Object.helpers.parseBody (/home/steam/pCarsDSlive/node_modules/request-json/main.js:74:12)
at Request._callback (/home/steam/pCarsDSlive/node_modules/request-json/main.js:119:24)
at Request.self.callback (/home/steam/pCarsDSlive/node_modules/request-json/node_modules/request/request.js:344:22)
at Request.emit (events.js:98:17)
at Request.<anonymous> (/home/steam/pCarsDSlive/node_modules/request-json/node_modules/request/request.js:1239:14)
at Request.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/home/steam/pCarsDSlive/node_modules/request-json/node_modules/request/request.js:1187:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickDomainCallback (node.js:492:13)


Is it a new property from the DS not beeing handled yet?

RomKnight
14-08-2015, 18:16
I'm having this:


[2015-08-14 19:04:18] INFO: Starting up the Dedicated Server Library.
[2015-08-14 19:04:18] INFO: Server configuration loaded:
- protocol version: 127 (1.0.1.27)
- server name: test
- max session size: 32
- details: secure, bind IP INADDR_ANY, Steam port 8766, host port 27015, query port 27016, password protected yes
- whitelist size: 0
- blacklist size: 0
- http api: enabled listening at 127.0.0.1:9000, 1 extra header(s) defined
- allow empty join: enabled
- game setup control: enabled

Setting breakpad minidump AppID = 234630
[2015-08-14 19:04:19] INFO: HttpApi started
[2015-08-14 19:04:19] INFO: Dedicated server is starting...
[2015-08-14 19:04:20] INFO: Connection to Steam established
[2015-08-14 19:04:20] INFO: Received public IP <snipped>
[2015-08-14 19:04:20] INFO: Server logged in with Steam id 90096803186227206 ; server is secure
[2015-08-14 19:04:20] INFO: Server startup finished: AppId 234630, public IP<snipped>, Steam id 90096803186227206 ; switching to running state
[2015-08-14 19:05:21] INFO: Received connection from Steam ID <snipped>
[2015-08-14 19:05:25] INFO: Received request from <snipped>: allocate the server as user <snipped>, name <snipped>, lobby id 109775242274695503, size 32, password <snipped>
[2015-08-14 19:05:25] INFO: Starting auth of new session member <snipped> (<snipped>)
[2015-08-14 19:05:25] INFO: User <snipped> has allocated the server for game in lobby 109775242274695503 with max 32 members. The session is joinable
[2015-08-14 19:05:25] INFO: Joined and authenticated user <snipped> (<snipped>) at index 0, refId 61696, admin 1
[2015-08-14 19:05:46] WARNING: User <snipped> timed out, no messages received for 21 seconds
[2015-08-14 19:05:46] INFO: Removing user <snipped> (<snipped>) at index 0, refId 61696, admin 1 - disconnected
[2015-08-14 19:05:46] INFO: Everyone left the server, resetting to 'available for use'
[2015-08-14 19:06:47] WARNING: Connection to Steam ID <snipped> failed with error Timeout

And then pCARS gives me an unhandled exception (will upload in a moment)

215096

/edit

it appears I messed up some value with adding flags values...

In any case, some coded might be needed to prevent the crash? The server seems to launch without issues maybe because it does not validate the values in server.cfg.

RomKnight
14-08-2015, 19:13
Another question, are all combinations of the values valid? Only the default flags value seems to work or I've lost the ability to add numbers :D

LordKnut
14-08-2015, 19:24
After the patch 3.0 update for the server I get this error:


TypeError: Cannot read property 'list' of undefined
at /home/steam/pCarsDSlive/api/hooks/pcarsServer/index.js:607:47
at /home/steam/pCarsDSlive/node_modules/sails/node_modules/async/lib/async.js:629:17
at /home/steam/pCarsDSlive/node_modules/sails/node_modules/async/lib/async.js:154:25
at /home/steam/pCarsDSlive/node_modules/sails/node_modules/async/lib/async.js:626:21
at /home/steam/pCarsDSlive/api/hooks/pcarsServer/index.js:594:15
at Object.helpers.parseBody (/home/steam/pCarsDSlive/node_modules/request-json/main.js:74:12)
at Request._callback (/home/steam/pCarsDSlive/node_modules/request-json/main.js:119:24)
at Request.self.callback (/home/steam/pCarsDSlive/node_modules/request-json/node_modules/request/request.js:344:22)
at Request.emit (events.js:98:17)
at Request.<anonymous> (/home/steam/pCarsDSlive/node_modules/request-json/node_modules/request/request.js:1239:14)
at Request.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/home/steam/pCarsDSlive/node_modules/request-json/node_modules/request/request.js:1187:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickDomainCallback (node.js:492:13)


Is it a new property from the DS not beeing handled yet?

The error seems to be invoked by calling the DS-API URL "api/list/vehicle_groups" wich results in a 404
I did not use sails ever before but I will try to debug this further with some js, mvc and server knowledge ;). Although any tip is welcome!

"Disabling" the auto group update in the index.js by commenting-out lines 607-626 stops the error from occuring, it seems that that api-feature is not in use elsewhere. I don't want to write this on github, cause I don't know anything about your app. If I could be of any help debugging/developing, let me know. I cloned already but I would need a short sort of "step into" your project.

Since there are no new groups at the moment, this fixes it for me *ahem* .

//EDIT:

There's much more to do .. so IGNORE THIS POST!

RomKnight
15-08-2015, 16:29
Isn't it vehicle_classes on the URL?

LordKnut
15-08-2015, 23:18
Isn't it vehicle_classes on the URL?

Yes it is (i think from 3.0 on).

I made a "Patch 3.0" Fork an github.
For me it works ... input/bug-reports welcome.

I don't know what JcPires thinks about what I've done. It's my first steps with serverside javascript and I hope I understood his code.
My changes should work with existing data in the db tables, but no warranties at all ;).

terror
16-08-2015, 08:46
Ai Drivers off.
The host set this on or off

RomKnight
17-08-2015, 10:18
wrt post #76

Yesterday i've tried again. This time with a previously working server.cfg i always get the exception handling error.

1st time I thought it was the flags value. Then i've rebooted the router and it worked. Yesterday with several reboots and steamclient /repair (just in case because the authticked we can see in the log) pCARS just crashed.

Snoopy
31-08-2015, 14:56
Hey guys,

just want to ask if this Project will be continued.
The Testpage is down, i cannot see the Tool anymore on the given Link.

If i understand it correctly, the last changes in the Code is some Months ago and i think/see, the Tool brings up a own dedicated Server.

Is this Project "alive"?
And is it planned to get it working under standalone dedicated Server(s) or centralized?

thmxvr
31-08-2015, 15:18
Long silence in this thread and on github also. That's unfortunate, I really wished this app was production ready, IMO it is a much better design than the desktop GUI app. Anyway I hope this project will get out of hibernation soon. In the hope to retart the community effort and hopefully attrack more developpers, I started my own fork, applied pull request from others dev that were not handled by the initial developper and I am now learning the internals so that I can start writing my own fixes/improvements.

https://github.com/thmxv/Project-Cars-DS-LiveApp

@Ph0eNiX: Thanks for initial development, really great and usefull project. Are you still active on this project (just in holliday) or is this project effectively not maintained anymore? I will try to get a hang on the code and implement the following features and would appreciate any feedback from you:
- Automatically start the listener and connect to running DS or wait for a DS to come live. This ideally would permit to start this app within a srvice without the need to login as admin and start the listener manually afterwards. Also it would allow to have both app (the DS and this app) to be configured as a service that are automatically respawned. The idea is that you can start/restart any of the service in no particular order and having a functioning system without human interaction.
- Add an interface to the new control API, so that you can create/modify session from the server. Hopefully some other possibilities like restart session or pause at the end of a session until a admin or host gives the start of the next session.


@Tiago: Your issue is not related to this app but to the DS server. To use this app, first you need to have a running DS server. Check this thread to see how to do this:
http://forum.projectcarsgame.com/showthread.php?22370-Dedicated-Server-HowTo-(Work-in-Progress)
You can start using one of the provided configuration files to test if server is working OK and modify it to you need later. If the server stop working after the edits than you know that your change to the config made the server crashed.

surtic86
01-09-2015, 13:42
@thmxvr: Yes looks like he is away :/ havent answered me since a month or so...... when he doesn't answer would be cool when you go up on that and manage the project.

Questions:

1. Should the App really download, start an pCars Server on its own? When yes but then with an Option to turn it off.
2. Manage / Record / Track Multiple pCars Server should be the next big thing :) i think big Communites have really a need for this. I think @TylerBre had dome some stuff on that in his Fork.
3. Does Events Work for you? I think that needs also a rework.
4. Wee need some Targets what we want to focus.
5. Right now the Results of Race get saved into a JSON File.... do we want that? why not in the Database?

thmxvr
02-09-2015, 13:28
I cannot grantee I will be able to maintain this project (if Phoenix do not maintain it neither). I have no knowledge of sails and little time to learn/hack. But the app seems 80% done and miss only a few feature to match everybody's requirements.

1: I personally prefer to have my own install and config of the DS. But for the future when supporting multiple servers and the possibility to start/stop servers; I suppose shipping the server with the app will be less configuration work for new user/testers. Otherwise you would have to configure at least the path to the DS executable. Not a big deal or high priority in my mind.

2: Multi-server support is definitely a bug plus, I will check TylerBre's branch but this is something that needs more knowledge of the system so it will not happen just now :(

3. Did not tested, the doc says it needs to be fixed. Also I totally fail to see the purpose of if. It seems that if you configure an event and than somebody starts a session with the same parameters than the app should record this session. Why not record every session? My idea was to just record all the server activity in the DB. After the admin can have rules or do maintenance operations to delete some stuff from the DB if he wants.

4: My owns targets:
- Fix the small bug/crash that I can find, usually it is a good start to learn the tech behing opensource programs
- Add a server control page using the new control API
- When confortable enough, do so server/listener reorganization
- When this is ok I should have enough knowledge to do the multi-sever support
- More work on the register procedure, non admin-users possibly

5: I did not know that, as I said in point 3 my idea is to simply record everything in the DB. Exporting a a session to JSON might be added later if needed but once again I don't see the point. Exporting full replays that you could add to your replay dir on your PC and than watch in game would be cool but I dont know if this is possible.

surtic86
02-09-2015, 14:29
I cannot grantee I will be able to maintain this project (if Phoenix do not maintain it neither). I have no knowledge of sails and little time to learn/hack. But the app seems 80% done and miss only a few feature to match everybody's requirements.


Yes i have also not the Time to do it at all :) but eventually we can work together on it when Phoenix not response.




1: I personally prefer to have my own install and config of the DS. But for the future when supporting multiple servers and the possibility to start/stop servers; I suppose shipping the server with the app will be less configuration work for new user/testers. Otherwise you would have to configure at least the path to the DS executable. Not a big deal or high priority in my mind.


Yes me also :) i will make a Pull Request for Disable / Enable this behavior. Hope i find some time...



2: Multi-server support is definitely a bug plus, I will check TylerBre's branch but this is something that needs more knowledge of the system so it will not happen just now :(


Yes it would be a really plus... but it looks also that TylerBre is not Active anymore....



3. Did not tested, the doc says it needs to be fixed. Also I totally fail to see the purpose of if. It seems that if you configure an event and than somebody starts a session with the same parameters than the app should record this session. Why not record every session? My idea was to just record all the server activity in the DB. After the admin can have rules or do maintenance operations to delete some stuff from the DB if he wants.



I need also to test it again. It does normaly Record evry Session! But the Events are the keep them together. So you can make a Liga or so to Track with Points and stuff.




5: I did not know that, as I said in point 3 my idea is to simply record everything in the DB. Exporting a a session to JSON might be added later if needed but once again I don't see the point. Exporting full replays that you could add to your replay dir on your PC and than watch in game would be cool but I dont know if this is possible.

Its not a Export thing.... the App does it for Saving the Races. When you later go on Races the App will load the Date from the JSON File who is on the Harddisk and not from the Database.

LordKnut
03-09-2015, 20:28
@surtic86: no time too, but willing to help out where possible. You already found my patch on github.
Best Regards, Arne.

P.S.: I've got a "home"-TS-Server where I'm on most of the time of a day, so we could meet there with the guys willing to develop this thing further and make some kind of roadmap!? If this is of interest, please contact me via pm or github or whatever ;)

thmxvr
03-09-2015, 22:11
Hi,

Still learning sails/nodejs but now I feel much comfortable with the code. I was gonna ask if there was some place we could use to chat and discuss development and project organisation.

The first bug I was gona fix was a crash in the results tab when trying to show a specific session. Turns out it was due to a missing directory and the saving/opening of the json file surtic86 is talking about. IMO the best way to fix this (instead of just creating the missing did) is to include the session data in the DB; so that is what I am gonna try to do.

@LordKnut: is your branch ready to test or to merge?

LordKnut
03-09-2015, 22:56
I've only made the changes to use the old sql-structure with new server-api. So no new features or something, but otherwise ready to use.
Heard of some people testing it and it's working on my server too.

thmxvr
03-09-2015, 23:41
Sorry I got confused I was thinking to "TylerBre" the author of the "decentralisation" branch. I already merged your branch and it works OK here to thanks a lot.

hophans
04-09-2015, 11:25
Hi all.
I started setting up this live app and after struggle to understand nodejs and all it's dependencies, things runs fairly good. There is 2 things though I have some problems with.

1. the app records all the data fine and it is displayed as is over the web ui. The records view how ever is defunct. I can see that all the data is stored in a file (NaN.json) in the root dir but I am unable to see the data in the web Records view. Unsure if it is of impotence no data is stored in the sql Records table.
All in all I end up with an error returned in terminal:

Cannot read property 'Session' of undefined]
path: '/home/steam/Project-Cars-DS-LiveApp-master/views/Result/view.ejs' }

2. The DS runs fine and the socket for the app works flawless IF I use localhost socket in DS and personalconfig.js but if I change it to a global socket (ie. 123.123.123.123) the live app wont see the DS api. The port remains unchanged and I can reach the api manually.
Am I missing some thing there?

It all runs on a dedicated server with CentOS 7 and that server is for the moment dedicated to testing this software.

Any inputs or ideas is greatly appreciated.

thmxvr
04-09-2015, 12:44
Hi hophans

1: Make sure the directory configured as "logResultsPath" in config/personalConfid.js exists.

2: In you DS config you should set "httpApiInterface" to the IP of the machine accessing the API (IP of the machine running the live app) or "0.0.0.0" to allow every connection.

thmxvr
04-09-2015, 16:29
Did any of you guys tested TylerBre/decentralization branch?

I read the commit logs and there is a lot of work there:
- Authentication: reworked the password auth and add steam auth
- Differenciation between admin and regular user
- Driver <-> User association
- Multi-server with the ability for users to spawn new servers

I will try to test it, it might be worth doing a rebase onto this branch (this would bring a other set of problems though).

Snoopy
05-09-2015, 16:44
2: In you DS config you should set "httpApiInterface" to the IP of the machine accessing the API (IP of the machine running the live app) or "0.0.0.0" to allow every connection.
Hi,

i think noone wants to have an open API for all.
Everybody can send Ban/Kick/Change Orders to the Server...

thmxvr
06-09-2015, 14:20
@Snoopy: This a network admin problem. Making the server accept API request coming from any IP will not make it accessible to the whole internet. Usually those dedicated servers are in a private network behind a router/firewall. So if you did not redirect any incoming connection from the router to the HTTP API port (9000 by default) of the machine running the server, the API will be accessible from the private network only. With httpApiInterface set to 0.0.0.0, if set to localhost or 127.0.0.1 then it will only be accessible from the machine that run the server and not through any network, even local/secure)

hophans
06-09-2015, 21:15
As far as the session log file it seems to have no effect what so ever what is in the logResultsPath value. The file is in my case always stored in the project root directory.

Not knowing to much about javascript, don’t quote me, NaN seems to be a missing value in the function call that creates the file. I expect that maybe it tries to create a file with something like “date”.json but the call for current date fails and then reverts file name variable back to an empty value as NaN.?

When ever the results file is called from the web interface for the app it just returns the debug output


Cannot read property 'Session' of undefined

thmxvr
06-09-2015, 23:03
Nan = Not a Number so something wrong here. it should be 1.json, 2.json, ... I was thinking it was due to a missing directory or permission problem. I will look into it later, for now I am trying to make work/test/merge the decentralization branch of TylerBre. There are some good work int this branch.

The error "Cannot read property 'Session' of undefined" is because it cannot find the file logResultsPath + "/" + ID + ".json" which is 'expected' if it could not be saved in the first place.

hophans
06-09-2015, 23:07
Thank you for the answer, sounds a bit like i expected. I do theorice that it is due to it running on a rhel system and not deb where ' and " are treated a bit different. Even in the personal config there is a use of either but only " works in my case.

thmxvr
07-09-2015, 01:31
I have checked out TylerBre/decentralisation branch, modified it to make it work and commited to a new branch in my repo:
https://github.com/thmxv/Project-Cars-DS-LiveApp/tree/decentralization

The doc need a bit of updating in order to give all the info to make it run but nothing to fancy on this level.

I will duplicate my master branch in another branch and try to rebase that on top of the decentralization branch (doping a few commits in the process) so hopefully we will have the best of both branches to start with.

Branches that were forked from the JCPires (and children branches too) will probably not be able to merge with mine after the rebase.

thmxvr
07-09-2015, 03:10
Ok, I did the rebase, It went quite well (usually it explodes in my face :)
https://github.com/thmxv/Project-Cars-DS-LiveApp/tree/decentralization2

The resulting code needs a couple simple fixes and modifications to the doc. Will try to do this ASAP.
Testing is very much welcome.

thmxvr
07-09-2015, 04:20
@hophans: I identified your issue, fixed on my decentralization2 branch. You might be able to check just this commit but I think you are better off using the whole branch instead of master. I will certainly replace my master with it soon.

surtic86
07-09-2015, 08:32
...


Cool will look into it this Week. Also i have some commits Ready for the Config / Readme Cleanup that you only need to change the Configs in config/evn/production.js

Dalhil
07-09-2015, 13:03
i'm trying to install on a debian remote server following your documentation.

i have problems with:

sudo apt-get redis-server didn't work: "operazione redis-server non valida", i tried sudo apt-get install redis-server and installation started, but i don't know if everything went ok

sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10 nothing happens, is it correct?

sudo npn install -g npm i'm stuck here, "command not found"

thmxvr
07-09-2015, 13:52
@ Dalhil: Thanks for the report. I will correct this ASAP. Those errors are all typos (I wrote the doc late at night).

Of course it is:
sudo apt-get install redis-server

The update-alternatives should have printed something but you might already have the link. If you have a files "/usr/bin/node" that links to "/usr/bin/nodejs" then you are gook.
Verify with
ls -l /usr/bin/node

The last one was a "n" instead of a "m":
sudo npm install -g npm

thmxvr
07-09-2015, 13:52
@ Dalhil: Thanks for the report. I will correct this ASAP. Those errors are all typos (I wrote the doc late at night).

Of course it is:
sudo apt-get install redis-server

The update-alternatives should have printed something but you might already have the link. If you have a files "/usr/bin/node" that links to "/usr/bin/nodejs" then you are gook.
Verify with
ls -l /usr/bin/node

The last one was a "n" instead of a "m":
sudo npm install -g npm

hophans
07-09-2015, 15:42
The fix for the session file worked like a charm and i can now read results.
This was on the old project however.

I set up a new project for the decentralization2 as well as it looked very promissing, how ever that have given me a few grey hairs.

Most importently is that when it tries to write track and car updates to mysql it fails with the following:


/home/steam/project-cars/node_modules/sails-mysql/node_modules/mysql/lib/protocol/Parser.js:82
throw err;
^
TypeError: Cannot read property 'id' of undefined


It writes the initial table flawless but as soon a pcars session is started it dies with the above error.

Turns out that the crash might be related pcars DS when controlGameSetup=true and one or more values is empty.
The DS it self dont crash but the game it self does. I still need to look deeper into this as the Live app still crash on sessions state change.

i also seem to have a issue with Datepicker being version @0.0.0.0 causing an @import error but i can get by that as i dont intend to use the Event function.

thmxvr
07-09-2015, 16:02
@hopan: I had some problems when switching between branches because of npm package version miss-match. I had to do a:
rm -rf $HOME/.npm
npm cache clean

And then reinstall sails and project dependencies (make sure you have no errors/warnings on those steps).

thmxvr
07-09-2015, 16:02
@hopan: I had some problems when switching between branches because of npm package version miss-match. I had to do a:
rm -rf $HOME/.npm
npm cache clean

And then reinstall sails and project dependencies (make sure you have no errors/warnings on those steps).

Dalhil
08-09-2015, 09:48
...

The update-alternatives should have printed something but you might already have the link. If you have a files "/usr/bin/node" that links to "/usr/bin/nodejs" then you are gook.
Verify with
ls -l /usr/bin/node

...

/usr/bin/node links to /etc/alternatives/node

edit: then /etc/alternatives/node finally links to /usr/bin/nodejs

thmxvr
08-09-2015, 16:29
@Dalhil: That is OK, everything should work.

TylerBre pushed some modifications to his decentralization branch and it solved the merge conflicts. This is probably a better solution than my rebase so il probably simply merge his branch into my master and continue from this point.

Sorry for the double posts it seem it is related to my other computer.

hophans
17-09-2015, 09:22
I have got the project running but i keep having a few challenges with crashes along the way.

what seems rather random is an in session crash with the following:

/home/steam2/Project-Cars/api/hooks/pcarsServer/index.js:278
collided: player2.driver,
^
TypeError: Cannot read property 'driver' of undefined


It seems that it has problems reading all players names properly and crashes at some point.
Some sessions it works fine but at a 50% rate it crashes in session.
Any idea how to fix this?

On another note config/passport.js should either have the "SiteUrl" from personalconfig added or readme should maybe inform that passport.js need editing to avoid steam login to call a bad url string?

thmxvr
17-09-2015, 18:33
Yes I can confirm this bug happens when you crash alone. Should be simple fix. I will try to do this. The main problem is to find free time.

surtic86
18-09-2015, 07:30
@Dalhil: That is OK, everything should work.

TylerBre pushed some modifications to his decentralization branch and it solved the merge conflicts. This is probably a better solution than my rebase so il probably simply merge his branch into my master and continue from this point.

Sorry for the double posts it seem it is related to my other computer.

How does it look with Merge the new Branche? I had think i wait for it before i do any other stuff.

thmxvr
18-09-2015, 13:24
I will probably discard my "decentralization" branches, go back to my master (which is still based of JCPires because it was not rebased), then merge Tyler's change into this one. This should be just a few minutes if git does not explode in my face. I will try to do this this afternoon after I get to my dev station.

Although the modifs in the doc I did in the decentralization are helpful IMO and I will back-port those. Later: fixes and improvement. It should not be so complicated having just an hour or a couple of hours to spent on this project would already bring results. Unfortunately last weeks I only had few minutes at a time.

thmxvr
18-09-2015, 13:24
I went on and did the merge, all the git stuff went smoothly but the result was not that nice so I did not push it to github. Apparently Tyler tried to resolve the merge conflicts by hand and the resulting code is not functional and a bit messed up.
My rebase might not allow to keep working on the old branches but gave way better results. So i will continue work there and probably make this branch the new master after a few tests.

surtic86
19-09-2015, 14:00
...

I have don the Merge on my Fork... will also fix more stuff on it. Looks like every body is Admin now :D

LordKnut
19-09-2015, 14:45
@thmxvr, @surtic86:
If someone of you two could give me a hint, which codebase to fork/merge from github at the moment and what parts to fix, I could probably do some work the next week.

As I'm not used to github, how do I do a merge - by hand or should I use github functions?

@surtic86:
As it seems you know how to do it the right way ... could I persuade you of spending 5-10min of your time in giving me a quick github tutorial??
I speak german, too and we could use Teamsspeak, Skype or whatever, just get in contact with me by pm or so. I have at least 10 years of coding experience and I'm a quick learner, so it should be no problem for you. I just have too little time at the moment and no github experience exept cloning and using the code for myself. I'm using github-client on windows and Notepad++ or VS 2013.
If you just don't feel like doing that, I don't mind too.

surtic86
19-09-2015, 15:12
...

Sure will send you a PM :)

thmxvr
19-09-2015, 18:16
Hi, I am spending the day doing some urgent fixes in my "decentralization2" branch. Hopefully at the end of the days it will be a good enough branch to use as master/base for every active coders.

The main issues is the code in api/hooks/projectcars/index.js

which look a a bit like that:

return {
start: function() {
interval = setinterval( function(){

// All the code of the logic of the application in many intricate anonymous functions
// this is hundreds of lines of code very difficult to follow

}, 2000)
}
}

This is a nightmare to understand and worst of all, is modified almost every commit and git get confused, assumed he resolved the conflict automatically (or even that there is no conflict) even though it is all messed up. Even the diff/patch generated by the standard tools are crazy.

So today I am reorganizing all this code and fixing the issues in it.

I will post a message here (hopefully later today) went all this is sorted out and working/tested.

@Lordknut: For the moment I would recommend my decentralization2 branch event though the update of cars/and track does not work right now. But I would wait until the insane code is clearly organised before starting doing modif to the code. I use git in command line and

@surtic86: Probably a merge problem. Now there is no more registration step nor password required. The only supported auth method is via steamid all users are NOT admin by default and you have to modfify a flag in the DB after making a first login to marka user as admin.

thmxvr
19-09-2015, 22:37
Hi did a refactor of the hook API (just deintricating anonymous functions and give them names, no algorithmic changes). There are still big functions (around 100 lines) but not the 600 lines madness of before. Also the flow of the app is now must simpler to grasp. I also fixed a crash due to a car belonging to an nonexistent class and tried to fix the crash cause when a player crash alone, but I was unable to test in session because when trying to join a network session the game crashes.

surtic86
20-09-2015, 05:25
@thmxvr: Yes there was some conflicts or not in to the end programmed stuff :) i got the Login function and isAdmin stuff now correct.

I was talking with @LordKnut and so we decided for us to Remove the Dedicated Server / Vergant stuff. Why?
* Evry User who can Setup the Live App can also Setup a Project Cars Dedicated Server easy
* Works again under Windows / OSX without Vergant
* Much cleaner Code


I merged your new API changes by Hand... merge was not Possible for me.

https://github.com/surtic86/Project-Cars-DS-LiveApp/commits/master


For the next Days i will work on Multi Dedicated Server Support... hope i get ride of it. But i will not go on the TaylorBre stuff. Because i don't really want that evry User can add his Servers to the App. Will do a easy Configuration fr more Servers.

Edit: Will also rewrite the README for Installation and Running the App.

thmxvr
20-09-2015, 14:02
I do not use vagrant and had to comment all the automated DS stuff to make it work so I won't miss it in its actual state but keeping the code and just commenting or deactivating it might be useful in the future when we have a system to spawn multiple servers.

I strongly recommend you stop working on the older branch forked of JCPires master and clone my "decentralization2" branch and do your work on top of this one. It is the branch where I merged all the functionalities of all the other branches, made the fixes for the 3.0 and 4.0 patch and other fixes. It is in a working/testable state, but will not merge with older branches because of the rebase I had to do. Also the doc is updated. Now that it is in a better state than any previous master branch I will replace my master with this branch anyway.


The hook API refactor did wonders for me, now it is much more easier to understand the flow of the app. Which made me spot some bug and "error of conceptions" some I fixed already other not yet:

- Async errors. Lots of the code is asynchronous but there is no check to verify that what needs to be done for an operation to complete successfully is done and finished. For example starting a new session would set the new session to a non null value and then asynchronously create a file and do some DB operations. So the main loop was actually detecting the non null session the next time and begin handle session event even though the file and DB where not ready for it. (FIXED)

- The app depend on the event log to populate players when they are added to the session, but event where handle in parallel and out of order so event like "impact" involving player would try to access a player list that is not up to date. (FIXED but it seems single event are treated multiple time, probably because of another async bug)

- When connecting to a server that was already running and already have event in the log the app get totally confused thinking all those event are relative to the session that just opened. (NOT FIXED yet)

...

Basically all this code is littered with flaws and bugs and need to be audited/cleaned, and possibly the way it works need to be refactored a little.

If you guys have a IRC channel or TS server to discuss, please do not hesitate to contact me privately.

thmxvr
20-09-2015, 14:12
If you want to checkout my branch and add it to your github I would use the following method:

- Add my github as remote and fetch it:

git remote add thmxv https://github.com/thmxv/Project-Cars-DS-LiveApp.git
git fetch thmxv

- Checkout my branch to you branch

git checkout -b yourbranchname thmxv/decentralization2

-Make your local branc track a remot branch of yours instead of mine

git branch yourbranchname -u origin/yourbranchname


Not sure if it is the best way but it worked for me

EDIT: As stated later we now use Sutic86 master branch as base. I deleted all those temporary test branch. I let the git command for reference in case it is useful to somebody but the branch do not exists anymore.

thmxvr
20-09-2015, 14:23
@surtic86: I went over you branch. Saw you managed the hook API merge by hand, but also made improvements on your own in others area. Did you manage to get the SteamID authentication working also? If yes we can use your branch as common dev starting point. The important issue is that we all work on a branch where merging will be less painful. What branch we actually use is open for debate.

One element that might be worht taking from my branch also is the doc (README.md). The info on how to setup you config in local.js and the command to install the prerequisite in Linux are quite helpful.

surtic86
20-09-2015, 14:33
Hello there :)

There is no need to keep the Files or changes commented out because we use Git we can always get them back. Right now it's just messing the Code up. And im also thinking that this would be the wrong Way to get this Big Package who the most Guy's don't use. The most Guy's / Community's will Mange the Servers for themselves.

Or what do you think?


I am already on the newest Branch from TylerBre's Decentralization but im cleaned all up and just use the Steam Auth and some other stuffs. Also i Merged the changes from you into mine Branch. But i had it to make it by hand.... because the Git Branches was to different from each others.

Yes i notice some really strange behaviors and i think we need to Rewrite this API Stuff, also for the future with Multi Server support.


-----

Yes we should meet us in TeamSpeak / IRC for a Roundup to clean it up what we want :) in wich Time Zone do you life? LordKnut and me are in UTC+1




EDIT: Yes i fixed SteamAuth.

thmxvr
20-09-2015, 15:14
I totally agree that most user/tester will have a DS running already and automatically killing/launching one for the purpose of this app only complicate things (a lot).

I am UTC-3.

I will switch to your branch which seems to be synced with mine in terms of features and fixes so future merge will be less painful.

hophans
21-09-2015, 10:04
Hello surtic86 and thmxvr.

Great to see a bit less fragmentation on this project.

I did a clean setup of the merged project and it have presented a few flaws.
When the project is launched in production it do not seem to read the host and port for that env. but simply reverts to http://localhost:1337.
Another note i noticed is this call after steam login that results in an internal error:

Cannot read property 'race_count' of undefined]
path: '/home/steam/Project-Cars-DS-LiveApp/views/User/profile.ejs' }

Last there is a crash when leaving the garage in game:

/home/steam/Project-Cars-DS-LiveApp/api/hooks/pcarsServer/index.js:704
car: player.car,
^
TypeError: Cannot read property 'car' of undefined


I can see that "Car" isn't defined in the log file, as was in the earlier projects.
I have tried to hunt down the actual cause but my log of JS knowledge prohibits me from that.

That said the projects is starting to look very nice.

surtic86
21-09-2015, 11:46
Hi there,

1. How does your Configuration look? Do you have a config/env/production.js ?

2. Yes this is a error since Today and comes from the new Commit from thmxvr who he fixed something others :D i will look into it this evening. Right now you can use the File 2 Commits before.

3. What car was it? I have also seen some leak that not all Cars get loaded at all on the Start.

hophans
21-09-2015, 16:18
When i cloned the project it had a new production.orig.js so i asumed it to be a new format. Creating the original production.js does open the prober port but then crash on a listen access error (port and ip is availeble, and tried on multiple ip's on the server ;) )
I need to look into that further my self as well though

I have tried an amount of cars, and all cause the same crash.

surtic86
21-09-2015, 16:32
...

Yes we have moved all necessary Configuration stuff into that. So you need to rename the "production.orig.js" to "production.js" and make your Configuration stuff. After that you can Start the Live App with "sails lift --prod" when you do it without "--prod" it will search the "development.js" File.

thmxvr
23-09-2015, 14:06
Hi,

Sorry for the fix that fixed something but acctually breked some other things more consistently. Thanks to surtic for fixing it.

@hophans: The second crash when leaving the garage is due to the way the app works for the moment which is a bit funky and cannot be relied on. We are currently working on refactoring this piece of the code to something stable and reliable. In the meantime you can try to work around the problem by starting the listener only on freshly started DS (which have an empty event log).

surtic86
04-10-2015, 20:10
Status Update: We are still on the Rework... when we are finish with it we will create a new Thread for the App.

You can watch the Progress on https://github.com/surtic86/Project-Cars-DS-LiveApp