https://supertokens.com/ logo
#support-questions
Title
# support-questions
n

Nejitha Sunny

06/08/2022, 11:11 AM
@rp Hai rp I am trying to build supertoken-core from the source.I am following the steps mentioned in git https://github.com/supertokens/supertokens-core/wiki/Building-from-source. But I am unable to setup env.😭
r

rp

06/08/2022, 11:12 AM
hey @Nejitha Sunny
hey you run
./loadModules
?
n

Nejitha Sunny

06/08/2022, 11:15 AM
Nop.
r

rp

06/08/2022, 11:17 AM
The first step of the wiki says to setup everything from the contributing guide, which has this step
can you please follow that?
n

Nejitha Sunny

06/08/2022, 11:20 AM
Awaiting for your reaponse
r

rp

06/08/2022, 11:29 AM
Yes
Those errors are fine.
n

Nejitha Sunny

06/09/2022, 11:41 AM
@rp Hai rp I tried to build the source.Followed the steps mentioned above.While i execute the test cases i am stuck with one issue.I am using jdk 17 instead of 15.And executing the commands in Ubuntu with the help of wsl
r

rp

06/09/2022, 11:44 AM
ah right. You need to use open JDK 15. Only then will it work
n

Nejitha Sunny

06/09/2022, 11:45 AM
@rp Ok.
@rp Hai rp I have one doubt. How can we debug supertoken core?How the logs are managed inside the core?
r

rp

06/10/2022, 12:11 PM
the logs are stored in the logs/info.log or logs/error.log files in the supertokens-root folder
n

Nejitha Sunny

06/10/2022, 12:42 PM
ok
@rp Hey rp. I tried cloning the super token core with mysql-plugin.After loading the modules.Its showing the issue in ConfigTest.java class.I am not using any external jars. Can u pls help me to resolve this issue.
r

rp

06/13/2022, 1:14 PM
i have never faced this issue. Might need to investigate. But start by restarting the IDE
n

Nejitha Sunny

06/14/2022, 7:00 AM
@rp Hai rp I tried connecting my db to the supertoken root.I followed the steps mentioned in the contribution.mb.I gave the config as below in config.yaml file inside mysql-plugin codebase. mysql_user: "username" mysql_password: "password" mysql_host: "host" mysql_port: 3306 mysql_database_name: "supertokens". I am running the app in Ubuntu env using wsl2.But its not connecting to the sql db.Did i miss any configurations.I gave all previlages to the sql user also.
r

rp

06/14/2022, 7:06 AM
did you give the correct values for the mysql_host ?
n

Nejitha Sunny

06/14/2022, 7:09 AM
@rp Yea.I am able to connect to db through Mysql workbench.Those config I added inside config.yaml file but its not connecting to the db.
r

rp

06/14/2022, 7:09 AM
have you created a db called supertokens in mysql?
n

Nejitha Sunny

06/14/2022, 7:09 AM
I need to add these config inside mysql-plugin codebase ryt?
I created another db.Not supertokens
r

rp

06/14/2022, 7:10 AM
then in the config.yaml file, you need to give the right value for
mysql_database_name
n

Nejitha Sunny

06/14/2022, 7:10 AM
But I mentioned the name inside mysql_database_name:
yea dats done
r

rp

06/14/2022, 7:11 AM
which config.yaml file did you edit? the one in temp folder?
you should edit the devConfig.yaml file inside supertokens-mysql-plugin folder
and then rerun
startTestEnv --wait
and then then
cp ./temp/config.yaml .
and then the java command
n

Nejitha Sunny

06/14/2022, 7:12 AM
Nop the one inside supertoken-mysql-plugin
r

rp

06/14/2022, 7:12 AM
can you verify the contents of the config.yaml file that is generated (the one in the temp folder)
n

Nejitha Sunny

06/14/2022, 7:12 AM
ok
@rp config.yaml file inside temp folder is not showing the sql configurations which i mention inside the file in supertoken-mysql-plugin module
r

rp

06/14/2022, 7:37 AM
hmm. Which config did you edit? And did you rerun
startTestEnv --wait
after making the edit?
n

Nejitha Sunny

06/14/2022, 8:20 AM
@rp I edited the config.yaml file inside supertoken-mysql-plugin.And I rerun tat script also
r

rp

06/14/2022, 8:21 AM
hmm. that's strange
maybe you can edit the config.yaml file in the temp folder directly before copying it and try
n

Nejitha Sunny

06/15/2022, 6:14 AM
@rp Hey rp.Its working.Thank u soo much for the support.I have one doubt I would like to customise the config.yaml file.Instead of giving the mysql configuration directly in side the yaml file. I would like to configure the mysql db details through a rancher.Is it possible to do that?
r

rp

06/15/2022, 6:17 AM
you can change the core's logic however you like. So anything is possible haha
n

Nejitha Sunny

06/15/2022, 6:22 AM
@rp So if we want to configure the db details through rancher we need to change the logic inside supertoken core also?
r

rp

06/15/2022, 6:26 AM
yea probably. Im not too familiar with Rancher
So im not sure.
n

Nejitha Sunny

06/15/2022, 6:34 AM
ok