Login by Cookie Error when using MongoDB

Hi all,

I’m having the problem with yii2 login by cookie when using mongodb. I logged in the web in the evening and accessed the website the next morning. But it throws error

Do you have any solutions for this error ?

Thanks so much

Here is my User findIdentity method




    /**

     * @inheritdoc

     */

    public static function findIdentity($id)

    {

        return static::findOne([

            '_id' => $id,

            'status' => self::STATUS_ACTIVE

        ]);

    }