OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

After finishing a task it closes the connection with an error.

Open nasko94 opened this issue 1 year ago • 2 comments

Describe the bug

After I told it to write me a python calculator, it did, but then it finished with an error:

STEP 12

    PLAN:

    🔵 0 build me a calculator app in python


    ACTION:
    AgentFinishAction(action='finish')

    FINISHED
    ERROR:    Exception in ASGI application
    Traceback (most recent call last):
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 240, in run_asgi
        result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
        return await self.app(scope, receive, send)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
        await super().__call__(scope, receive, send)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
        await self.middleware_stack(scope, receive, send)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/middleware/errors.py", line 151, in __call__
        await self.app(scope, receive, send)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/middleware/cors.py", line 75, in __call__
        await self.app(scope, receive, send)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
        await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
        raise exc
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
        await app(scope, receive, sender)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/routing.py", line 758, in __call__
        await self.middleware_stack(scope, receive, send)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/routing.py", line 778, in app
        await route.handle(scope, receive, send)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/routing.py", line 375, in handle
        await self.app(scope, receive, send)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/routing.py", line 98, in app
        await wrap_app_handling_exceptions(app, session)(scope, receive, send)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
        raise exc
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
        await app(scope, receive, sender)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/starlette/routing.py", line 96, in app
        await func(session)
      File "/home/cyber/.local/share/virtualenvs/OpenDevin-zXforORj/lib/python3.10/site-packages/fastapi/routing.py", line 348, in app
        await dependant.call(**values)
      File "/mnt/c/Users/atana/Documents/OpenDevin/opendevin/server/listen.py", line 24, in websocket_endpoint
        await session.start_listening()
      File "/mnt/c/Users/atana/Documents/OpenDevin/opendevin/server/session.py", line 73, in start_listening
        raise NotImplementedError
    NotImplementedError
    INFO:     connection closed

nasko94 avatar Mar 31 '24 13:03 nasko94

Partial fix here: https://github.com/OpenDevin/OpenDevin/pull/450

rbren avatar Mar 31 '24 14:03 rbren

Curious if this is always reproducible, or if you tripped over an edge case

rbren avatar Mar 31 '24 14:03 rbren

Going to close this one. Feel free to open a new bug if you continue to hit this

rbren avatar Apr 05 '24 18:04 rbren