Hey,I was setting up the dev enviroment of BB site, but got stuck in auth. it isn't working properly it stucks at loading screen when i try to signup. please help!
2021-11-26 33025, 2021
monkey
Hi Shubh !
2021-11-26 33042, 2021
Shubh
Hi!
2021-11-26 33013, 2021
monkey
Were you able to create an application token on the MusicBrainz website, and add it to your configuration?
Not sure what is happening, but it looks like the POST request failed in a strange way.
2021-11-26 33006, 2021
Shubh
also i set up the test database (change the config for database to BB_test and created the bb_test database as written in instruction ) but no data is showing in site, is it normal behaviour?
2021-11-26 33021, 2021
monkey
Did you try refreshing the page? Perhaps some files were not done compiling or something like that
2021-11-26 33010, 2021
monkey
If you set up a new database, then there will be no data in it, unless I'm misunderstanding what you are saying.
2021-11-26 33035, 2021
Shubh
I checked the docker build logs and didn't find any error related to compilation of files.
2021-11-26 33015, 2021
monkey
And refreshing the page you get the same result?
2021-11-26 33035, 2021
monkey
As for the database, the scripts we have available to download and use the latest database dump are pointing to the local database named `bookbrainz`, so you'll have to change that if you want to use another database name: https://github.com/bookbrainz/bookbrainz-site/blo…
2021-11-26 33035, 2021
monkey
See the part where it says `-d bookbrainz` , that's the database name
2021-11-26 33007, 2021
Shubh
and during registration where it shows dropdown for gender selection is'tnt showing male/female rather it says no result found.
2021-11-26 33002, 2021
monkey
Right, that's because the genders are retrieved from the database, and there's currently no data in there.
2021-11-26 33051, 2021
Shubh
Ohh so is that reason it showing undefined? but it is optional i think.
2021-11-26 33056, 2021
monkey
So let's go for one thing at a time. Database. Are you running postgres and other dependencies with Docker?
2021-11-26 33004, 2021
Shubh
Yes every dependency container is running redis postgres and elastic.
That will create a database named `bookbrainz` (so you'll have to change in your config from bb_test to bookbrainz)
2021-11-26 33022, 2021
Shubh
I just have to run that script after changing the database name to BB_test, right?
2021-11-26 33054, 2021
monkey
Well, the script expects that there is a database named `bookbrainz` specifically, not BB_test
2021-11-26 33022, 2021
monkey
So you can either use the standard DB name bookbrainz, or modify the script to use BB_test instead
2021-11-26 33046, 2021
monkey
I'd recommend option 1, it'll be easier later to have everything standard
2021-11-26 33048, 2021
Shubh
Hmm, lemme try
2021-11-26 33057, 2021
monkey
The whole section at the end of the readme about `bookbrainz_test` is about running tests locally, and you won't have data in there or use it to run the website locally. It's only for automated tests.
2021-11-26 33053, 2021
Shubh
So i will use bookbrainz database.
2021-11-26 33040, 2021
monkey
Great. You should then be able to run this command to create the database and download the dump automatically: ./scripts/database-init-docker.sh
2021-11-26 33012, 2021
Shubh
Thankyou very much monkey
2021-11-26 33019, 2021
monkey
No problem :)
2021-11-26 33036, 2021
monkey
Let me know once that's done and we can look at the next step together.
2021-11-26 33058, 2021
monkey
While that is running, you can already modify your configuration file to use the database "bookbrainz"
2021-11-26 33002, 2021
Shubh
Yes I will let you know soon i'm done with setting the db.
2021-11-26 33020, 2021
Shubh
Hmm i will do that
2021-11-26 33027, 2021
Shubh has quit
2021-11-26 33007, 2021
Shubh joined the channel
2021-11-26 33009, 2021
Shubh
Hello monkey?
2021-11-26 33017, 2021
monkey
Yup
2021-11-26 33046, 2021
Shubh
I was looking at the issues in bug tracker and found one good first issue
2021-11-26 33010, 2021
Shubh
it was related to api
2021-11-26 33012, 2021
monkey
Nice ! What's the ticket number? We've got a thing on here that gives us more details
Hmm it should return with 400 code or something rather than showing that write a note page?
2021-11-26 33014, 2021
monkey
It should indeed definitely not return that deletion page with the note thing
2021-11-26 33025, 2021
monkey
And I guess a 400 error seems appropriate
2021-11-26 33009, 2021
monkey
Or maybe a 409 (Conflict)
2021-11-26 33039, 2021
monkey
But what we do is send an html error page with a detailed error message, rather than just send back an error code
2021-11-26 33002, 2021
Shubh
So i have to create error page as well?
2021-11-26 33015, 2021
Shubh
I can do that , i think
2021-11-26 33016, 2021
monkey
No, that already exists, let me find an example
2021-11-26 33048, 2021
monkey
Ahaa, here we go
2021-11-26 33055, 2021
Shubh
"psql: error: could not connect to server: could not translate host name "postgres" to address: Name or service not known" , i check the postgres container is running , was it looking for local installion of postgres ?
2021-11-26 33029, 2021
monkey
Where is that error coming from?
2021-11-26 33011, 2021
Shubh
that download and import db script , after the download complete it shows this error
2021-11-26 33056, 2021
monkey
I see. That's strange.
2021-11-26 33013, 2021
monkey
Can you try running it again?
2021-11-26 33018, 2021
Shubh
" if [ $? -ne 0 ] ", does this check for the error code thrown by curl?
2021-11-26 33013, 2021
Shubh
might be internet issue i am trying again.
2021-11-26 33026, 2021
monkey
Looks like a separate error
2021-11-26 33045, 2021
monkey
"psql: error: could not connect to server" doesn not look like an issue with downloading the dump
2021-11-26 33024, 2021
monkey
Did you modify the docker-compose.yml file in any way, by any chance?
2021-11-26 33015, 2021
Shubh
No i didn't touch that file
2021-11-26 33040, 2021
monkey
OK. I don't understand why the container can't reach the postgres container.
2021-11-26 33034, 2021
Shubh
Hmm i think it has something to do with my internet.
2021-11-26 33038, 2021
monkey
Are there any errors in the postgres container? you can run `docker logs postgres` to see that
OK, I see no obvious error. Let's try something: take everything down first (run the command `./stop.sh`), and then run the download-import-script command yet again
2021-11-26 33040, 2021
monkey
If it fails again, I'd like to see the output of `docker logs postgres` again
2021-11-26 33019, 2021
Shubh
Btw which example you was talking about?
2021-11-26 33048, 2021
monkey
I'll write all the details relating to the ticket in the ticket itself, it'll be easier
2021-11-26 33053, 2021
Shubh
download complete but same error , shouldn't i run the postgres container first before running the script?
2021-11-26 33015, 2021
monkey
Part of the script should already automatically be doing that
2021-11-26 33024, 2021
monkey
Is the container not running currently?
2021-11-26 33033, 2021
Shubh
no it isn't
2021-11-26 33055, 2021
monkey
Ah. That's an issue.
2021-11-26 33004, 2021
monkey
What does docker logs postgres output?
2021-11-26 33021, 2021
Shubh
Error: No such container: postgres
2021-11-26 33059, 2021
monkey
Hm. Let me try locally
2021-11-26 33001, 2021
Shubh
does script also run build the container? i don't find any code related to that in that script file, am i missing something?
2021-11-26 33007, 2021
monkey
Yes, that's the first line of database-init-docker.sh
2021-11-26 33025, 2021
Shubh
but i didn't run that script
2021-11-26 33050, 2021
Shubh
i ran that download-import-dump.sh script after stopping all the container via stop.sh
2021-11-26 33032, 2021
monkey
Ah, then yes, that's the issue. Sorry I got something wrong.