Error when trying to access admin page

I’m getting this error when I try to go to my admin page:

Call to undefined method Grav\Common\Session::getFlashCookieObject()

How can I fix this?