Javascript error when sending PM to email address

Hey all! Trusting you are well and had a good weekend.

I am trying to send a PM to an email address, which usually works fine. Paste in email address, select from autocomplete, write rest of message, done. Now when I paste in the email address nothing happens and an error appears in the console - even in safe mode with everything disabled. See screenshot and log below. I’m on latest-release +188.

Message (2 copies reported)

Uncaught TypeError: Cannot read property 'length' of null Url: https://DISCOURSEURL/assets/application-11ddd9238d65444ab29fe3d9a5f36d4f99dabf8559c666441bff0bf449d85c6c.js Line: 1 Column: 326526 Window Location: https://DISCOURSEURL/u/tobiaseigen/messages

Backtrace

TypeError: Cannot read property 'length' of null at HTMLInputElement.<anonymous> (https://DISCOURSEURL/assets/application-11ddd9238d65444ab29fe3d9a5f36d4f99dabf8559c666441bff0bf449d85c6c.js:1:326526) at HTMLInputElement.dispatch (https://DISCOURSEURL/assets/ember_jquery-3a6106596c1410fe768d3369b59e90f9eb4c3d8bf2eb6861dee02656c7551714.js:1:42577) at HTMLInputElement.v.handle (https://DISCOURSEURL/assets/ember_jquery-3a6106596c1410fe768d3369b59e90f9eb4c3d8bf2eb6861dee02656c7551714.js:1:40589)

Env

  1/2  

hostname community-app
process_id 792
application_version 8ca5aad1e2b1612c2ef6824bd574eea9ef71d30d
HTTP_HOST DISCOURSEURL
REQUEST_URI /logs/report_js_error
REQUEST_METHOD POST
HTTP_USER_AGENT Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36
HTTP_ACCEPT */*
HTTP_REFERER https://DISCOURSEURL/u/tobiaseigen/messages
HTTP_X_FORWARDED_FOR 73.239.176.161
HTTP_X_REAL_IP 73.239.176.161
time 6:29 am
params message Uncaught TypeError: Cannot read property 'length' of null
--- --- --- ---
--- ---
url https://DISCOURSEURL/assets/application-11ddd9238d65444ab29fe3d9a5f36d4f99dabf8559c666441bff0
line 1
column 326526
window_location https://DISCOURSEURL/u/tobiaseigen/messages
stacktrace TypeError: Cannot read property 'length' of null at HTMLInputElement.<anonymous> (https://communi
5 Likes

Thanks for reporting this! I can reproduce the issue on Meta when attempting to send a PM to an email address.

5 Likes

Thanks @tobiaseigen, should be fixed by

https://github.com/discourse/discourse/commit/071a82efe30e8f5fda274dfb1de4e0382ba132bf

7 Likes