socioboard / Socioboard-5.0

Socioboard is world's first and open source Social Technology Enabler. Socioboard Core is our flagship product.
http://www.socioboard.org
Other
1.07k stars 353 forks source link

Cannot read properties of null (reading 'account_count') #404

Open Tobjoern opened 1 year ago

Tobjoern commented 1 year ago

Hello, I followed the steps in the docker setup (Docker.README.md) exactly, but when I try to log-in, I get the error

"0|user.server | TypeError: Cannot read properties of null (reading 'account_count') 0|user.server | at default (file:///usr/socioboard/app/socioboard-api/User/middleware/authentication.middleware.js:31:71)"

When I start the compose file for the first time, I get the following log:

Running first time setup
Initializing MySQL Database
npm WARN exec The following package was not found and will be installed: sequelize-cli@6.5.1
sh: sequelize: Permission denied
Setup complete
Starting API

I suspect it has something to do with am error in the db initialization. Can anyone help me with that?

mahavirvataliya commented 1 year ago

There are multiple issue that seen that I have tried to fixed. The above issue is due to seed is not being executed due to sequelize cli sh: sequelize: Permission denied,

From logs i identified that Plans are not being seeded in table due to created and updated timestamps are not null and required some values,

some of the other issues i had faced is

  1. Sequelize cli permission denined
  2. Log directory case sensitive issue in some of the file its Log and directory is cloned as log
  3. sed command not working in macos in docker compose build so mongo credentials are not working
  4. Plan Seeder has issue with no default value of database
  5. Check Laravel APP_KEY is correct else it not work.

Some of the fixes I have done in this commit.

https://github.com/mahavirvataliya/Socioboard-5.0/commit/64d5b515a55e58c16df16a0fd3292437bbd2e19c#diff-a6048920288624178b3358f8569e58ac1007dda3ccdbf4ecdb0376fb161f0879