py499372727 / AgentSims

AgentSims is an easy-to-use infrastructure for researchers from all disciplines to test the specific capacities they are interested in.
MIT License
773 stars 99 forks source link

Keep crashing when open index.html #6

Closed shengyu-meng closed 1 year ago

shengyu-meng commented 1 year ago

I tried to setup agentsims under windows11/minconda, and everything looks working well, except everytime I try to open index.html, the page will crash then automatically refreash once it load up to the GUI.

(agentsims) D:\github\00_AGI\AgentSims>sh restart.sh process python server not exist process python server restarted ----------Server Started---------- somebody linked. somebody is logging out. somebody linked. somebody is logging out. somebody linked. somebody is logging out. somebody linked. somebody is logging out. somebody linked. somebody is logging out. somebody linked. somebody is logging out. somebody linked. somebody is logging out. somebody linked. send: {"uri":"command.auth.Register","method":"POST","data":{"nickname":"Mayor","email":"Lixing@163.com","cryptoPWD":"123456"}} Player-10001 login {'email': 'Lixing@163.com', 'nickname': 'Mayor', 'cryptoPWD': '123456', 'uid': 'Player-10001', 'buildings': [{'building_id': 1, 'building_type': 3, 'name': 'dessert shop', 'x': 3, 'y': 1}, {'building_id': 2, 'building_type': 4, 'name': 'gym', 'x': 3, 'y': 2}, {'building_id': 3, 'building_type': 5, 'name': 'houseZ', 'x': 2, 'y': 4}, {'building_id': 4, 'building_type': 6, 'name': 'park', 'x': 4, 'y': 2}], 'npcs': [{'uid': 'NPC-10001', 'homeBuilding': 3, 'asset': 0, 'assetName': 'premade_01', 'model': 'gpt-4', 'memorySystem': 'LongShortTermMemories', 'planSystem': 'QAFramework', 'workBuilding': 0, 'nickname': 'Alan', 'bio': 'Alan is a genius with outstanding talents and is the inventor of computer. Alan has an introverted personality and is only interested in the research he foucues on.', 'goal': 'Promoting the Process of Computer Research', 'cash': 10000, 'x': 50, 'y': 71}, {'uid': 'NPC-10002', 'homeBuilding': 3, 'asset': 3, 'assetName': 'premade_04', 'model': 'gpt-4', 'memorySystem': 'LongShortTermMemories', 'planSystem': 'QAFramework', 'workBuilding': 0, 'nickname': 'pH', 'bio': 'pH is a positive, cheerful, optimistic but somewhat crazy girl who dares to try and explore. She loves food, loves life, and hopes to bring happiness to everyone.', 'goal': 'Taste all the delicious food and become a gourmet or chef.', 'cash': 10000, 'x': 52, 'y': 73}]} bound websocket to Player-10001 Player-10001 logging in at 2023-08-21 16:36:09 Player-10001 is logging out somebody linked. send: {"uri":"command.auth.Register","method":"POST","data":{"nickname":"Mayor","email":"Lixing@163.com","cryptoPWD":"123456"}} Player-10001 login {'email': 'Lixing@163.com', 'nickname': 'Mayor', 'cryptoPWD': '123456', 'uid': 'Player-10001', 'buildings': [{'building_id': 1, 'building_type': 3, 'name': 'dessert shop', 'x': 3, 'y': 1}, {'building_id': 2, 'building_type': 4, 'name': 'gym', 'x': 3, 'y': 2}, {'building_id': 3, 'building_type': 5, 'name': 'houseZ', 'x': 2, 'y': 4}, {'building_id': 4, 'building_type': 6, 'name': 'park', 'x': 4, 'y': 2}], 'npcs': [{'uid': 'NPC-10001', 'homeBuilding': 3, 'asset': 0, 'assetName': 'premade_01', 'model': 'gpt-4', 'memorySystem': 'LongShortTermMemories', 'planSystem': 'QAFramework', 'workBuilding': 0, 'nickname': 'Alan', 'bio': 'Alan is a genius with outstanding talents and is the inventor of computer. Alan has an introverted personality and is only interested in the research he foucues on.', 'goal': 'Promoting the Process of Computer Research', 'cash': 10000, 'x': 50, 'y': 71}, {'uid': 'NPC-10002', 'homeBuilding': 3, 'asset': 3, 'assetName': 'premade_04', 'model': 'gpt-4', 'memorySystem': 'LongShortTermMemories', 'planSystem': 'QAFramework', 'workBuilding': 0, 'nickname': 'pH', 'bio': 'pH is a positive, cheerful, optimistic but somewhat crazy girl who dares to try and explore. She loves food, loves life, and hopes to bring happiness to everyone.', 'goal': 'Taste all the delicious food and become a gourmet or chef.', 'cash': 10000, 'x': 52, 'y': 73}]} bound websocket to Player-10001 Player-10001 logging in at 2023-08-21 16:36:17 Player-10001 is logging out somebody linked. send: {"uri":"command.auth.Register","method":"POST","data":{"nickname":"Mayor","email":"Lixing@163.com","cryptoPWD":"123456"}} Player-10001 login {'email': 'Lixing@163.com', 'nickname': 'Mayor', 'cryptoPWD': '123456', 'uid': 'Player-10001', 'buildings': [{'building_id': 1, 'building_type': 3, 'name': 'dessert shop', 'x': 3, 'y': 1}, {'building_id': 2, 'building_type': 4, 'name': 'gym', 'x': 3, 'y': 2}, {'building_id': 3, 'building_type': 5, 'name': 'houseZ', 'x': 2, 'y': 4}, {'building_id': 4, 'building_type': 6, 'name': 'park', 'x': 4, 'y': 2}], 'npcs': [{'uid': 'NPC-10001', 'homeBuilding': 3, 'asset': 0, 'assetName': 'premade_01', 'model': 'gpt-4', 'memorySystem': 'LongShortTermMemories', 'planSystem': 'QAFramework', 'workBuilding': 0, 'nickname': 'Alan', 'bio': 'Alan is a genius with outstanding talents and is the inventor of computer. Alan has an introverted personality and is only interested in the research he foucues on.', 'goal': 'Promoting the Process of Computer Research', 'cash': 10000, 'x': 50, 'y': 71}, {'uid': 'NPC-10002', 'homeBuilding': 3, 'asset': 3, 'assetName': 'premade_04', 'model': 'gpt-4', 'memorySystem': 'LongShortTermMemories', 'planSystem': 'QAFramework', 'workBuilding': 0, 'nickname': 'pH', 'bio': 'pH is a positive, cheerful, optimistic but somewhat crazy girl who dares to try and explore. She loves food, loves life, and hopes to bring happiness to everyone.', 'goal': 'Taste all the delicious food and become a gourmet or chef.', 'cash': 10000, 'x': 52, 'y': 73}]} bound websocket to Player-10001 Player-10001 logging in at 2023-08-21 16:36:25 Player-10001 is logging out somebody linked. send: {"uri":"command.auth.Register","method":"POST","data":{"nickname":"Mayor","email":"Lixing@163.com","cryptoPWD":"123456"}} Player-10001 login {'email': 'Lixing@163.com', 'nickname': 'Mayor', 'cryptoPWD': '123456', 'uid': 'Player-10001', 'buildings': [{'building_id': 1, 'building_type': 3, 'name': 'dessert shop', 'x': 3, 'y': 1}, {'building_id': 2, 'building_type': 4, 'name': 'gym', 'x': 3, 'y': 2}, {'building_id': 3, 'building_type': 5, 'name': 'houseZ', 'x': 2, 'y': 4}, {'building_id': 4, 'building_type': 6, 'name': 'park', 'x': 4, 'y': 2}], 'npcs': [{'uid': 'NPC-10001', 'homeBuilding': 3, 'asset': 0, 'assetName': 'premade_01', 'model': 'gpt-4', 'memorySystem': 'LongShortTermMemories', 'planSystem': 'QAFramework', 'workBuilding': 0, 'nickname': 'Alan', 'bio': 'Alan is a genius with outstanding talents and is the inventor of computer. Alan has an introverted personality and is only interested in the research he foucues on.', 'goal': 'Promoting the Process of Computer Research', 'cash': 10000, 'x': 50, 'y': 71}, {'uid': 'NPC-10002', 'homeBuilding': 3, 'asset': 3, 'assetName': 'premade_04', 'model': 'gpt-4', 'memorySystem': 'LongShortTermMemories', 'planSystem': 'QAFramework', 'workBuilding': 0, 'nickname': 'pH', 'bio': 'pH is a positive, cheerful, optimistic but somewhat crazy girl who dares to try and explore. She loves food, loves life, and hopes to bring happiness to everyone.', 'goal': 'Taste all the delicious food and become a gourmet or chef.', 'cash': 10000, 'x': 52, 'y': 73}]} bound websocket to Player-10001 Player-10001 logging in at 2023-08-21 16:36:34 Player-10001 is logging out somebody linked. send: {"uri":"command.auth.Register","method":"POST","data":{"nickname":"Mayor","email":"Lixing@163.com","cryptoPWD":"123456"}} Player-10001 login {'email': 'Lixing@163.com', 'nickname': 'Mayor', 'cryptoPWD': '123456', 'uid': 'Player-10001', 'buildings': [{'building_id': 1, 'building_type': 3, 'name': 'dessert shop', 'x': 3, 'y': 1}, {'building_id': 2, 'building_type': 4, 'name': 'gym', 'x': 3, 'y': 2}, {'building_id': 3, 'building_type': 5, 'name': 'houseZ', 'x': 2, 'y': 4}, {'building_id': 4, 'building_type': 6, 'name': 'park', 'x': 4, 'y': 2}], 'npcs': [{'uid': 'NPC-10001', 'homeBuilding': 3, 'asset': 0, 'assetName': 'premade_01', 'model': 'gpt-4', 'memorySystem': 'LongShortTermMemories', 'planSystem': 'QAFramework', 'workBuilding': 0, 'nickname': 'Alan', 'bio': 'Alan is a genius with outstanding talents and is the inventor of computer. Alan has an introverted personality and is only interested in the research he foucues on.', 'goal': 'Promoting the Process of Computer Research', 'cash': 10000, 'x': 50, 'y': 71}, {'uid': 'NPC-10002', 'homeBuilding': 3, 'asset': 3, 'assetName': 'premade_04', 'model': 'gpt-4', 'memorySystem': 'LongShortTermMemories', 'planSystem': 'QAFramework', 'workBuilding': 0, 'nickname': 'pH', 'bio': 'pH is a positive, cheerful, optimistic but somewhat crazy girl who dares to try and explore. She loves food, loves life, and hopes to bring happiness to everyone.', 'goal': 'Taste all the delicious food and become a gourmet or chef.', 'cash': 10000, 'x': 52, 'y': 73}]} bound websocket to Player-10001 Player-10001 logging in at 2023-08-21 16:36:42 Player-10001 is logging out

py499372727 commented 1 year ago

Hi, could you attach the screenshot of the client when crashing?

shengyu-meng commented 1 year ago

Hi, could you attach the screenshot of the client when crashing? Here is the screenshot of cmd. image

For the browser, every time when I see Mayor and GUI, the page will automatically refresh to go back to the unity Logo. Just like this record: https://github.com/py499372727/AgentSims/assets/17877083/c6b0ba22-4134-4a85-9e32-1583a9324472

py499372727 commented 1 year ago

According to your description, perhaps the reason is a compatibility issue with webclient on Windows systems. Have you tried using Linux or Mac OS? We are very sorry that we have not debugged on Windows. Maybe try another browser again.

shengyu-meng commented 1 year ago

Thanks for your reply. Yes I agree the issue may cause by the compatibility of web client under windows. Since I fond even your live demo I cannot run properly under windows, but which can work in my Android phone. 🥹

StevenFengLi commented 1 year ago

The same problem persists in Mac OS. Is there any solution available to resolve this issue?

StevenFengLi commented 1 year ago

The same problem persists in Mac OS. Is there any solution available to resolve this issue?

It was caused by the Live Server plugin, which is an extension for VSCode. The issue no longer exists after I deployed the client using http-server.

py499372727 commented 1 year ago

That's good news. Thanks for attention.