project-fika / Fika-Server

Server-side changes to make multiplayer work
Other
135 stars 36 forks source link

[bug] 3.9.3-8: backdoor quest only works for host. #76

Closed r-pufky closed 2 months ago

r-pufky commented 2 months ago

The quest backdoor does not trigger completed for non-host players, even with requirements met; quest progression sharing turn on or off.

we were only able to trigger this quest completion by having each player who needed it completed hosting the raid themselves. Quest progression sharing toggled on or off did not fix the issue. Multiple SPT/fika-server/fika-client versions did not fix the issue.

we have only able to complete it on the host system; tested SPT 3.9.5, 3.9.6, 3.9.8; with corresponding Fika server/plugins.

The only additional information is that the non-host players do not see the light switched on, indicating a potential state sync issue with this quest.

Lacyway commented 2 months ago

What light switch are you referring to? Can you provide screenshots?

Lacyway commented 2 months ago

Also, provide some logs that I can scan through.

Lacyway commented 2 months ago

For reference, I just tried this on a dedicated session as a client and it finished for me. So I'm going to need more information to figure this out.

r-pufky commented 2 months ago

I have kept complete archives of each eft-fika server build between upgrades, so I can send you the complete server instance if you want to look at that as well. All clients are confirmed to have always been on the same SPT/Fika versions.

3.9.5

Versions

Players

662de5d10000a51fe407c3f4

662de733000539ddde3e7e6c

Server

Server build steps

apt update && apt dist-upgrade
apt install sudo vim ssh git git-lfs
adduser {USER} sudo
adduser eft
sudo mkdir /opt/eft
sudo chown eft:eft /opt/eft
sudo su - eft
export SPT_TAG=3.9.5
export FIKA_TAG=v2.2.7
export NODE_VERSION=20.11.1

git clone https://github.com/nvm-sh/nvm ~/.nvm
. ~/.nvm/nvm.sh
source ~/.bashrc
nvm install $NODE_VERSION

git clone --depth 1 --branch $SPT_TAG https://dev.sp-tarkov.com/SPT/Server ~/srv
cd ~/srv/project
git checkout HEAD^
git lfs fetch --all
git lfs pull
sed -i '/setEncoding/d' ~/srv/project/src/Program.ts
npm install
npm run build:release -- --arch=x64 --platform=linux
mv build/* /opt/eft/
rm -rfv ~/srv

git clone --branch $FIKA_TAG https://github.com/project-fika/Fika-Server /opt/eft/user/mods/fika-server
cd /opt/eft/user/mods/fika-server
git checkout HEAD^
npm install

cd /opt/eft
nohup timeout --preserve-status 25s ./SPT.Server.exe >/dev/null 2>&1
sed -i 's/127.0.0.1/0.0.0.0/g' /opt/eft/SPT_Data/Server/configs/http.json
chown -R eft:eft .

vim /opt/eft/user/mods/fika-server/assets/configs/fika.jsonc
  {
    "client": {
      "useBtr": true,
      "friendlyFire": true,
      "dynamicVExfils": false,
      "allowFreeCam": false,
      "allowSpectateFreeCam": true,
      "allowItemSending": true,
      "blacklistedItems": [],
      "forceSaveOnDeath": false,
      "mods": {
        "required": [],
        "optional": []
      },
      "useInertia": true,
      "sharedQuestProgression": true
    },
    "server": {
      "giftedItemsLoseFIR": false,
      "launcherListAllProfiles": false,
      "sessionTimeout": 5,
      "showDevProfile": false,
      "showNonStandardProfile": false
    },
    "natPunchServer": {
      "enable": false,
      "port": 6790,
      "natIntroduceAmount": 1
    }
    "dedicated": {
      "profiles": {
        "amount": 0
      },
      "scripts": {
        "generate": true,
        "forceIp": ""
      }
    },
    "background": {
      "enable": true,
      "easteregg": false
    }
  }

sed -i 's/CanRequireOnRagfair\":\ false/CanRequireOnRagfair\":\ true/g' /opt/eft/SPT_Data/Server/database/templates/items.json
sed -i 's/CanSellOnRagfair\":\ false/CanSellOnRagfair\":\ true/g' /opt/eft/SPT_Data/Server/database/templates/items.json

vim /etc/systemd/system/eft.service
  [Unit]
  Description=Escape from Tarkov (Coop) SPT/FIKA Server.

  [Service]
  Type=exec
  WorkingDirectory=/opt/eft
  ExecStart=/opt/eft/SPT.Server.exe
  Restart=on-failure
  User=eft
  Group=eft

  [Install]
  WantedBy=default.target

systemctl daemon-reload
systemctl enable eft
systemctl start eft

Log

server-2024-08-17.log

Attached is the redacted completion log from the server side, where client 662de733000539ddde3e7e6c hosted the raid, and completed the quest successfully. see line 9765

Setup

  ┌───────────────┐            ┌───────────────┐  
  │client f4      │            │client 6c      │  
  │host           │            │remote network │  
  │back door done │            │back door start│  
  │local network  │            │               │  
  │               │            │               │  
  │               │            │               │  
  │               │            │               │  
  │               │            │               │  
  │               │            │               │  
  └───────────────┘            └───────────────┘  

  ┌───────────────┐                               
  │server         │                               
  │local network  │                               
  │               │                               
  │               │                               
  │               │                               
  │               │                               
  │               │                               
  │               │                               
  │               │                               
  └───────────────┘                               

screenshot of the objective and the button to press to get out of D2.

backdoor-switch-door-exit-d2

We'll reset server state to 3.9.8 this week and reproduce again with same setup; and grab logs from both clients as well as the server.

Lacyway commented 2 months ago

I need the client's log file after a raid where it fails to complete. Quest progression is 100% client based and local, so are the door states/levers.

Lacyway commented 2 months ago

Let me know when you have updated and tried again. Thanks.

r-pufky commented 2 months ago

Let me know when you have updated and tried again. Thanks.

no worries. will get this done shortly! Thanks for looking into it.

r-pufky commented 2 months ago

Successfully reproduced. Here's the logs for the server, client-host, and client-client.

2024-08-20-backdoor-reproduction.tar.gz

Client

Server

Lacyway commented 2 months ago

Unfortunately these are the wrong log files.

I need %AppData%\..\LocalLow\Battlestate Games\EscapeFromTarkov\Player.log from the client.

r-pufky commented 2 months ago

2024-08-20-client-appdata-logs.tar.gz

Here's the logs for the host and the client from appdata. If you need cleaner logs we can clear and reproduce again tonight or tomorrow.

Lacyway commented 2 months ago

Everything looks fine in the log. Could you please provide me a video of how it looks for the client? I just did it back to back 2 times, works every time so I'm very lost here.

r-pufky commented 2 months ago

Sure! We will get it setup and run with a video. Might be a day or two.

On Wed, Aug 21, 2024 at 23:32 Lacyway @.***> wrote:

Everything looks fine in the log. Could you please provide me a video of how it looks for the client? I just did it back to back 2 times, works every time so I'm very lost here.

— Reply to this email directly, view it on GitHub https://github.com/project-fika/Fika-Server/issues/76#issuecomment-2303887193, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEOQPUHGU4H3TSZJ4BLSKTZSWAWZAVCNFSM6AAAAABMYWCHW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBTHA4DOMJZGM . You are receiving this because you authored the thread.Message ID: @.***>

r-pufky commented 2 months ago

Thanks for waiting -- reproduced with videos.

Shared quest progression is enabled; same versions as above

client host logs

client passive logs|client passive video

client-active.tar.gz|client active video

Lacyway commented 2 months ago

Do you have auto extract on?

r-pufky commented 2 months ago

I believe everyone has auto-extract on.

Lacyway commented 2 months ago

Can you try without? Just enable free cam, no bots and do a quick run.

r-pufky commented 2 months ago

Can you try without? Just enable free cam, no bots and do a quick run.

Will do. We will run it tomorrow, they have already gone to bed for the night.

r-pufky commented 2 months ago

We just re-ran the test. with auto-extract disabled on all the machines, the mission finished correctly for everyone (client-active, client-passive).

Lacyway commented 2 months ago

We just re-ran the test. with auto-extract disabled on all the machines, the mission finished correctly for everyone (client-active, client-passive).

Sweet, I'll fix this for 3.10. Thanks!