Troubleshooting GitLab for Jira Cloud app administration
DETAILS: Tier: Free, Premium, Ultimate Offering: Self-managed
When administering the GitLab for Jira Cloud app, you might encounter the following issues.
For user documentation, see GitLab for Jira Cloud app.
Sign-in message displayed when already signed in
You might get the following message prompting you to sign in to GitLab.com when you're already signed in:
You need to sign in or sign up before continuing.
The GitLab for Jira Cloud app uses an iframe to add groups on the settings page. Some browsers block cross-site cookies, which can lead to this issue.
To resolve this issue, set up OAuth authentication.
Manual installation fails
You might get one of the following errors if you've installed the GitLab for Jira Cloud app from the official marketplace listing and replaced it with manual installation:
The app "gitlab-jira-connect-gitlab.com" could not be installed as a local app as it has previously been installed from Atlassian Marketplace
The app host returned HTTP response code 401 when we tried to contact it during installation. Please try again later or contact the app vendor.
To resolve this issue, disable the Jira Connect Proxy URL setting.
-
In GitLab 15.7:
- Open a Rails console.
- Execute
ApplicationSetting.current_without_cache.update(jira_connect_proxy_url: nil)
.
-
In GitLab 15.8 and later:
- On the left sidebar, at the bottom, select Admin Area.
- On the left sidebar, select Settings > General.
- Expand GitLab for Jira App.
- Clear the Jira Connect Proxy URL text box.
- Select Save changes.
Invalid JWT
Data sync fails with If the GitLab for Jira Cloud app continuously fails to sync data, it may be due to an outdated secret token. Atlassian can send new secret tokens that must be processed and stored by GitLab.
If GitLab fails to store the token or misses the new token request, an Invalid JWT
error occurs.
To resolve this issue on GitLab self-managed, follow one of the solutions below, depending on your app installation method.
-
If you installed the app from the official marketplace listing:
- Open the GitLab for Jira Cloud app on Jira.
- Select Change GitLab version.
- Select GitLab.com (SaaS).
- Select Change GitLab version again.
- Select GitLab (self-managed).
- Enter your GitLab instance URL.
- Select Save.
-
If you installed the GitLab for Jira Cloud app manually:
- In GitLab 14.9 and later:
- Contact the Jira Software Cloud support and ask to trigger a new installed lifecycle event for the GitLab for Jira Cloud app in your group.
- In all GitLab versions:
- Re-install the GitLab for Jira Cloud app. This method might remove all synced data from the Jira development panel.
- In GitLab 14.9 and later:
Failed to update the GitLab instance
When you set up the GitLab for Jira Cloud app, you might get a Failed to update the GitLab instance
error after you enter your self-managed instance URL.
To resolve this issue, ensure all prerequisites for your installation method have been met:
- Prerequisites for connecting the GitLab for Jira Cloud app
- Prerequisites for installing the GitLab for Jira Cloud app manually
If you have configured a Jira Connect Proxy URL and the problem persists after checking the prerequisites, review Debugging Jira Connect Proxy issues.
If you're using GitLab 15.8 and earlier and have previously enabled both the jira_connect_oauth_self_managed
and the jira_connect_oauth
feature flags, you must disable the jira_connect_oauth_self_managed
flag
due to a known issue. To check for these flags:
-
Open a Rails console.
-
Execute the following code:
# Check if both feature flags are enabled. # If the flags are enabled, these commands return `true`. Feature.enabled?(:jira_connect_oauth) Feature.enabled?(:jira_connect_oauth_self_managed) # If both flags are enabled, disable the `jira_connect_oauth_self_managed` flag. Feature.disable(:jira_connect_oauth_self_managed)
Debugging Jira Connect Proxy issues
If you set Jira Connect Proxy URL to https://gitlab.com
when you
set up your instance, you can:
- Inspect the network traffic in your browser's development tools.
- Reproduce the
Failed to update the GitLab instance
error for more information.
You should see a GET
request to https://gitlab.com/-/jira_connect/installations
.
This request should return a 200 OK
, but it might return a 422 Unprocessable Entity
if there was a problem.
You can check the response body for the error.
If you cannot resolve the problem and you are a GitLab customer, contact GitLab Support for assistance. Provide GitLab Support with:
- Your GitLab self-managed instance URL.
- Your GitLab.com username.
- If possible, the
X-Request-Id
response header for the failedGET
request tohttps://gitlab.com/-/jira_connect/installations
. - Optional. A HAR file that captured the problem that you have processed with the harcleaner utility.
The GitLab Support team can then look up why this is failing in the GitLab.com server logs.
GitLab Support
NOTE: These steps can only be completed by GitLab Support.
In Kibana, the logs should be filtered for
json.meta.caller_id: JiraConnect::InstallationsController#update
and NOT json.status: 200
.
If you have been provided the X-Request-Id
value, you can use that against json.correlation_id
to narrow down the results.
Each GET
request to the Jira Connect Proxy URL https://gitlab.com/-/jira_connect/installations
generates two log entries.
For the first log:
-
json.status
is422
. -
json.params.value
should match the GitLab self-managed URL[[FILTERED], {"instance_url"=>"https://gitlab.example.com"}]
.
For the second log, you might have one of the following scenarios:
- Scenario 1:
-
json.message
,json.jira_status_code
, andjson.jira_body
are present. -
json.message
isProxy lifecycle event received error response
or similar. -
json.jira_status_code
andjson.jira_body
might contain the response received from the self-managed instance or a proxy in front of the instance. - If
json.jira_status_code
is401
andjson.jira_body
is empty, Jira Connect Proxy URL might not be set tohttps://gitlab.com
.
-
- Scenario 2:
-
json.exception.class
andjson.exception.message
are present. -
json.exception.class
andjson.exception.message
contain whether an issue occurred while contacting the self-managed instance.
-
Error when connecting the app
When you connect the GitLab for Jira Cloud app, you might get one of these errors:
Failed to load Jira Connect Application ID. Please try again.
Failed to link group. Please try again.
When you check the browser console, you might see the following message:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://gitlab.example.com/-/jira_connect/oauth_application_id. (Reason: CORS header 'Access-Control-Allow-Origin' missing). Status code: 403.
A 403 Forbidden
is returned if the user information cannot be fetched from Jira because of insufficient permissions.
To resolve this issue, ensure the Jira user that installs and configures the app meets certain requirements.