FAQ for Developers
  1. 1.
    Relation ‘experiment_condition’ already exists:
Solutions:
Your Postgres server needs to be deleted and a new one is to be created. If you still have an issue then check the database on datagrip and if you still see tables present, drop the public schema tables and the object types and sequences folders in public.
OR
Set TYPEORM_SYNCHRONIZE variable of .env file to true while in the main branch and then start backend server, so you have the current base schema populated with you, then close the server. Now, switch to your branch that has schema changes and starts the server, and set TYPEORM_SYNCHRONIZE variable of .env file to false and run migration script to get the migration file generated.
2. User not found. Authorization error:
Solution: Change .env file in backend code:
AUTH_CHECK=true to AUTH_CHECK=false (this will disable server-side auth)
3. Token is not present in the request header
info: [api:middlewares/ErrorHandlerMiddleware]
Insert Error in database {"0":{}}
info: [api:services/ErrorService] Inserting an error =>
{"name":"Error","message":"Provided token is invalid","endPoint":"/api/assign","type":"Invalid token"}
Solution: Disable the Authorization toggle from UI to disable auth on client-side SDK
4. nodemon exit issue on the backend without any other error detail, like shown below:
[nodemon] starting `node --inspect=0.0.0.0:9200 -r ts-node/register ./src/app.ts`
Debugger listening on ws://0.0.0.0:9200/2b5addb5-00d6-4975-b657-da113994f6a9
For help, see: https://nodejs.org/en/docs/inspector
[nodemon] clean exit - waiting for changes before restart
Solution: Check your node version. It has to be 12.16.1 and not updated to 13 and above.
5. Unable to find New Relic module configuration, as shown below:
[nodemon] starting `node --inspect=0.0.0.0:9200 -r ts-node/register ./src/app.ts`
Debugger listening on ws://0.0.0.0:9200/cd2fd09e-74f1-4120-b67c-d13b4af54e07
For help, see: https://nodejs.org/en/docs/inspector
Unable to find New Relic module configuration. A base configuration file
can be copied from /Users/zlee/Desktop/code/educational-experiment-service/packages/Upgrade/node_modules/newrelic/newrelic.js
and put at /Users/zlee/Desktop/code/educational-experiment-service/packages/Upgrade/newrelic.js or
/Users/zlee/Desktop/code/educational-experiment-service/packages/Upgrade/src/newrelic.js.
If you are not using file-based configuration, please set the environment
variable `NEW_RELIC_NO_CONFIG_FILE=true`.
Unable to find New Relic module configuration. A base configuration file
can be copied from /Users/zlee/Desktop/code/educational-experiment-service/packages/Upgrade/node_modules/newrelic/newrelic.js
and put at /Users/zlee/Desktop/code/educational-experiment-service/packages/Upgrade/newrelic.js or
/Users/zlee/Desktop/code/educational-experiment-service/packages/Upgrade/src/newrelic.js.
If you are not using file-based configuration, please set the environment
variable `NEW_RELIC_NO_CONFIG_FILE=true`.
{"v":0,"level":30,"name":"newrelic_bootstrap","hostname":"13366-zlee","pid":71702,"time":"2021-09-10T01:54:35.894Z","msg":"Using New Relic for Node.js. Agent version: 7.1.0; Node version: v14.17.6."}
{"v":0,"level":30,"name":"newrelic_bootstrap","hostname":"13366-zlee","pid":71702,"time":"2021-09-10T01:54:35.898Z","msg":"Module not enabled in configuration; not starting."}
[nodemon] clean exit - waiting for changes before restart
Solution: You don't need a newrelic configuration for development purposes. Comment out import 'newrelic/index'; in app.ts and run npm run dev
6. Email not received on Export Data button click:
Solution: You need to verify the environment values of that backend deployed on AWS elastic beanstalk in the configuration tab. Mainly check for the HOST_URL, which should be the backend API URL (For example: https://upgrade-demo.carnegielearning.com/api ). Also, check the value present in EMAIL_BUCKET and AWS_REGION and it should resemble your AWS account with corresponding S3 bucket in the corresponding region.
7. Opening a new tab in UpGrade prompts for re-authorization:
Solution: In Safari, the default privacy option is to prevent cross-site tracking. This also prevents UpGrade from retaining your session between tabs. Disable the cross-site tracking option by opening your Safari Preferences, navigating to Privacy, and un-checking the Website tracking checkbox. Now you should be able to open experiments in new tabs and remained logged in. If you're using another browser, try resetting your browser's cookie settings and checking that your browser is up-to-date. Firefox and Chrome's default settings should let you retain sessions across tabs. You may also be in Incognito Mode which has additional cookie blocking settings.
Safari Privacy Preferences
Reset Chrome's Settings
Copy link