Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
petetnt opened this issue Oct 8, 2024 · 6 comments
Assignees
Labels

Comments

@petetnt
Copy link

petetnt commented Oct 8, 2024

Describe the bug

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

Related SDK issue: rudderlabs/rudder-sdk-react-native#381 (comment)

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.

@contributor-support
Copy link

Thanks for opening this issue! We'll get back to you shortly. If it is a bug, please make sure to add steps to reproduce the issue.

@petetnt
Copy link
Author

petetnt commented Oct 11, 2024

Hi @ItsSudip , @krishna2020 , @sandeepdsvs , @shrouti1507, would some of you have the time to check out this issue? Sorry for pinging, but it's currently blocking our go-live for the app and probably need to move away from RudderStack if there's no resolution for this particular issue. I understand that the library is offered as-is, so acknowledging if the issue is not on your side would be enough too.

@petetnt
Copy link
Author

petetnt commented Oct 14, 2024

It seems that 403 comes from AppsFlyer if you are on Zero plan, which our test environment currently is. See the docs: https://dev.appsflyer.com/hc/docs/testing-ios#i-get-response-403-on-install-or-event-recording

Should the error coming from AppsFlyer be parsed better anyway and shown on the Ruddestack UI? AppsFlyerSDK/appsflyer-react-native-plugin#477 had a similar issue which pointed me to right direction.

@sanpj2292
Copy link
Contributor

Hi @petetnt ,

Thank you for flagging and providing more information

Should the error coming from AppsFlyer be parsed better anyway and shown on the Ruddestack UI?

Yes, we are working on making sure we show the error on the UI.

@petetnt
Copy link
Author

petetnt commented Oct 14, 2024

Awesome, thanks @sanpj2292 !

@devops-github-rudderstack
Copy link
Contributor

This issue is considered to be stale. It has been open for 30 days with no further activity thus it is going to be closed in 7 days. To avoid such a case please consider removing the stale label manually or add a comment to the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants