# Reset password email is not due to error Cannot read property 'length' of undefined

**URL:** <https://community.auth0.com/t/reset-password-email-is-not-due-to-error-cannot-read-property-length-of-undefined/23876>\
**Category:** Get Help\
**Created:** [April 12, 2019, 8:18am UTC](https://community.auth0.com/t/reset-password-email-is-not-due-to-error-cannot-read-property-length-of-undefined/23876 "2019-04-12T08:18:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dolfi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dolfi/32/12418_2.png) [@Dolfi](https://community.auth0.com/u/Dolfi)\
**Post date:** [April 12, 2019, 8:18am UTC](https://community.auth0.com/t/reset-password-email-is-not-due-to-error-cannot-read-property-length-of-undefined/23876/1 "2019-04-12T08:18:28Z")

</div>

Hi

When our user is trying to reset a password, a password restore email is not sent. In logs we can see:  
{  
“date”: “2019-04-11T14:20:05.209Z”,  
“type”: “fn”,  
“description”: “[YYYYYYYYY@gmail.com](mailto:YYYYYYYYY@gmail.com)”,  
“connection”: “Username-Password-Authentication”,  
“connection\_id”: “”,  
“client\_id”: “4klfih5DCp4zje6t04uYYYYYYYYY”,  
“details”: {  
“email\_type”: “reset\_email”,  
“to”: “[YYYYY@gmail.com](mailto:YYYYY@gmail.com)”,  
“error”: “Cannot read property ‘length’ of undefined”  
},  
“log\_id”: “9002019041114200520978954655322628553950313371XXXXXXXXXX”  
}

Please advise what might be wrong.

Versions of libraries  
[https://cdn.auth0.com/js/auth0/9.10.1/auth0.min.js](https://cdn.auth0.com/js/auth0/9.10.1/auth0.min.js)  
[https://cdn.auth0.com/js/polyfills/1.0/object-assign.min.js](https://cdn.auth0.com/js/polyfills/1.0/object-assign.min.js)

It does not happen with all users, but with just few.

Any advise?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [April 12, 2019, 12:01pm UTC](https://community.auth0.com/t/reset-password-email-is-not-due-to-error-cannot-read-property-length-of-undefined/23876/3 "2019-04-12T12:01:38Z")

</div>

Is the connection to which the user is associated a custom database connection? For a custom database connection a reset password would involve calling the get user script so that error message could fit with that scenario.

---

<div class="post-metadata">

**Author:** ![Dolfi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dolfi/32/12418_2.png) [@Dolfi](https://community.auth0.com/u/Dolfi)\
**Post date:** [April 17, 2019, 7:26am UTC](https://community.auth0.com/t/reset-password-email-is-not-due-to-error-cannot-read-property-length-of-undefined/23876/4 "2019-04-17T07:26:52Z")

</div>

This is standard Username-Password-Authentication.  
We have 2 regular web applications.  
My assumption is that in some cases, it cannot recognize application.callback\_domain  
for “Redirect To” field and might be causing such an issue.

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [April 17, 2019, 11:12am UTC](https://community.auth0.com/t/reset-password-email-is-not-due-to-error-cannot-read-property-length-of-undefined/23876/5 "2019-04-17T11:12:48Z")

</div>

Can you share (even if a redacted version) of your password reset email template, in particular, the redirect to that you suspect may be the cause of this?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [September 2, 2019, 12:09pm UTC](https://community.auth0.com/t/reset-password-email-is-not-due-to-error-cannot-read-property-length-of-undefined/23876/6 "2019-09-02T12:09:10Z")

</div>


