Error viewing files in web browser
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Purpose
The purpose of this KB article is to explain the potential cause behind this issue and a solution for resolving it.
Diagnosis
- You attempt to view a file within your repository source in a web browser, but you receive some variant of the following error messages:
- Having trouble showing that file.
Normally, you'd see the file here, but something didn't go right. - Something went wrong
- Having trouble showing that file.
Procedure
The most likely root cause behind this issue is that either a browser add-on or an application on your local machine is intercepting and interfering with the API GET request that is sent to retrieve the file contents and display this within your browser.
It is recommended that you disable all add-ons in your browser, clear the browser cache and attempt to load the file again as a first step (alternative you can also use Incognito mode if using Google Chrome).
If this does not resolve the issue:
- Refer to our documentation for analyzing web requests within your browser of choice
- Attempt to load the file within your browser, locate the HTTP request that is encountering an error and select it to view its contents - this is usually indicated by an error response code of 400/500
- Check the request URL and verify if there are any abnormal parameters appended to the end of the URL - these are indicated by a "&" symbol:
Normal URL:
https://bitbucket.org/!api/2.0/repositories/workspaceID/reposlug/src/commithash/file.extension?format=meta
Problematic URL:
https://bitbucket.org/!api/2.0/repositories/workspaceID/reposlug/src/commithash/file.extension?format=meta&_sm_nck=1 - If there is an added parameter at the end of the URL, you will need to identify the culprit application and either whitelist the https://bitbucket.org website or disable/uninstall the application - this issue is usually caused by firewall/antivirus software
If the root cause detailed in the Procedure section does not reflect your situation, or if you are still encountering issues after following the steps contained within this knowledge article - please feel free to raise a support ticket or raise a community support ticket for further assistance.