rudder-transformer icon indicating copy to clipboard operation
rudder-transformer copied to clipboard

BUG: AppsFlyer destination integration fails with 403 error: "redacted due to unsupported content-type"

Open petetnt opened this issue 4 months ago • 2 comments

Describe the bug

I am trying to get the AppsFlyer cloud mode integration working.

Related SDK issue: https://github.com/rudderlabs/rudder-sdk-react-native/issues/381#issuecomment-2399449528

When debugging the SDK issue, I finally got the events to be forwarded to AppsFlyer. However the integration fails with the following error:

{
  "response": "redacted due to unsupported content-type",
  "firstAttemptedAt": "2024-10-08T10:21:00.166Z",
  "content-type": "application/octet-stream",
  "routerSubStage": "router_dest_delivery",
  "payloadStage": "router_input"
}
{
    "body": {
        "XML": {},
        "FORM": {},
        "JSON": {
            "ip": "89.27.52.57",
            "os": "17.4",
            "att": 0,
            "idfv": "139f7f31-d772-4ef3-9191-07fa496b640e",
            "eventName": "screen",
            "eventTime": "2024-10-08T10:20:49.709Z",
            "eventValue": "{\"name\":\"RewardCode\"}",
            "appsflyer_id": "1725356348180-1397317",
            "sharing_filter": "all",
            "app_version_name": "1.0.7",
            "bundleIdentifier": "com.REDACTED",
            "customer_user_id": "eede5cf6-49e8-4864-b214-c28545265cc4"
        },
        "JSON_ARRAY": {}
    },
    "type": "REST",
    "files": {},
    "method": "POST",
    "params": {},
    "userId": "",
    "headers": {
        "Content-Type": "application/json",
        "authentication": "REDACTED"
    },
    "version": "1",
    "endpoint": "https://api2.appsflyer.com/inappevent/id1667809195"
}

Not sure if the AppsFlyer is sending the error and RudderStack is failing to parse the response or if RudderStack is failing to send the event.

To Reproduce Steps to reproduce the behavior:

  1. Setup React Native project
  2. Initalize the SDK
const rudderInitialise = async () => {
  const appsFlyerId = await appsFlyerNativeModule.getAppsFlyerId();

  await rudderClient.setup(
    Config.RUDDERSTACK_KEY,
    {
      logLevel: RUDDER_LOG_LEVEL.VERBOSE, //RUDDER_LOG_LEVEL[Config.RUDDER_LOG_LEVEL] ?? RUDDER_LOG_LEVEL.INFO,
      dataPlaneUrl: Config.RUDDERSTACK_DATA_PLANE_URL,
      trackAppLifecycleEvents: true,
      recordScreenViews: false,
    },
    {
      externalId: [
        {
          id: appsFlyerId,
          type: 'appsflyerExternalId'
        }
      ]
    }
  );
};

...
await rudderClient.identify(
  loggedInUser.id,
  {
    email: loggedInUser.email
  },
  {
    externalId: [
      {
        id: appsFlyerId,
        type: 'appsflyerExternalId'
      }
    ]
  }
);
  1. Send a event:
rudderClient.screen('Foo', { bar: 'biz' })

Expected behavior

Event is sent to AppFlyer

Screenshots image

Additional context Add any other context about the problem here.

petetnt avatar Oct 08 '24 10:10 petetnt