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

Postman send statement failure | A server error occurred | no mango primary found #1626

Open
looperEit opened this issue Feb 9, 2023 · 1 comment

Comments

@looperEit
Copy link

there is a new issue that have confused me mach time. i try to use Postman send xAPI statement to the Learning locker store. The configurations of client and postman is complete. But it did't work!
image
image
image

logs like:
image

@looperEit
Copy link
Author

This problem is caused by the encoding problem of mongodb and the writing problem of the .env file. The first is the encoding problem of mogoddb. You only need to find the encoding.js file in /usr/local/learninglocker/current/xapi/node_modules/mongodb-connection-string-url/node_modules/whatwg-url/lib in the xapi file and add const to it { TextEncoder, TextDecoder } = require("util"); code.
Then change the mongodb link in the .env file to MONGO_URL=mongodb://localhost:27017/learninglocker_v2
Make sure your node -v is 10, and xapi needs to be 6.0, not 7.0. Because the node used in 7.0 is version 16+.

By the way. It is best to use Ubuntu18 for installation. For Ubuntu20+, you need to modify "@google-cloud/pubsub": "^0.16.1" inpackage.jsin webapp to 0.32.1.

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

No branches or pull requests

1 participant