Encountering "An error occurred while loading the file" error when viewing content on GitLab.com
Issue
You may encounter an "An error occurred while loading the file. Please try again." error when attempting to view certain content on GitLab.com.
Impacted rendered content includes:
- Issue / MR / Epic descriptions
- Comments
- Wiki Pages
Environment
-
The issue occurs when viewing specific pages or content on GitLab.com.
-
Impacted offerings:
- GitLab.com
Cause
When rendering certain content, GitLab will check if a link exists to a group's epics. As reported in this issue, GitLab will try to render a link to a user's epic, which will not exist. For example, if you provide the value of PLACEHOLDER
, it will attempt to locate an epic for the user gitlab
, if the user exists. This returns a failure and prevents the content from rendering.
Workaround
- If available, display content using the "Raw" option, instead of "Rendered file".
- Amend
?plain=1
to the URL you are trying to access, which should render the content in plain text, if available. - Delete references to the invalid epic, ensuring the provided path reference represents a valid group namespace.
Related links
- GitLab.com issue to address this behavior.