Removing cookies in browser causes internal server error

Bug #1833767 reported by Jim Conner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Triaged
Low
Unassigned

Bug Description

2019-06-21 21:06:44 regiond: [info] 192.168.1.203 GET /MAAS/ws HTTP/1.1 --> 500 INTERNAL_SERVER_ERROR (referrer: -; agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36)
2019-06-21 21:06:49 _GenericHTTPChannelProtocol,11,::ffff:192.168.1.203: [critical] Unhandled Error
        Traceback (most recent call last):
          File "/usr/lib/python3/dist-packages/twisted/web/http.py", line 2013, in lineReceived
            self.allContentReceived()
          File "/usr/lib/python3/dist-packages/twisted/web/http.py", line 2104, in allContentReceived
            req.requestReceived(command, path, version)
          File "/usr/lib/python3/dist-packages/maasserver/webapp.py", line 63, in requestReceived
            command, path, version)
          File "/usr/lib/python3/dist-packages/twisted/web/http.py", line 866, in requestReceived
            self.process()
        --- <exception caught here> ---
          File "/usr/lib/python3/dist-packages/twisted/web/server.py", line 195, in process
            self.render(resrc)
          File "/usr/lib/python3/dist-packages/twisted/web/server.py", line 255, in render
            body = resrc.render(self)
          File "/usr/lib/python3/dist-packages/maasserver/webapp.py", line 92, in wrap_render
            return orig_render(request)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/websockets.py", line 738, in render
            protocol.makeConnection(transport)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/websockets.py", line 526, in makeConnection
            self.wrappedProtocol.makeConnection(self)
          File "/usr/lib/python3/dist-packages/twisted/internet/protocol.py", line 510, in makeConnection
            self.connectionMade()
          File "/usr/lib/python3/dist-packages/maasserver/websockets/protocol.py", line 112, in connectionMade
            cookies = self.transport.cookies.decode("ascii")
        builtins.AttributeError: 'NoneType' object has no attribute 'decode'

Revision history for this message
Jim Conner (snafuxnj) wrote :
Revision history for this message
Jim Conner (snafuxnj) wrote :

Please note that I was using chrome

Since I could no longer use Chrome Version 74.0.3729.169 (Official Build) (64-bit), I opened the MaaS UI up in Firefox, which worked fine.

Some potentially good context here, too:

We're developing a Kubernetes operator that uses maas heavily. I've had a tab open in Chrome to our maas lab for weeks. The k8s operator we're developing instantiates and destroys maas machines regularly due to our testing. Today, I was running our operator bringing up and down maas nodes, however the UI was not updating in realtime the creation and release of the nodes I was working with unless I refreshed the browser tab manually. So, I cleared the cookies in an effort to "clean the pipes" as it were. Everything was hosed after that, and the error above ensued.

Revision history for this message
Jim Conner (snafuxnj) wrote :

I was able to "fix" this problem using Chrome by going into developer tools, selecting "application" tab (in dev tools), highlighting "Clear storage", and the clicking on "Clear site data" in right pane.

It's not immediately clear to me if this is strictly a client side issue, server side, or combination. I'm inclined to think it's both, but the server should probably be able to handle the exception gracefully as it's not uncommon for users to clear cookies or not use them at all.

Alberto Donato (ack)
Changed in maas:
importance: Undecided → Low
status: New → Triaged
Changed in maas:
milestone: none → 3.4.0
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.x
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.