Skip to content

[BUG] unable to fetch fresh datafile (consider rechecking SDK key), status code: 403 Forbidden during init #424

Open
@rafiqicr

Description

@rafiqicr

Is there an existing issue for this?

  • I have searched the existing issues

Agent Version

4.1.0 container running on ECS/Fargate

Current Behavior

We kept seeing these in our logs:

{
    "level": "error",
    "instance": "Instance-2",
    "name": "PollingProjectConfigManager",
    "sdkKey": "undefined",
    "time": "2024-09-15T15:25:48Z",
    "message": "unable to fetch fresh datafile: 403 Forbidden"
}
{
    "level": "error",
    "requestId": "cf4cbbb4-126d-4efb-816b-4b1932c13540",
    "sdkKey": "undefined",
    "error": "unable to fetch fresh datafile (consider rechecking SDK key), status code: 403 Forbidden",
    "time": "2024-09-15T15:25:48Z",
    "message": "Initializing OptimizelyClient"
}
{
    "level": "info",
    "instance": "Instance-1",
    "name": "OptimizelyClient",
    "sdkKey": "<sdk-key>",
    "time": "2024-09-15T15:25:48Z",
    "message": "Feature \"members-switch-to-postgresdb\" is enabled for user \"Members-Accounts-live\"? false"
}
{
    "level": "info",
    "requestId": "a281f23f-0180-43e2-bf8d-50da98054f72",
    "sdkKey": "<sdk-key>",
    "time": "2024-09-15T15:25:48Z",
    "message": "Feature \"dummy-flag\" is enabled for user Members-Accounts-live? false"
}
..

OPTIMIZELY_SDKKEYS env var is set properly and matches the sdkKey appearing in the follow-up logs.
This also occurs on every message with "Loading Optimizely instance"

As you can see the first few entries will always error on unable to find SDK keys but after that it would work as expected.
Just wondering if this is an expected behaviour or we misconfigured something.
None of the developers notice an actual degradation on our services but it would be nice not to see these in our logs if things are working as expected.

Expected Behavior

Should not show up as logs if SDK keys are set correctly

Steps To Reproduce

  1. Deploy as a container/task on ECS
  2. Look at logs after a few minutes

Go Version

No response

Link

No response

Logs

No response

Severity

No response

Workaround/Solution

No response

Recent Change

No response

Conflicts

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions