OpenDevin icon indicating copy to clipboard operation
OpenDevin copied to clipboard

Windows 11: Connection closed Error sending data to client

Open sonicino2 opened this issue 3 months ago • 9 comments

Hello, Windows 11 user. While OpenDev is running I get this this error as OpenDev makes my app.:

runnable=False)

ACTION NOT EXECUTABLE OBSERVATION

============== Error sending data to client Error sending data to client Cannot call "send" once a close message has been sent. INFO: connection closed Error sending data to client Error sending data to client Client websocket disconnected (<CloseCode.ABNORMAL_CLOSURE: 1006>, None) Error sending data to client Error sending data to client

Any help would be appreciated.

sonicino2 avatar Mar 25 '24 22:03 sonicino2

Guessing you're hitting the same thing as this windows user: https://github.com/OpenDevin/OpenDevin/issues/169

Can you try this branch: rb/fix-uid?

rbren avatar Mar 26 '24 01:03 rbren

I'm so sorry, how do I run that command (rb/fix-uid)?

sonicino2 avatar Mar 26 '24 05:03 sonicino2

The fix is merged now! You can just try running git pull to get the latest

For the future: you'd just need to check out the code on that branch 😄

git clone https://github.com/OpenDevin/OpenDevin
cd OpenDevin
git checkout rb/fix-uid

rbren avatar Mar 26 '24 11:03 rbren

Oh no. After 44 steps I got the same error.

sonicino2 avatar Mar 26 '24 17:03 sonicino2

If you want to see my log history, I wouldn't mind showing as the project was just a test.

sonicino2 avatar Mar 26 '24 18:03 sonicino2

Logs would be very helpful!

rbren avatar Mar 26 '24 18:03 rbren

I was trying to recreate the game pac-man in python, here are my most recent logs. The problem also might stem from a resetting of the operation in total, as the project went outside of it's working directory while producing code. LogHist1.txt

sonicino2 avatar Mar 26 '24 18:03 sonicino2

Super helpful, thanks! Two main errors I see

The LLM repeatedly tries to use key contents instead of content. Can probably have more robust parsing for that case.

        AGENT ERROR:
        FileWriteAction.__init__() got an unexpected keyword argument 'content'
Traceback (most recent call last):
  File "C:\Users\sonic\Downloads\OpenDevin\opendevin\controller\__init__.py", line 85, in step
    action = self.agent.step(state)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sonic\Downloads\OpenDevin\agenthub\langchains_agent\__init__.py", line 174, in step
    action = prompts.parse_action_response(action_resp)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sonic\Downloads\OpenDevin\agenthub\langchains_agent\utils\prompts.py", line 168, in parse_action_response
    action = ACTION_TYPE_TO_CLASS[action_dict["action"]](**action_dict["args"])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: FileWriteAction.__init__() got an unexpected keyword argument 'content'

        OBSERVATION:
        FileWriteAction.__init__() got an unexpected keyword argument 'content'

And a more serious error:

        AGENT ERROR:
        'AgentSummarizeAction' object is not subscriptable
Traceback (most recent call last):
  File "C:\Users\sonic\Downloads\OpenDevin\opendevin\controller\__init__.py", line 85, in step
    action = self.agent.step(state)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sonic\Downloads\OpenDevin\agenthub\langchains_agent\__init__.py", line 166, in step
    prompt = prompts.get_request_action_prompt(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sonic\Downloads\OpenDevin\agenthub\langchains_agent\utils\prompts.py", line 141, in get_request_action_prompt
    if latest_thought["action"] == 'think':
       ~~~~~~~~~~~~~~^^^^^^^^^^
TypeError: 'AgentSummarizeAction' object is not subscriptable

        OBSERVATION:
        'AgentSummarizeAction' object is not subscriptable

I'll get in a fix for this

I'm not sure why the process exited. Looks like the client connection was closed--did you start this session from the browser?

rbren avatar Mar 26 '24 20:03 rbren

Yes, after running npm run start -- --port 3001.

sonicino2 avatar Mar 26 '24 20:03 sonicino2

OK--all merged. I think the frontend bug might be this issue: https://github.com/OpenDevin/OpenDevin/issues/235

Going to close this one for now. If you're still not able to run OpenDevin, go ahead and open a new issue!

rbren avatar Mar 27 '24 14:03 rbren

Hi I am seeing a similar error as well

Error sending data to client Cannot call "send" once a close message has been sent.

benjaminjamesau avatar Apr 03 '24 18:04 benjaminjamesau