Browser console log returns error 403 when browsing Jenkins UI components

Article ID:360032918931
1 minute readKnowledge base

Issue

  • We are unable to see a component in Jenkins. When we check the log, we see an error of "traits.js" failing to be retrieved, making a 403 forbidden in the console.

Resolution

Check if CloudBees Request Filter is enabled and see the regular expressions attached to it.

The following one causes the crash:

./api/\w+(?!.tree=.).

1.- Go to Manage Jenkins > System Configuration

2.- Scroll down to Request Filtering

3.- Check if the rule is: ./api/\w+(?!.tree=.). If it is, it is likely filtering the api/ URLS, thus, failing to retrieve the traits.js what causes the 403 error and prevents you to see components, such as dropdowns.

4.- Delete it, or change the regular expression to one that allows the API to pass and blocks the desired ones.

If the problem persists, please open a support ticket including a Support Bundle, including all the Configuration options, such a Jenkins Root Configuration
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.