Unreliable / Detected Easily By Shape Security (F5)
Description
Target.com uses Shape Security on their Add to Cart endpoint for specific products. CloakBrowser gets blocked by Shape it seems like almost every time. Note: If it gets the error "Something went wrong and the item was not added to your cart. Please try again." means it got detected by Shape
CloakBrowser version
0.3.23
Wrapper
Python
Environment
Windows 10 x86_64, Python 3.13, no Docker
Launch options
browser = await launch_async(headless=False, humanize=True)
Tested with a different IP or proxy?
No
Works outside Docker / on host machine?
Not using Docker
Steps to reproduce
import asyncio, time
from cloakbrowser import launch_async
async def main():
browser = await launch_async(headless=False, humanize=True)
page = await browser.new_page()
await page.goto("https://www.target.com/p/-/A-95081078", timeout=60000, wait_until="domcontentloaded")
time.sleep(3)
btn = page.locator('[data-test="shippingButton"]').first
if await btn.count():
await btn.click(timeout=10000)
time.sleep(60)
await browser.close()
asyncio.run(main())
Thanks for the report.
We tested this and the first add-to-cart attempt on a fresh IP passes most of the time. The blocking kicks in on subsequent attempts from the same IP, which points to server-side rate limiting rather than fingerprint detection.
A few things that should help:
- Use a residential proxy with
geoip=True— without a proxy, your home IP accumulates a score quickly - Use
humanize=Truewithhuman_preset="careful"— Target does heavy behavioral analysis, thecarefulpreset adds slower, more deliberate interactions - Use
launch_persistent_context_async()to keep cookies and session state between runs, instead of a fresh browser each time - Navigate naturally — homepage → search → product → add to cart, rather than going directly to the product URL
- Rotate proxy IPs between sessions
We're still investigating whether there's anything we can improve on our end. If you find any additional details — like how many successful runs you get before the block, or whether persistent context changes the pattern — that would help us narrow things down.
@Cloak-HQ Would be great if you can see how you can improve it. I tried with Camoufox with same IP, and it was able to get more successful attempts through.
So it seems like Shape is somehow detecting Cloakbrowser
We re-tested this on Windows with the latest version (v0.3.26, Chromium 146) — same setup as yours (headless=False, humanize=True, no proxy). 5 out of 5 add-to-cart attempts passed, zero blocks.
Your v0.3.23 shipped with an older binary. Please update:
pip install --upgrade cloakbrowser
The first run after updating will auto-download the new binary. Also recommend adding human_preset="careful" — Target does heavy behavioral analysis:
browser = await launch_async(headless=False, humanize=True, human_preset="careful")
If the issue persists after updating, let us know:
- Your full script (so we can reproduce exactly)
- How many attempts pass before the block
- Whether you're using a proxy
@Cloak-HQ Did some more testing, it's a lot better now! The first batch of attempts return 201 reliably as long as I rotate proxies. Because Target seems to block at the SKU level per IP, so a single IP only gets around ~5 ATC attempts before being flagged for that SKU.
But after a few hundred attempts in a loop with rotating residential proxies, Shape eventually starts blocking everything with T83072242, even on IPs that have never been used. Once it flips, it's almost permanent.
To rule out the IP being the issue, I opened a normal Chrome incognito window on the same machine and ran through the same flow manually, and it worked 5/5 times. So Shape is treating CloakBrowser sessions and manual incognito Chrome very differently.
Just curious if there's a way to make CloakBrowser closer to undetectable for Shape?
Here is the script I ran (I used Brightdata residential rotating proxy for testing):
import asyncio, time
from cloakbrowser import launch_async
# Use proxy: "http://user:pass@host:port" — set to None for direct.
PROXY = None
async def main():
i = 0
while True:
i += 1
browser = await launch_async(
headless=False,
humanize=True,
human_preset="careful",
proxy=PROXY,
geoip=bool(PROXY),
)
page = await browser.new_page()
status, body = None, ""
try:
await page.goto(
"https://www.target.com/p/-/A-95081078",
timeout=60000,
wait_until="domcontentloaded",
)
time.sleep(3)
btn = page.locator('[data-test="shippingButton"]').first
if await btn.count():
async with page.expect_response(
lambda r: "web_checkouts/v1/cart_items" in r.url
and r.request.method == "POST",
timeout=20000,
) as response_info:
await btn.click(timeout=10000)
response = await response_info.value
status = response.status
body = (await response.text())[:100]
except Exception as e:
print(f"[{i}] error: {type(e).__name__}: {e}")
await browser.close()
print(f"[{i}] status={status} body={body}")
asyncio.run(main())
Example response after a few hundred loops
[xxx] status=401 body={ "errorCode": "T83072242", "errorKey": "_ERR_AUTH_DENIED", "errorMessage": "Error Code T83072
[xxx] status=401 body={ "errorCode": "T83072242", "errorKey": "_ERR_AUTH_DENIED", "errorMessage": "Error Code T83072
[xxx] status=401 body={ "errorCode": "T83072242", "errorKey": "_ERR_AUTH_DENIED", "errorMessage": "Error Code T83072
[xxx] status=None body=
[xxx] status=401 body={ "errorCode": "T83072242", "errorKey": "_ERR_AUTH_DENIED", "errorMessage": "Error Code T83072
[xxx] status=401 body={ "errorCode": "T83072242", "errorKey": "_ERR_AUTH_DENIED", "errorMessage": "Error Code T83072
[xxx] status=401 body={ "errorCode": "T83072242", "errorKey": "_ERR_AUTH_DENIED", "errorMessage": "Error Code T83072
[xxx] status=None body=
[xxx] status=401 body={ "errorCode": "T83072242", "errorKey": "_ERR_AUTH_DENIED", "errorMessage": "Error Code T83072
[xxx] status=401 body={ "errorCode": "T83072242", "errorKey": "_ERR_AUTH_DENIED", "errorMessage": "Error Code T83072
[xxx] status=401 body={ "errorCode": "T83072242", "errorKey": "_ERR_AUTH_DENIED", "errorMessage": "Error Code T83072`
And a few more SKUs that are Shape-enforced if you need it to test
TCINS = [
"95081078",
"94171610",
"94886125",
"94681699",
"94681674",
"94921086",
]