Can't add books from my localhost

@mr_monkey i need help to continue!

@Prabhleen
Report the error message by using this command.
“Npm start - - unhandled-rejections=strict”

Hi @Prabhleen!

The red banner you see at the top of the website locally (“We are currently experiencing difficulties…”) means that the web server can’t communicate with redis (we use it to store user sessions).

That means either redis is not running or the server can’t communicate with it.
In that state, it’s impossible to log in to the website, which in turn means you won’t be able to edit anything.

So first, make sure that redis is running.
Try the command curl localhost:6379 (6379 is the default redis port) in your terminal; if not running, you’ll get something like “Failed to connect to localhost port 6379: Connection refused”.
If it is running correctly, you’ll get another message “-ERR wrong number of arguments for ‘get’ command” (never mind that it’s an error, we just want to know it’s running)

If it is running fine and you still have that red banner, check the “session” part of your config.json file, and make sure you are pointing to the correct address and port. If redis is running with its default, it should be

"redis": {
	"host": "localhost",
	"port": 6379
}

Let me know how that went for you.

@endurance21 when i do npm start --unhandled-rejections=strict, i get the same output:

Warning: Failed prop type: Invalid prop error.detailedMessage of type array supplied to ErrorPage, expected string.
in ErrorPage
HEAD /bookbrainz 404 240.236 ms - 8486
HEAD /bookbrainz 404 12.487 ms - 8486
PUT /bookbrainz 404 1106.578 ms - 8486
(node:32420) UnhandledPromiseRejectionWarning: Error: Not Found
at respond (/home/prabh_leen/bookbrainz-site/node_modules/elasticsearch/src/lib/transport.js:308:15)
at checkRespForFailure (/home/prabh_leen/bookbrainz-site/node_modules/elasticsearch/src/lib/transport.js:267:7)
at HttpConnector. (/home/prabh_leen/bookbrainz-site/node_modules/elasticsearch/src/lib/connectors/http.js:165:7)
at IncomingMessage.wrapper (/home/prabh_leen/bookbrainz-site/node_modules/lodash/lodash.js:4929:19)
at IncomingMessage.emit (events.js:323:22)
at endReadableNT (_stream_readable.js:1204:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:32420) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line API | Node.js v21.5.0 Documentation). (rejection id: 1)
(node:32420) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@Prabhleen
I think you should go for what @mr_monkey said first.

@mr_monkey
this is the output:
image
i also checked in config.json, it’s fine.

Well, it looks like it’s not running, that’s your first problem :slight_smile:
You’ll need to got back through the installation/usage instructions you used to install redis and figure out how to get it to run

1 Like

thank you! @mr_monkey
i got my redis server running and then in my localhost, the sign-in button became active. When i click it, then i get to this page.

1 Like

I’m not sure what’s happening, but I’d say it’s something to do with the musicbrainz section in config.json, either clientID, clientSecret or callback_url.

Check that the ID and secret match your MB application.
You may want to recreate a developer application on MusicBrainz and try again configuring clientID and clientSecret accordingly.

callback_url should be "http://localhost:9099/cb"

1 Like

@mr_monkey thanks again! i created a new application and replaced the old details with new in config.json. And it worked.

2 Likes