Keystone-classic: Document not updating due to a password issue

Created on 5 Nov 2017  ·  8Comments  ·  Source: keystonejs/keystone-classic

Expected behavior


Recently, my application which uses Keystone has not been able to update documents on a specific collection. I have not changed this collection for a very long time, and the error seems to be deep in a library keystone uses.

Was just hoping for some help debugging this and possibly preventing this type of issue, or at least showing a nicer error experience.

Currently what happens is the "Saving..." message shows forever.

Actual/Current behavior


Nothing is saved, and here is the error:

Mongoose model 'error' event fired on 'User' with error: 
Cannot read property 'toLowerCase' of undefined TypeError: Cannot read property 'toLowerCase' of undefined 
   at Object.checkPassword (/app/node_modules/dumb-passwords/lib/index.js:11:46) 
   at password.validate (/app/node_modules/keystone/fields/types/password/PasswordType.js:203:36) 
   at password.validateInput (/app/node_modules/keystone/fields/types/password/PasswordType.js:173:19) 
   at doFieldValidation (/app/node_modules/keystone/lib/list/updateItem.js:108:9) 
   at /app/node_modules/keystone/node_modules/async/dist/async.js:3025:16 
   at eachOfArrayLike (/app/node_modules/keystone/node_modules/async/dist/async.js:941:9) 
   at eachOf (/app/node_modules/keystone/node_modules/async/dist/async.js:991:5) 
   at Object.eachLimit (/app/node_modules/keystone/node_modules/async/dist/async.js:3089:3) 
   at /app/node_modules/keystone/lib/list/updateItem.js:164:10 
   at /app/node_modules/keystone/node_modules/async/dist/async.js:3686:9 
   at replenish (/app/node_modules/keystone/node_modules/async/dist/async.js:882:17) 
   at /app/node_modules/keystone/node_modules/async/dist/async.js:886:9 
   at eachOfLimit (/app/node_modules/keystone/node_modules/async/dist/async.js:913:22) 
   at /app/node_modules/keystone/node_modules/async/dist/async.js:918:16 
   at _parallel (/app/node_modules/keystone/node_modules/async/dist/async.js:3685:5) 
   at Object.series (/app/node_modules/keystone/node_modules/async/dist/async.js:4525:3) 

Steps to reproduce the actual/current behavior


Trying to save/update a document in my Users collection.

Ah, and here is the very strange thing. I do not see this error when running locally, I can save just fine. This is only happening on my production Heroku environment. They use the same database. Ohh. I just checked, different keystone versions are running locally and in production. Strange, since I have them targeting the same version in package.json.

Anyways. 4.0.0-beta.5 seems to not have the problem. 4.0.0-beta.7 has the issue.

Environment

| Software | Version
| ---------------- | -------
| Keystone | 4.0.0-beta.7
| Node | 8.9.0

I have tried using multiple versions of Node.

bug

Most helpful comment

This bug makes 4.0.0-beta.7 unusable :(

All 8 comments

This commit https://github.com/keystonejs/keystone/commit/e061c72bbdc9655cf58ce1e7f8558937a946c4f1
Has the fix for this issue and is in master. A new tag is needed

I have the same issue there, on Beta 7 too

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:

[email protected]
Domain biomassiv.es has exceeded the max emails per hour (105/100 (105%)) allowed. Message will be reattempted later

------- This is a copy of the message, including all the headers. ------
Received: from github-smtp2-ext1.iad.github.net ([192.30.252.192]:48551 helo=github-smtp2a-ext-cp1-prd.iad.github.net)
by chi-server32.websitehostserver.net with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.89)
(envelope-from noreply@github.com)
id 1eNK2L-002mN4-6h
for [email protected]; Fri, 08 Dec 2017 08:54:01 -0600
Date: Fri, 08 Dec 2017 06:53:22 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com;
s=pf2014; t=1512744802;
bh=JWUHSXdXG95Aq5Rr1yHpt9A7M3NBtEhnX//7uxw0chQ=;
h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID:
List-Archive:List-Post:List-Unsubscribe:From;
b=uOdnPMcDTrIdkDWg/7wc4PdNr4CwYHYpX0AMpm2usTS5kU9WngiL7uetJlbED0qUd
pmeZTfJyRT2ZxrOpNGdkfXFZmZbp2A7nvkqNqpO7Sm0ub1+72TqUvS3K2q/kZdBhKo
Qs9qTlFrALYZSl4rchZiNg009Fio1Umio9bFhtQ0=
From: Nicolas Chesné notifications@github.com
Reply-To: keystonejs/keystone reply@reply.github.com
To: keystonejs/keystone keystone@noreply.github.com
Cc: Subscribed subscribed@noreply.github.com
Message-ID:
In-Reply-To:
References:
Subject: Re: [keystonejs/keystone] Document not updating due to a password
issue (#4496)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5a2aa76281c40_69a3fd37a0b2f38115745c";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: Norbz
X-GitHub-Recipient: biomassives
X-GitHub-Reason: subscribed
List-ID: keystonejs/keystone
List-Archive: https://github.com/keystonejs/keystone
List-Post: reply@reply.github.com
List-Unsubscribe: ,
https://github.com/notifications/unsubscribe/AELU4iXHo450g5SszUBGL1Kz1HDzrLmRks5s-U1igaJpZM4QSVgy
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: [email protected]

----==_mimepart_5a2aa76281c40_69a3fd37a0b2f38115745c
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit

I have the same issue there, on Beta 7 too

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/keystonejs/keystone/issues/4496#issuecomment-350282237
----==_mimepart_5a2aa76281c40_69a3fd37a0b2f38115745c
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit

I have the same issue there, on Beta 7 too


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.


----==_mimepart_5a2aa76281c40_69a3fd37a0b2f38115745c--

I am still getting this issue, is this fixed or not?

@citizen-chitrank : I think you should make a plan to move from Keystone to another framework. This project was pending for a long time

This bug makes 4.0.0-beta.7 unusable :(

Seems like its fixed on 4.0.0-beta.8

Yep, fixed in beta.8

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rigalpatel001 picture rigalpatel001  ·  5Comments

jacqueslareau picture jacqueslareau  ·  5Comments

koenoe picture koenoe  ·  4Comments

javierpelozo picture javierpelozo  ·  5Comments

stennie picture stennie  ·  5Comments