jackwener/OpenCLI · error · CommandExecutionError

amazon offer buy box is blocked by the current delivery loca

Error message

amazon offer buy box is blocked by the current delivery location

What it means

CommandExecutionError thrown by the amazon offer command when the buy box text indicates the product cannot be shipped to the profile's current delivery location, so no sold_by/ships_from/merchant info is shown. Amazon hides seller and fulfillment facts when the destination is unsupported; the library detects this via isDeliveryLocationBlocked(payload.buybox_text) and tells the user to switch the delivery address.

Source

Thrown at clis/amazon/offer.js:129

    domain: 'amazon.com',
    strategy: Strategy.COOKIE,
    navigateBefore: false,
    args: [
        {
            name: 'input',
            required: true,
            positional: true,
            help: 'ASIN or product URL, for example B0FJS72893',
        },
    ],
    columns: ['asin', 'price_text', 'sold_by', 'ships_from', 'is_amazon_sold', 'is_amazon_fulfilled'],
    func: async (page, kwargs) => {
        const input = String(kwargs.input ?? '');
        const payload = await readOfferPayload(page, input);
        const normalized = normalizeOfferPayload(payload);
        if (!normalized.sold_by && !normalized.ships_from && !normalized.merchant_info_text) {
            if (isDeliveryLocationBlocked(payload.buybox_text)) {
                throw new CommandExecutionError('amazon offer buy box is blocked by the current delivery location', 'The shared Chrome profile is not set to the target US delivery address. Switch Amazon delivery location to the requested US destination, reopen the product page, and retry.');
            }
            throw new CommandExecutionError('amazon offer surface did not expose seller or fulfillment facts', 'The product page may have changed. Open the product page in Chrome, make sure the buy box is visible, and retry.');
        }
        return [normalized];
    },
});
export const __test__ = {
    extractShipsFrom,
    extractSoldBy,
    isDeliveryLocationBlocked,
    normalizeOfferPayload,
};

View on GitHub (pinned to 49907e53dc)

Solutions

  1. In the shared Chrome profile, change Amazon's delivery location to the target US ZIP code and retry
  2. Verify manually: open the product page and check whether the buy box says it cannot ship to your location
  3. Confirm the requested product is actually purchasable/stocked for US delivery
  4. Automate setting the delivery ZIP before scraping if your workflow uses varied destinations
Defensive patterns

Strategy: validation

Validate before calling

// ensure the profile's Amazon delivery location is a US ZIP before offer calls
// (manual step or a helper that sets the ZIP on amazon.com)
await setAmazonDeliveryZip('10001'); // then run the offer command

Try / catch

try {
  return await opencli.call('amazon offer', { input: asin });
} catch (e) {
  if (/blocked by the current delivery location/.test(e.message)) {
    await setAmazonDeliveryZip(targetZip);
    return opencli.call('amazon offer', { input: asin });
  }
  throw e;
}

Prevention

When it happens

Trigger: Running amazon offer on a product where the normalized payload has no sold_by, ships_from, or merchant_info_text AND the buybox_text matches delivery-location-block patterns (e.g. 'cannot be shipped to your selected delivery location').

Common situations: Shared Chrome profile set to a non-US zip/postal code; scraping a US-only product from a profile defaulted to another country; delivery location cookie reset to Amazon's detected location; product not sold to the configured address.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/3fcb0b6d1f579631. Report an issue: GitHub.