Failed auto login for admin due to WebDriverError: invalid argument: missing 'name'

I’m trying the autoLogin plugin using this config:

helpers: {

    Protractor: {

        url: '<my-test-site>',
        driver: 'hosted',
        browser: 'chrome',
        rootElement: 'body',
        angular: false,
        restart: false,
        keepBrowserState: true
    },
    plugins: {
    autoLogin: {
        enabled: true,
        saveToFile: true,
        inject: 'loginAs',
        users: {
            admin: {
                login: (I) => {
                   ..... login code for Azure AD ....
                },
                check: (I) => {
                    I.amOnPage('/dashboard');
                    I.see('Dashboard Title');
                }
            }
        }
    }
}

,…

Login is working OK and it is storing cookie in admin_session.json:
[{
“domain”:"",
“expiry”:1593701586,
“httpOnly”:false,
“name”:“ai_session”,
“path”:"/",
“sameSite”:“None”,
“secure”:true,
“value”:“ePEil|1593699774529|1593699786586.095”
},{
“domain”:"",
“expiry”:1625235773,
“httpOnly”:false,
“name”:“ai_user”,
“path”:"/",
“sameSite”:“None”,
“secure”:true,
“value”:“tIKiJ|2020-07-02T14:22:53.265Z”
}]

but as soon as one scenario ends, it fails to start the next one without calling login again.
This is the error in console:

delete employee
I am on page “/”
» Visited https:///
I set cookie [{“domain”:"",“expiry”:1593701586,“httpOnly”:false,"nam…
» Failed auto login for admin due to WebDriverError: invalid argument: missing ‘name’
(Session info: chrome=83.0.4103.116)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘MYPC’, ip: ‘’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_251’
Driver info: driver.version: unknown
» Logging in again

Any help appreciated. Thanks.

I have the same issue. With saveToFile=true