Getting started on MacOS

Various development-related discussions
User avatar
Zamua
Noob
Posts: 7
Joined: Fri Sep 16, 2022 9:56 pm

Getting started on MacOS

Post by Zamua »

Hello, all!

I've made a fork here: https://gitlab.com/Zamua/2009scape. I tried following the steps in the README, but I'm seeing errors.

I tried running the build, but multiple tests fail. here's some of the output below (not all)

Code: Select all

./build -mg
...
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   ExchangeTests.manyCompletedOffersAboveDefaultPriceShouldInfluencePriceUpwards:92 Price was not influenced in the expected way! New Price: 1, default: 1 ==> expected: <true> but was: <false>
[ERROR]   RegionSpecificationTests.shouldCopyExistingRegionIfRequested:31 expected: <36782> but was: <null>
[ERROR]   RegionTests.testDynamicRegionHasSameObjects:42 Dynamic and standard have differing object counts! ==> expected: <true> but was: <false>
[ERROR]   RegionTests.testObjectExistsInDynamicRegion:60 Object does not exist at expected location! ==> expected: <36782> but was: <-1>
[ERROR]   RegionTests.testObjectExistsInStandardRegion:50 Object does not exist at expected location! ==> expected: <36782> but was: <-1>
[ERROR]   RegionTests.testRegionLoad:21 Region has no objects! (Failed to parse?) ==> expected: not equal but was: <0>
...
[ERROR] Tests run: 118, Failures: 23, Errors: 34, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  14.014 s
[INFO] Finished at: 2022-09-16T19:19:27-04:00
[INFO] ------------------------------------------------------------------------
I tried a quick build, and that was successful

Code: Select all

./build -qmg
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  14.946 s
[INFO] Finished at: 2022-09-16T19:20:56-04:00
[INFO] ------------------------------------------------------------------------
then i tried to run

Code: Select all

./run
...
/Users/zamua/Dropbox/workspace/2009scape/Server/target/server-1.0.0-jar-with-dependencies.jar -> /Users/zamua/Dropbox/workspace/2009scape/builddir/server.jar
Running in parallel. All logs redirected to proper files.
[19:22:07]: [INFO] Using config file: worldprops/default.conf
[19:22:07]: [INFO] Prompting 2009scape Game World...
[19:22:07]: [INFO] Initializing cache...
[19:22:07]: [ ERR] Error loading cache index 0: no information.
[19:22:07]: [ ERR] Error loading cache index 1: no information.
[19:22:07]: [ ERR] Error loading cache index 2: no information.
[19:22:07]: [ ERR] Error loading cache index 3: no information.
[19:22:07]: [ ERR] Error loading cache index 4: no information.
[19:22:07]: [ ERR] Error loading cache index 5: no information.
[19:22:07]: [ ERR] Error loading cache index 6: no information.
[19:22:07]: [ ERR] Error loading cache index 7: no information.
[19:22:07]: [ ERR] Error loading cache index 8: no information.
[19:22:07]: [ ERR] Error loading cache index 9: no information.
[19:22:07]: [ ERR] Error loading cache index 10: no information.
[19:22:07]: [ ERR] Error loading cache index 11: no information.
[19:22:07]: [ ERR] Error loading cache index 12: no information.
[19:22:07]: [ ERR] Error loading cache index 13: no information.
[19:22:07]: [ ERR] Error loading cache index 14: no information.
[19:22:07]: [ ERR] Error loading cache index 15: no information.
[19:22:07]: [ ERR] Error loading cache index 16: no information.
[19:22:07]: [ ERR] Error loading cache index 17: no information.
[19:22:07]: [ ERR] Error loading cache index 18: no information.
[19:22:07]: [ ERR] Error loading cache index 19: no information.
[19:22:07]: [ ERR] Error loading cache index 20: no information.
Exception in thread "main" java.lang.NullPointerException
	at core.cache.Cache.getItemDefinitionsSize(Cache.java:234)
	at core.cache.def.impl.ItemDefinition.parse(ItemDefinition.java:289)
	at core.cache.Cache.init(Cache.java:69)
	at rs09.game.world.GameWorld.prompt(GameWorld.kt:166)
	at rs09.game.world.GameWorld.prompt(GameWorld.kt:153)
	at rs09.Server.main(Server.kt:63)
[1]    24450 terminated  ./run
I saw some errors that i thought may be related to not having a database setup, but I didn't see any instructions for setting up the db. I tried to get that setup myself, but then still ran into
issues
I thought maybe it's because mysql wasn't up or was on the wrong port, but it seems to be running and it's on port 3306. i saw the default.conf file specifies the db info and i think mine is the same. i have root user, no password, port 3306, localhost, and I've sourced the global.sql file

Code: Select all

brew services
...
mysql          started zamua ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
...

mysql -uroot
mysql> use global;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables
    -> ;
+------------------+
| Tables_in_global |
+------------------+
| members          |
| worlds           |
+------------------+
2 rows in set (0.00 sec)
here's the port

Code: Select all

mysql> SHOW GLOBAL VARIABLES LIKE 'PORT';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port          | 3306  |
+---------------+-------+
1 row in set (0.01 sec)
let me know if i've missed some important documentation or if you need anymore from me. thanks!
User avatar
CeikryForgotHisPass
Noob
Posts: 11
Joined: Fri Sep 16, 2022 11:48 pm
Been thanked: 1 time

Re: Getting started on MacOS

Post by CeikryForgotHisPass »

Every single error indicates that you failed to follow step 8 of the README:

Code: Select all

After setting up Git LFS, you may need to run git lfs pull in the root of the cloned repo to download essential binaries
User avatar
Zamua
Noob
Posts: 7
Joined: Fri Sep 16, 2022 9:56 pm

Re: Getting started on MacOS

Post by Zamua »

that was it thanks! appreciate it!
User avatar
Zamua
Noob
Posts: 7
Joined: Fri Sep 16, 2022 9:56 pm

Re: Getting started on MacOS

Post by Zamua »

Follow up noob question. I've cloned the legacy client, and I've built it with

Code: Select all

./gradlew build
I have the server running in a different term.

when i try to run it with

Code: Select all

./gradlew run
then i see the following error

Code: Select all

...
java.net.ConnectException: Connection refused (Connection refused)
        at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)
        at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255)
        at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.base/java.net.Socket.connect(Socket.java:609)
        at java.base/java.net.Socket.connect(Socket.java:558)
        at java.base/java.net.Socket.<init>(Socket.java:454)
        at java.base/java.net.Socket.<init>(Socket.java:264)
        at org.runite.client.Signlink.run(Signlink.java:351)
        at java.base/java.lang.Thread.run(Thread.java:829)
error_game_worldlistio_1001
I've also tried launching it via the distribution. I didn't see a readme for this project. Do you have any guidance?
User avatar
CeikryForgotHisPass
Noob
Posts: 11
Joined: Fri Sep 16, 2022 11:48 pm
Been thanked: 1 time

Re: Getting started on MacOS

Post by CeikryForgotHisPass »

Zamua wrote: Sat Sep 17, 2022 1:10 am Do you have any guidance?
Select "local server" in the launcher.
User avatar
Zamua
Noob
Posts: 7
Joined: Fri Sep 16, 2022 9:56 pm

Re: Getting started on MacOS

Post by Zamua »

i don't see any opportunity to select local "server anywhere" i don't think, where should I be looking? when i run ./gradlew run the client loads maybe ~80% of the way then shows the

Code: Select all

error_game_worldlistio_1001
error

i do see this config file https://gitlab.com/Zamua/legacy-client/ ... onfig.json with an ip address and server port. the ip is "localhost" and the port matches the one for the server. i don't know what the wl_port and js5_port are for though
User avatar
CeikryForgotHisPass
Noob
Posts: 11
Joined: Fri Sep 16, 2022 11:48 pm
Been thanked: 1 time

Re: Getting started on MacOS

Post by CeikryForgotHisPass »

You do not seem to be aware that we have a website and host a live server ourselves (which is the entire focus of the project.) The launcher is what you use to launch the client, not the client itself. The launcher can be obtained by pressing "Play Now"
User avatar
aweinstock
Developer
Posts: 31
Joined: Thu Aug 11, 2022 1:17 am
Been thanked: 14 times

Re: Getting started on MacOS

Post by aweinstock »

Try changing wl_port to 43595.
User avatar
Zamua
Noob
Posts: 7
Joined: Fri Sep 16, 2022 9:56 pm

Re: Getting started on MacOS

Post by Zamua »

CeikryForgotHisPass wrote: Sat Sep 17, 2022 1:28 am You do not seem to be aware that we have a website and host a live server ourselves (which is the entire focus of the project.) The launcher is what you use to launch the client, not the client itself. The launcher can be obtained by pressing "Play Now"
apologies I did not provide enough context. I'm trying to get the client to connect to my own instance of the server for personal development/educational reasons. I'm not trying to connect to the main game
aweinstock wrote: Sat Sep 17, 2022 1:31 am Try changing wl_port to 43595.
I'll try this thanks!
User avatar
CeikryForgotHisPass
Noob
Posts: 11
Joined: Fri Sep 16, 2022 11:48 pm
Been thanked: 1 time

Re: Getting started on MacOS

Post by CeikryForgotHisPass »

Zamua wrote: Sat Sep 17, 2022 1:35 am apologies I did not provide enough context. I'm trying to get the client to connect to my own instance of the server for personal development/educational reasons. I'm not trying to connect to the main game
That is why the launcher I'm pointing you to has a "Local Server" option.
Post Reply