The TypeError: Failed to fetch error occurs when your browser cannot complete a request to Object Storage Service (OSS). It has two common causes: a network connectivity problem, or an ad blocker plug-in silently blocking the request because the bucket or object name contains the string ad.
Diagnose and fix the error
Work through the following steps in order. Stop as soon as the error is resolved.
Step 1: Check your network connection
Run the ping command against your OSS endpoint to verify connectivity. If the ping fails or shows high packet loss, fix your network issue before continuing.
Step 2: Check for an ad blocker plug-in
Note: If your bucket or object name containsadas a substring — for example,adtestoraadb— an ad blocker plug-in may silently block the OSS request, producing aTypeError: Failed to fetcherror with no other indication in the browser.
If an ad blocker plug-in is installed, do one of the following:
Disable the plug-in, then retry the request.
Add the OSS domain name to the plug-in's allowlist, then retry the request.
If the error persists after disabling or allowlisting, continue to Step 3.
Step 3: Rename the bucket or object
If the bucket or object name contains ad as a substring, rename it to remove the ad characters. The following examples show names that are likely to trigger blocking and safer alternatives:
| Name (likely blocked) | Suggested alternative |
|---|---|
adtest | mediatest |
aadb | aab |
After renaming, retry the request.
Applicable scope
OSS