Closed aliuysal60 closed 2 years ago
Welcome to your first issue in e-Mobility software
Thanks! What version of MongoDB are you using? We currently use 4.4.
Yes, my Mongo version is 4.4.1 I follow all the instructions exactly, I don't get any errors, I create the relevant DB users. Then I edited the config.json and when I run the command "npm run start" I get this error.
Is it necessary to create a database named evse in MongoDB? I do not have. How should I do?
my config.json;
{
"EVDatabase": {
"url": "",
"key": ""
},
"Crypto": {
"key": "",
"algorithm": ""
},
"CentralSystems": [
{
"type": "ocpp",
"implementation": "soap",
"protocol": "http",
"host": "localhost",
"port": 8000,
"debug": false
},
{
"type": "ocpp",
"implementation": "json",
"protocol": "ws",
"host": "localhost",
"port": 8010,
"keepaliveinterval": 30,
"debug": false
}
],
"CentralSystemRestService": {
"protocol": "http",
"host": "localhost",
"port": 80,
"userTokenKey": "myKey",
"userTokenLifetimeHours": 12,
"userDemoTokenLifetimeDays": 365,
"userTechnicalTokenLifetimeDays": 365,
"passwordWrongNumberOfTrial": 3,
"passwordBlockedWaitTimeMin": 5,
"captchaSecretKey": "myKey",
"captchaScore": 0.25,
"debug": false
},
"CentralSystemFrontEnd": {
"protocol": "http",
"host": "localhost",
"port": 80
},
"OCPIService": {
"protocol": "http",
"host": "localhost",
"port": 9090,
"debug": false
},
"OICPService": {
"protocol": "http",
"host": "localhost",
"port": 9080,
"debug": false
},
"CentralSystemServer": {
"protocol": "http",
"host": "localhost",
"port": 80
},
"ODataService": {
"protocol": "http",
"host": "localhost",
"port": 9292,
"debug": false
},
"WSDLEndpoint": {
"baseSecureUrl": ""
},
"JsonEndpoint": {
"baseSecureUrl": ""
},
"OCPIEndpoint": {
"baseUrl": ""
},
"AsyncTask": {
"active": true,
"nbrTasksInParallel": 4
},
"Storage": {
"implementation": "mongodb",
"host": "localhost",
"port": 27017,
"user": "evse-user",
"password": "123456",
"database" : "evse"
},
"Notification": {
"Email": {
"enabled": true
},
"RemotePushNotification": {
"enabled": true
}
},
"Firebase": {
"type": "",
"projectID": "",
"privateKeyID": "",
"privateKey": "",
"clientEmail": "",
"clientID": "",
"authURI": "",
"tokenURI": "",
"authProviderX509CertURL": "",
"clientX509CertURL": "",
"databaseURL": ""
},
"Axios": {
"retries": 0,
"timeoutSecs": 30
},
"Email": {
"disableBackup": false,
"smtp": {
"from": "",
"host": "",
"port": 465,
"secure": true,
"requireTLS": false,
"user": "",
"password": ""
},
"smtpBackup": {
"from": "",
"host": "",
"port": 465,
"secure": true,
"requireTLS": false,
"user": "",
"password": ""
}
},
"Authorization": {
"debug": false
},
"ChargingStation": {
"heartbeatIntervalOCPPSSecs": 60,
"heartbeatIntervalOCPPJSecs": 3600,
"pingIntervalOCPPJSecs": 60,
"monitoringIntervalOCPPJSecs": 600,
"notifBeforeEndOfChargeEnabled": true,
"notifBeforeEndOfChargePercent": 85,
"notifEndOfChargeEnabled": true,
"notifStopTransactionAndUnlockConnector": false,
"maxLastSeenIntervalSecs": 540
},
"Migration": {
"active": true
},
"Scheduler": {
"active": false,
"tasks": [
{
"name": "OICPPushEVSEDataTask",
"active": false,
"periodicity": "*/10 * * * *",
"config": {
"processAllEVSEs": true
}
},
{
"name": "OICPPushEvseStatusTask",
"active": false,
"periodicity": "*/5 * * * *",
"config": {
"processAllEVSEs": true
}
}
]
},
"Trace": {
"traceIngressHttp": false,
"traceEgressHttp": false,
"traceOcpp": false,
"traceDatabase": false,
"traceNotification": false
},
"Logging": {
"logLevel": "D"
}
}
Thanks! What version of MongoDB are you using? We currently use 4.4.
Mine is also 4.4 and i get the exact same errors.
Is it necessary to create a database named evse in MongoDB? I do not have. How should I do?
No the DB and Collections are created on the fly. I'll check and let you know.
It seems the stack trace is not corresponding to the source code. What branch do you use? What OS? Linux?
It seems the stack trace is not corresponding to the source code. What branch do you use? What OS? Linux?
Hi, master-qa
I have run it on windows and Ubuntu. both gave the same error.
It seems the stack trace is not corresponding to the source code. What branch do you use? What OS? Linux?
master-qa macOS Monterey 12.2.1
I just cloned it, performed 'npm install', created the config.json with your data and it compiled successfully and failed at runtime with a missing props in the config file:
Did you use NodeJs V16?
Ben sadece onu klonladım, 'npm kurulumunu' gerçekleştirdim, verilerinizle config.json'u yarattım ve config dosyasında eksik bir sahne ile çalışma zamanında başarılı bir şekilde derlendi ve başarısız oldu:
NodeJs V16 kullandınız mı?
Me too get this error when I run "debug:dev", but when I run "npm start" it gives the error I mentioned above. very strange, I set up many virtual servers and tried again and again, always the same error
Yes nodeJs v16
{
'ev-server': '2.6.2',
npm: '6.14.4',
ares: '1.18.1',
brotli: '1.0.9',
cldr: '40.0',
icu: '70.1',
llhttp: '6.0.4',
modules: '93',
napi: '8',
nghttp2: '1.45.1',
nghttp3: '0.1.0-DEV',
ngtcp2: '0.1.0-DEV',
node: '16.14.0',
openssl: '1.1.1m+quic',
tz: '2021a3',
unicode: '14.0',
uv: '1.43.0',
v8: '9.4.146.24-node.20',
zlib: '1.2.11'
}
You have the wrong npm version.
{
'ev-server': '2.6.3',
npm: '8.1.0',
node: '16.13.0',
v8: '9.4.146.19-node.13',
uv: '1.42.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.17.2',
modules: '93',
nghttp2: '1.45.1',
napi: '8',
llhttp: '6.0.4',
openssl: '1.1.1l+quic',
cldr: '39.0',
icu: '69.1',
tz: '2021a',
unicode: '13.0',
ngtcp2: '0.1.0-DEV',
nghttp3: '0.1.0-DEV'
}
Me too get this error when I run "debug:dev", but when I run "npm start" it gives the error I mentioned above. very strange, I set up many virtual servers and tried again and again, always the same error
The file config.json is validated against a Json schema and you have an error in it. Check the Json schema: /ev-server/src/assets/schemas/configuration/configuration.json
Me too get this error when I run "debug:dev", but when I run "npm start" it gives the error I mentioned above. very strange, I set up many virtual servers and tried again and again, always the same error
Which version should it be?
The file config.json is validated against a Json schema and you have an error in it. Check the Json schema: /ev-server/src/assets/schemas/configuration/configuration.json
ok i fixed it it crashed again same error
@LucasBrazi06 very thanks for your help. In npm version 8.5.2 these errors are fixed. But the following came :)
04.03.2022 21:29:22 - e-Mobility Server is starting...
04.03.2022 21:29:22 - NodeJS is started in 'production' mode
Missing property 'Monitoring' in config.json
04.03.2022 21:29:22 - Connecting to the Database...
04.03.2022 21:29:22 - Connecting to 'mongodb'...
04.03.2022 21:29:22 - TypeError: Cannot read properties of undefined (reading 'toString')
You can ignore the missing property and you have to debug the null pointer ;-). Either check the logs in the DB (default.logs) or put a breakpoint in VSCode.
@LucasBrazi06 thanks, now working
I am trying to run this on Node 16.14.0, NPM 8.3.1 and MongoDB 4.4.13, but I am facing the same error.
Please advise.
Bunu Düğüm 16.14.0, NPM 8.3.1 ve MongoDB 4.4.13 üzerinde çalıştırmaya çalışıyorum ama aynı hatayla karşı karşıyayım.
Tavsiye lütfen.
Hello, You cannot do the "authorization" specified in the "README" with 4.4.13. Try using 4.4.0. Make sure you have done the exact "replica set" and other settings. Also, add the mongodb parameters in the config.json file like this, it's causing problems when there is no url.
"Storage": {
"implementation": "mongodb",
"uri": "mongodb://evse-user:your_password@your_host:27017/evse?readPreference=secondaryPreferred",
"host": "your_host",
"port": 27017,
"user": "evse-user",
"password": "your_password",
"database" : "evse",
"replicaSet": "rs0",
"poolSize": 200
},
Hi, This project is super, I want to develop and use it for the first time, but I couldn't run it. Why am I getting the following error? My mongo level is very low. Could this be the reason? Can you help me?