pfn / passifox

Extensions to allow Chrome and Firefox (4.0+) to auto form-fill passwords from KeePass (requires KeePassHttp)
GNU General Public License v3.0
905 stars 185 forks source link

TypeError in cip.retrieveCredentialsCallback #565

Open zlin opened 7 years ago

zlin commented 7 years ago

credentials parameter is sometimes undefined

https://github.com/pfn/passifox/blob/master/chromeipass/chromeipass.js#L1206

Error in event handler for (unknown): TypeError: Cannot read property 'length' of undefined at cip.retrieveCredentialsCallback (chrome-extension://ompiailgknfdndiefoaoiligalphfdae/chromeipass.js:1206:17) at cip.retrieveCredentialsCallback (chrome-extension://ompiailgknfdndiefoaoiligalphfdae/chromeipass.js:1206:2) (index):1 Error in event handler for (unknown): TypeError: Cannot read property 'length' of undefined at cip.retrieveCredentialsCallback (chrome-extension://ompiailgknfdndiefoaoiligalphfdae/chromeipass.js:1206:17)

monty241 commented 6 years ago

Seems the same here:

Error in event handler for (unknown): TypeError: Cannot read property 'length' of undefined
    at cip.retrieveCredentialsCallback (chrome-extension://ompiailgknfdndiefoaoiligalphfdae/chromeipass.js:1186:18)

Code:

cip.retrieveCredentialsCallback = function (credentials, dontAutoFillIn) {
    if (cipFields.combinations.length > 0) {
        cip.u = _f(cipFields.combinations[0].username);
        cip.p = _f(cipFields.combinations[0].password);
    }

    if (credentials.length > 0) { ////////////// THIS LINE
        cip.credentials = credentials;
        cip.prepareFieldsForCredentials(!Boolean(dontAutoFillIn));
    }
}

Extension: chromeIPass v2.8.1 KeePass version: v2.38 KeePassHttp version: also v2.38 Pages on which the error occur: all with a password field

ricardoee commented 5 years ago

Same here. This might be related to the implementation of Let's Encrypt on our staging server. Our production server does not, yet, use Let's Encrypt, and does not suffer this issue.

Will need to investigate further.

Error handling response: TypeError: Cannot read property 'length' of undefined
    at cip.retrieveCredentialsCallback (chrome-extension://ompiailgknfdndiefoaoiligalphfdae/chromeipass.js:1186:18)
chpqatest.chpqa.com/:1 Unchecked runtime.lastError: The message port closed before a response was received.