Has anyone tried using the Remove Evaluated Mode S...
# ask-questions
a
Has anyone tried using the Remove Evaluated Mode SDK? I’m running a self-hosted GB Proxy with
ENABLE_REMOTE_EVAL=true
. Here’s an example of my implementation:
Copy code
import { GrowthBook } from "@growthbook/growthbook";

const growthbook = new GrowthBook({
    apiHost: "<https://growthbook-proxy.xxx/>",
    clientKey: "sdk-xxx",
    remoteEval: true,
    debug: true,
    attributes: {
        "corporate_reference_id": "f48fdb3c-8448-566e-9994-50a339f8bc2b"
    }
});
await growthbook.init();

const value = growthbook.getFeatureValue(
    "ybsg_batch_transfer"
);
console.log(value); // undefined
I’ve set up the Growthbook feature on the platform with default value
false
. I looked through the JS library and tried to call the API for remote evaluation, but I keep getting a 400 error
Copy code
{
  "status": 400,
  "error": "Failed to get features (remote eval required)"
}
Seems like it fails here: https://github.com/growthbook/growthbook-proxy/blob/fec9cb05891e927326c6d8764a447d[…]9d5b4/packages/apps/proxy/src/controllers/featuresController.ts
f
@happy-autumn-40938 can you help?
h
Hi there, can you confirm whether you've set up the SDK Connection to use remote evaluation (in GrowthBook)?
a
Yes, I have set that in SDK connection
h
Assuming you are a GB Cloud user, I imagine the issue is related to the other one you're facing about the proxy's polling error. As mentioned in the other thread, can you try changing your host from cdn.growthbook.io to api.growthbook.io
a
This works now after solving this issue.