placeholder icon indicating copy to clipboard operation
placeholder copied to clipboard

Internal Server Error when geocoding addresses containing `constructor`

Open Joshua-Zou opened this issue 1 year ago • 1 comments

Describe the bug

When geocoding text that contains the word constructor, Pelias throws a http status 500, Internal Server Error.

Steps to Reproduce

  1. Start the Pelias Placeholder server
  2. GET /parser/search?text=constructor

Pelias returns an error described below.

Expected behavior Pelias does not have an internal server error.

Environment

  • OS: Amazon Linux 2.
  • Docker version: Docker version 20.10.23, build 7155243
  • Pelias Placeholder Version: v3.15.0

Pelias Error

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>TypeError: Cannot read property &#39;length&#39; of undefined<br> &nbsp; &nbsp;at _isArrayRangeIsEqual (/code/pelias/placeholder/prototype/tokenize.js:68:32)<br> &nbsp; &nbsp;at _groups (/code/pelias/placeholder/prototype/tokenize.js:113:12)<br> &nbsp; &nbsp;at /code/pelias/placeholder/prototype/tokenize.js:34:22<br> &nbsp; &nbsp;at /code/pelias/placeholder/node_modules/async/dist/async.js:2960:13<br> &nbsp; &nbsp;at wrapper (/code/pelias/placeholder/node_modules/async/dist/async.js:271:20)<br> &nbsp; &nbsp;at replenish (/code/pelias/placeholder/node_modules/async/dist/async.js:441:29)<br> &nbsp; &nbsp;at /code/pelias/placeholder/node_modules/async/dist/async.js:451:13<br> &nbsp; &nbsp;at eachOfLimit$1 (/code/pelias/placeholder/node_modules/async/dist/async.js:477:34)<br> &nbsp; &nbsp;at awaitable (/code/pelias/placeholder/node_modules/async/dist/async.js:211:32)<br> &nbsp; &nbsp;at eachOfSeries (/code/pelias/placeholder/node_modules/async/dist/async.js:813:16)</pre>
</body>
</html>

Joshua-Zou avatar Aug 03 '24 03:08 Joshua-Zou

Thanks for the report, this is very odd.

missinglink avatar Aug 03 '24 09:08 missinglink