Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SDK doesn't handle adblockers - retries failed requests forever #181

@mogelbrod

Description

@mogelbrod

Some Adblockers such as uBlock Origin unfortunately block requests to https://api.leanplum.com/api . The JS SDK doesn't handle this very well however, as it seems to retry the request every ~400ms forever. In addition to spamming the console it also seems to significantly slow down the web app.

Expected Behavior

There are a number of possible solutions for this that can be applied, either one or many in tandem:

  1. Implement exponential backoff for retries
  2. Stop automatically retrying after a configurable time period
  3. Stop retrying if the response object has status = 0

Actual Behavior

The SDK retries the request every ~400ms forever.

Steps to Reproduce the Problem

  1. Install a browser Adblock extension such as uBlock Origin
  2. Navigate to any website using the leanplum SDK
  3. Trigger a leanplum API request via leanplum.forceContentUpdate() or similar

Specifications

  • Version: [email protected]
  • Platform: Chrome 113.0.5672.126 (Official Build) (arm64)
  • Subsystem: ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions