Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error While Loading Microservices Update, Feed, Notification & Publish #364

Open
jon4short opened this issue Apr 25, 2022 · 7 comments
Open

Comments

@jon4short
Copy link
Contributor

Below is the error code I get when trying to run the microservice in nodemon.. eg. nodemon update.server.js

`{

error: TypeError: Cannot read properties of undefined (reading 'use_env_variable')

  at file:///var/www/html/socioboard/socioboard-api/Common/Sequelize-cli/models/index.js:21:12

  at ModuleJob.run (node:internal/modules/esm/module_job:198:25)

  at async Promise.all (index 0)

  at async ESMLoader.import (node:internal/modules/esm/loader:409:24)

  at async loadESM (node:internal/process/esm_loader:85:5)

  at async handleMainPromise (node:internal/modules/run_main:61:12),

level: 'error',

message: "uncaughtException: Cannot read properties of undefined (reading 'use_env_variable')\n" +

"TypeError: Cannot read properties of undefined (reading 'use_env_variable')\n" +

'    at file:///var/www/html/socioboard/socioboard-api/Common/Sequelize-cli/models/index.js:21:12\n' +

'    at ModuleJob.run (node:internal/modules/esm/module_job:198:25)\n' +

'    at async Promise.all (index 0)\n' +

'    at async ESMLoader.import (node:internal/modules/esm/loader:409:24)\n' +

'    at async loadESM (node:internal/process/esm_loader:85:5)\n' +

'    at async handleMainPromise (node:internal/modules/run_main:61:12)',

stack: "TypeError: Cannot read properties of undefined (reading 'use_env_variable')\n" +

'    at file:///var/www/html/socioboard/socioboard-api/Common/Sequelize-cli/models/index.js:21:12\n' +

'    at ModuleJob.run (node:internal/modules/esm/module_job:198:25)\n' +

'    at async Promise.all (index 0)\n' +

'    at async ESMLoader.import (node:internal/modules/esm/loader:409:24)\n' +

'    at async loadESM (node:internal/process/esm_loader:85:5)\n' +

'    at async handleMainPromise (node:internal/modules/run_main:61:12)',

exception: true,

date: 'Mon Apr 25 2022 09:42:42 GMT+0400 (Gulf Standard Time)',

process: {

pid: 11055,

uid: 0,

gid: 0,

cwd: '/var/www/html/socioboard/socioboard-api/Update',

execPath: '/usr/local/bin/node',

version: 'v18.0.0',

argv: [

  '/usr/local/bin/node',

  '/var/www/html/socioboard/socioboard-api/Update/update.server.js'

],

memoryUsage: {

  rss: 119390208,

  heapTotal: 72232960,

  heapUsed: 41872016,

  external: 22828907,

  arrayBuffers: 18985669

}

},

os: { loadavg: [ 0.15, 0.2, 0.26 ], uptime: 1450.79 },

trace: [

{

  column: 12,

  file: 'file:///var/www/html/socioboard/socioboard-api/Common/Sequelize-cli/models/index.js',

  function: null,

  line: 21,

  method: null,

  native: false

},

{

  column: 25,

  file: 'node:internal/modules/esm/module_job',

  function: 'ModuleJob.run',

  line: 198,

  method: 'run',

  native: false

},

{

  column: null,

  file: null,

  function: 'async Promise.all',

  line: null,

  method: 'all',

  native: false

},

{

  column: 24,

  file: 'node:internal/modules/esm/loader',

  function: 'async ESMLoader.import',

  line: 409,

  method: 'import',

  native: false

},

{

  column: 5,

  file: 'node:internal/process/esm_loader',

  function: 'async loadESM',

  line: 85,

  method: null,

  native: false

},

{

  column: 12,

  file: 'node:internal/modules/run_main',

  function: 'async handleMainPromise',

  line: 61,

  method: null,

  native: false

}`
@Jagadeesha-R
Copy link

Hi @jon4short ,
Please check the logs for respective service , for example user service logs will be located at \BackEnd\User\resources\Log\ResponseLog

Look like missing config please update it

@opensourcelib
Copy link

I was getting a similar error while starting user service but my issue was caused because I didn't run the following command export NODE_ENV=development
Hope it helps someone.

@0spinboson
Copy link

having same issue trying to run sb 5.0 on ubuntu focal. opensourcelib's suggestion doesn't solve it.

@RR-Helpdesk
Copy link

I'm getting the same error and looking through the logs it doesn't say any ENV is missing

node# cat user29-07-2022.log
{
error: TypeError: Cannot read properties of undefined (reading 'use_env_variable')
at file:///home/nodejs/web/socioboard.revrebel.app/public_html/socioboard-api/Common/Sequelize-cli/models/index.js:21:12
at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
at async loadESM (node:internal/process/esm_loader:88:5)
at async handleMainPromise (node:internal/modules/run_main:65:12),
level: 'error',
message: "uncaughtException: Cannot read properties of undefined (reading 'use_env_variable')\n" +
"TypeError: Cannot read properties of undefined (reading 'use_env_variable')\n" +
' at file:///home/nodejs/web/socioboard.revrebel.app/public_html/socioboard-api/Common/Sequelize-cli/models/index.js:21:12\n' +
' at ModuleJob.run (node:internal/modules/esm/module_job:185:25)\n' +
' at async Promise.all (index 0)\n' +
' at async ESMLoader.import (node:internal/modules/esm/loader:281:24)\n' +
' at async loadESM (node:internal/process/esm_loader:88:5)\n' +
' at async handleMainPromise (node:internal/modules/run_main:65:12)',
stack: "TypeError: Cannot read properties of undefined (reading 'use_env_variable')\n" +
' at file:///home/nodejs/web/socioboard.revrebel.app/public_html/socioboard-api/Common/Sequelize-cli/models/index.js:21:12\n' +
' at ModuleJob.run (node:internal/modules/esm/module_job:185:25)\n' +
' at async Promise.all (index 0)\n' +
' at async ESMLoader.import (node:internal/modules/esm/loader:281:24)\n' +
' at async loadESM (node:internal/process/esm_loader:88:5)\n' +
' at async handleMainPromise (node:internal/modules/run_main:65:12)',
exception: true,
date: 'Fri Jul 29 2022 00:25:57 GMT-0700 (Pacific Daylight Time)',
process: {
pid: 3026791,
uid: 0,
gid: 0,
cwd: '/home/nodejs/web/socioboard.revrebel.app/public_html/socioboard-api/User',
execPath: '/root/.nvm/versions/node/v16.13.0/bin/node',
version: 'v16.13.0',
argv: [
'/root/.nvm/versions/node/v16.13.0/bin/node',
'/home/nodejs/web/socioboard.revrebel.app/public_html/socioboard-api/User/user.server.js'
],
memoryUsage: {
rss: 115466240,
heapTotal: 70287360,
heapUsed: 51472208,
external: 30656786,
arrayBuffers: 20344650
}
},
os: { loadavg: [ 0.46, 0.45, 0.53 ], uptime: 284823.53 },
trace: [
{
column: 12,
file: 'file:///home/nodejs/web/socioboard.revrebel.app/public_html/socioboard-api/Common/Sequelize-cli/models/index.js',
function: null,
line: 21,
method: null,
native: false
},
{
column: 25,
file: 'node:internal/modules/esm/module_job',
function: 'ModuleJob.run',
line: 185,
method: 'run',
native: false
},
{
column: null,
file: null,
function: 'async Promise.all',
line: null,
method: 'all',
native: false
},
{
column: 24,
file: 'node:internal/modules/esm/loader',
function: 'async ESMLoader.import',
line: 281,
method: 'import',
native: false
},
{
column: 5,
file: 'node:internal/process/esm_loader',
function: 'async loadESM',
line: 88,
method: null,
native: false
},
{
column: 12,
file: 'node:internal/modules/run_main',
function: 'async handleMainPromise',
line: 65,
method: null,
native: false
}
],
timestamp: '2022-07-29T07:25:57.303Z'
}

@vaughngx4
Copy link
Contributor

vaughngx4 commented Jul 29, 2022

@REVREBEL Have you set MySQL details in socioboard-api/Common/Sequelize-cli/config/config.json?

@RR-Helpdesk
Copy link

Yes, all of that checks out. I ended up copying back in the original deployement.json and then changing all the variables again; however, now it won't let me past the Twitter API config. If I take the block or leave it in, or all dummy values I get the same error. Twitter denied my API access request, so I won't actually be able to connect to that channel. Anyway, around moving past the API not being defined?

error: Error: Configuration property "twitter_api" is not defined
at Config.get (/home/nodejs/web/socioboard.revrebel.app/public_html/socioboard-api/Common/node_modules/config/lib/config.js>
at new TeamLibs (file:///home/nodejs/web/socioboard.revrebel.app/public_html/socioboard-api/Common/Models/team.model.js:46:>
at file:///home/nodejs/web/socioboard.revrebel.app/public_html/socioboard-api/Common/Models/invitation.model.js:11:18
at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
at async loadESM (node:internal/process/esm_loader:88:5)
at async handleMainPromise (node:internal/modules/run_main:65:12),
level: 'error',

@vaughngx4
Copy link
Contributor

@REVREBEL I actually haven't gotten any of the apis working properly yet, still testing(don't have a whole lot of time or a pc to run it at a decent speed). Myself and a few others are working on testing and writing docs. If you have any luck with any of the API's let us know please.

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

No branches or pull requests

6 participants