Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

ReferenceError: errResult is not defined #119

Closed
scottcorgan opened this issue Sep 5, 2018 · 2 comments
Closed

ReferenceError: errResult is not defined #119

scottcorgan opened this issue Sep 5, 2018 · 2 comments

Comments

@scottcorgan
Copy link

After an upgrade to the latest (5.4.0) client and during the incident today, we started getting this error.

  • Node 8.x
  • Run in Docker

Let me know if you need more information.

ReferenceError: errResult is not defined
    at getResultForVariationOrRollout (/var/www/~redacted~/node_modules/ldclient-node/evaluate_flag.js:281:10)
    at /var/www/~redacted~/node_modules/ldclient-node/evaluate_flag.js:128:9
    at /var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1126:9
    at /var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:473:16
    at replenish (/var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:993:25)
    at /var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1002:9
    at _asyncMap (/var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1119:5)
    at /var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1205:16
    at Object.mapSeries (/var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1032:16)
    at evalRules (/var/www/~redacted~/node_modules/ldclient-node/evaluate_flag.js:113:9)
    at /var/www/~redacted~/node_modules/ldclient-node/evaluate_flag.js:44:7
    at /var/www/~redacted~/node_modules/ldclient-node/evaluate_flag.js:82:11
    at /var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1126:9
    at /var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:473:16
    at replenish (/var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:993:25)
    at /var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1002:9
    at _asyncMap (/var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1119:5)
    at /var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1205:16
    at Object.mapSeries (/var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1032:16)
    at checkPrerequisites (/var/www/~redacted~/node_modules/ldclient-node/evaluate_flag.js:52:11)
    at evalInternal (/var/www/~redacted~/node_modules/ldclient-node/evaluate_flag.js:40:3)
    at Object.evaluate (/var/www/~redacted~/node_modules/ldclient-node/evaluate_flag.js:26:3)
    at /var/www/~redacted~/node_modules/ldclient-node/index.js:299:22
    at replenish (/var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:998:17)
    at /var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1002:9
    at eachOfLimit (/var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1027:24)
    at /var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1032:16
    at Object.eachOf (/var/www/~redacted~/node_modules/ldclient-node/node_modules/async/dist/async.js:1103:5)
    at /var/www/~redacted~/node_modules/ldclient-node/index.js:294:15
    at Timeout._onTimeout (/var/www/~redacted~/node_modules/ldclient-node/feature_store.js:12:29)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)
@eli-darkly
Copy link
Contributor

Very sorry about this. It looks like the wrong function name got into the code during a refactoring, and we did not have adequate test coverage here. I'll have a patch release out shortly.

(FYI, in order for it to get to this particular code, there has to be something invalid about the feature flag being evaluated - for instance, a rule that specifies a nonexistent variation index. So you may want to take a look at your flags to make sure they have the properties you expect them to have. Of course, the proper behavior of the SDK in such a case would be to return the default value and write a warning to the log, not to throw an exception.)

@eli-darkly
Copy link
Contributor

This is fixed in 5.4.1. Please let us know if you see anything like it again.

eli-darkly added a commit that referenced this issue Jan 16, 2019
add feature store test for prefix option
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants