Setup Issue: MJAI Not Responding To POST Requests
Closed this issue · 1 comments
Describe the bug
I get this bug when starting a friendly game in web browser
I get a Remote Disconnection error on the terminal when entering a game.
I started up my own docker instances from akagi.log
and I can do GET request with 200 OK. But the code always fails when attempting this POST request:
[{"type": "start_game", "id": 2}]
I cannot do POST requests to my docker instances with the above payload (and neither can the code in player.py
react
function.
I think the MJAI Server is not setup properly or something?
To Reproduce
Steps to reproduce the behavior:
- Run
python mitm_playwright.py
- Run Proxifier
- Run
python client.py
- Start a friendly game with AI bots
Expected behavior
The client.py
terminal to show the normal screen reading information for the game.
Screenshots
Full Error:
![image](https://private-user-images.githubusercontent.com/13015141/298317999-595833dd-da8e-4ecd-aec9-8f408fc23171.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1ODAwNjYsIm5iZiI6MTcyNDU3OTc2NiwicGF0aCI6Ii8xMzAxNTE0MS8yOTgzMTc5OTktNTk1ODMzZGQtZGE4ZS00ZWNkLWFlYzktOGY0MDhmYzIzMTcxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDA5NTYwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM5NWJlNDVkZTM4YzMxYzZiZTljOWM4ODlhODFhMjllNzdmODNiZmRlZmJiNzhmNjgwYWNjOGE5ZTNiNzg5OTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1XGXBaVh8zXPY--7IFJWd_mCu-jN0J6G2S_Y9wf_NU0)
Docker instances:
![image](https://private-user-images.githubusercontent.com/13015141/298319556-509534d8-2f20-4bc4-b2fd-f5be5413f5b7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1ODAwNjYsIm5iZiI6MTcyNDU3OTc2NiwicGF0aCI6Ii8xMzAxNTE0MS8yOTgzMTk1NTYtNTA5NTM0ZDgtMmYyMC00YmM0LWIyZmQtZjViZTU0MTNmNWI3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDA5NTYwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmZDhkMzlhOThlNDUxMTI4MGJmOWZhOTFlM2M2MzNlODRmZDFkNTliMDdmOTMwODQ5MDhmMWI1MWQ5ZTg4NTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.dOXmjAAterwu-RXgRHsmy2ocuV8izB5G2ERtyW5toMI)
MITM Running correctly:
![image](https://private-user-images.githubusercontent.com/13015141/298318037-d4b719e1-d472-448a-a173-26e7a5d31096.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1ODAwNjYsIm5iZiI6MTcyNDU3OTc2NiwicGF0aCI6Ii8xMzAx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cz0zMDAmWC1BbXotU2lnbmF0dXJlPTgwNTg3NjQ0YWIwOTNiNjIwYmY0OGJlNzBkNmQyMmNkMzQyNDhjODM4YzlhZjMzN2JmODcxNjQzYWFiN2I3ZWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-yIpusbnyc6fWMUdBkTZZ90piIJqeL59d2unz76VsqI)
![image](https://private-user-images.githubusercontent.com/13015141/298318969-83bcfbaa-5cfb-4e4e-beae-4315cea0df5a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1ODAwNjYsIm5iZiI6MTcyNDU3OTc2NiwicGF0aCI6Ii8xMzAxNTE0MS8yOTgzMTg5NjktODNiY2ZiYWEtNWNmYi00ZTRlLWJlYWUtNDMxNWNlYTBkZjVhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDA5NTYwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlOTgxNWVhMWU0N2ExNzJkYTZmYTFjN2NjYjIxNGM2MzMzNjg0ZDY2YWU1OTkyNzBkODhkNDI1MjJkZGZiMDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.J5msYEPEZ3drjLy3pIEgee8n1xHezAueT8fI4kzZiEU)
Web browser playing the game from playwright:
![image](https://private-user-images.githubusercontent.com/13015141/298319161-93ab011b-aa0a-4cc5-966d-a2743c6f32a9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1ODAwNjYsIm5iZiI6MTcyNDU3OTc2NiwicGF0aCI6Ii8xMzAxNTE0MS8yOTgzMTkxNjEtOTNhYjAxMWItYWEwYS00Y2M1LTk2NmQtYTI3NDNjNmYzMmE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDA5NTYwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRmMmNiOWU5Y2QwNjkyMTkzODY1YjRiMzMyOTFjMGY1MjI4MzJjN2YwYTgyOWJkZWEyYTk4NjY3ZWVjOWEzZmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.fyO-9_QAUM53A-zy2H_kHEP2HAlDRyMmKddINjk4nXM)
Desktop (please complete the following information):
- OS: Windows
- Browser: Chrome
Additional context
I debugged the problem to the following:
Solved on discord. The user didn't have the correct bot.zip placed in the ./players folder.