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

Bug: FactorioClient does not respect --connect flag #3602

Open
itepastra opened this issue Jul 1, 2024 · 6 comments
Open

Bug: FactorioClient does not respect --connect flag #3602

itepastra opened this issue Jul 1, 2024 · 6 comments
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs.

Comments

@itepastra
Copy link

What happened?

I start FactorioClient.py with the --connect flag and it does not connect to the archipelago server.

It seems to connect and instantly disconnects again from the MultiServer.

the logs: FactorioClient_2024_07_01_23_16_47.txt

What were the expected results?

The client connects to the archipelago server at the specified host when it's ready.

Software

While playing

@NewSoupVi
Copy link
Member

I believe this is what this PR addresses:
#3568

@NewSoupVi NewSoupVi added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Jul 1, 2024
@qwint
Copy link
Contributor

qwint commented Jul 1, 2024

FactorioClient.py does not seem to go through the Launcher Component, so unlikely 3568 fixes this issue

@itepastra
Copy link
Author

itepastra commented Jul 1, 2024

I just tried, it does indeed not fix the issue.
I think the FactorioClient tries to connect to the multiworld server while it isn't ready for the connection yet.
So it instantly disconnects and throws an Exception: Cannot connect to a server with unknown own identity, bridge to Factorio first.. I found out while trying to make a docker file for it so I can host multiple on my pc more easily

@NewSoupVi
Copy link
Member

My bad

@sshipsey
Copy link

I am also having this issue trying to run ArchipelagoFactorioClient on a headless linux server with systemd and connect to a multiworld. I am trying to create a workaround where I can wait some time and input the /connect string via TTY but struggling.

@sshipsey
Copy link

#!/bin/bash

PIPE="/opt/Archipelago/pipe"

if [[ ! -p $PIPE ]]; then
        mkfifo $PIPE
fi

/opt/Archipelago/ArchipelagoFactorioClient --rcon-port xxxxx --rcon-password xxxxx --server-settings /opt/Archipelago/factorio/data/server-settings.json < $PIPE &

DAEMON_PID=$!

echo $DAEMON_PID
echo \r > $PIPE

sleep 10
echo "/connect archipelago.gg:xxxxx" > $PIPE

wait $DAEMON_PID
rm -f $PIPE

@itepastra rather than running the client directly, i have created this bash script
is it janky? absolutely
do i fully understand it? absolutely not
does it work? it does seems to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs.
Projects
None yet
Development

No branches or pull requests

4 participants