401 Unauthenticated page is shown even after being authenticated with Jira

Some times when you try to access Jira Assistant, you may not be able to access it and 401 Unauthenticated error page is displayed as shown in following screenshot:

image

Reasons: Primarily their are 3 known reasons for this error to happen and are as follows:

  1. You are not authenticated with Jira in same browser. To ensure if you are authenticated just click on "Open Jira url" button from the screen and see if Jira opens and you were able to access it.
  2. Your company has blocked access to Jira API's and hence this tool was not able to access the API's. If others in your company is able to use Jira Assistant or if you were able to use Jira Assistant when you reinstall, then this may not likely be the case and can be ignored.
  3. Some how permission for the extension to access Jira Url is revoked. Look at the details below to grant permission for Jira Assistant.

Check if Permission is granted for Jira Assistant:

  1. Look at the console and see if their are any warnings about the permission like "Permission not granted for ***" as shown in below screenshot: image

  2. Go to extension details page and see if Site access permission is revoked like shown in following screenshots. Note both the below screenshot represent that the extension access to Jira is revoked: image (or) image

If you see any of the above mentioned issue, then it means either you or your organization has revoked access to the extension intentionally or unintentionally. This could have happened due to some other extenal settings / installations as well. To resolve this issue grant access to extension by following one of the way shown below.

Granting Permission for Jira Assistant: You will have to grant access to all the Jira servers you integrate with Jira Assistant. Their are two ways to grant access to extension.

  1. Simple but less secured way is to grant access to all the sites just by selecting "On all sites" under "Site access" like shown in following screenshot: image

  2. Most secured and recommended way is to individually grant access to each and every Jira Server you integrate with Jira Assistant. To do that select "On specific sites" under "Site access" and add all the Jira Server root url. This would provide access only to the mentioned sites and is more secure. image

Note: In Chrome, to open extension details page, right click on JA icon in your browser and click Manage extension.

This issue has been resolved and would be available with Jira Assistant v2.37. But this update would be installed only for chrome users above v102. Hence if any of you are using older version of chrome, you are requested to upgrade to latest version of chrome which is also recommended for your safe browsing.

This fix is available in Jira Assistant v2.37 and is available for users of Chrome v102.x. Kindly update your browser before trying to upgrade to latest version of JA.

I have chrome 103, and latest JA, but I am still getting this error. When I look at Console the only thing I see is the below and my only recourse is to remove the extension and add it back in:

DevTools failed to load source map: Could not load content for chrome-extension://momjbjbjpbcbnepbgkkiaofkgimihbii/static/js/index.04954243.js.map: System error: net::ERR_FILE_NOT_FOUND

index.04954243.js:2 Chrome Browser service injected

index.04954243.js:2 Settings already migrated

DevTools failed to load source map: Could not load content for chrome-extension://momjbjbjpbcbnepbgkkiaofkgimihbii/static/js/502.fe1cc893.chunk.js.map: System error: net::ERR_FILE_NOT_FOUND

Hi @lweisberg - Their are more details provided in my initial post above to check for the permission. Have you looked at it? If not next time when the issue happens, please have a look at it and see if that is the case for you.

Additionally, you mentioned your chrome version is 103, but what is your Jira Assist version? It should be v2.37 or higher.

Hi @lweisberg - If this issue happens again, kindly provide your console screenshot. So far no one has ever provided any console screenshot of the 401 page when this issue happend.

Moreover I forgot to mention this last time: The fix provided is to show an additional button to "Grant Permission" to that Url and the fix does not prevent this issue from happening. Instead if it happens, you need not reinstall the extension, instead just click on this "Grant Permission" button and the permission would be granted for the extension. But why this permission is getting removed for some user is still unknown and so I was not able to provide any solution for that: image

Thanks.. I'll keep it in mind, but I am pretty sure they I tried clicking on grant permission... Should they have popped up dinner kind of login page?

On Wed, Jul 13, 2022, 6:22 PM Shridhar TL @.***> wrote:

Hi @lweisberg https://github.com/lweisberg - If this issue happens again, kindly provide your console screenshot. So far no one has ever provided any console screenshot of the 401 page when this issue happend.

Moreover I forgot to mention this last time: The fix provided is to show an additional button to grant access to that Url and the fix does not prevent this issue from happening. Instead if it happens, you need not reinstall the extension, instead just click on this grant access button and the permission would be granted for the extension. But why this permission is getting removed for some user is still unknown and so I was not able to provide any solution for that: [image: image] https://user-images.githubusercontent.com/37339683/178770141-afcee50c-8978-4cea-af89-d8003e7c9a3d.png

— Reply to this email directly, view it on GitHub https://github.com/shridhar-tl/jira-assistant/issues/214#issuecomment-1183360924, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCRJLQEZ2Z7MZ7CDXF755LVT3NJVANCNFSM5YMKUTIA . You are receiving this because you were mentioned.Message ID: @.***>

Hi - I got the 401 yesterday but clicking on the grant permission remedied the issue. I am also sending you some screen captures from that time. I hope it helps,

[image: image.png]

Click on Grant permission:
[image: image.png] I was then brought successfully to the JA dashboard.

Thanks! Larry

On Wed, Jul 13, 2022 at 6:56 PM Larry Weisberg @.***> wrote:

Thanks.. I'll keep it in mind, but I am pretty sure they I tried clicking on grant permission... Should they have popped up dinner kind of login page?

On Wed, Jul 13, 2022, 6:22 PM Shridhar TL @.***> wrote:

Hi @lweisberg https://github.com/lweisberg - If this issue happens again, kindly provide your console screenshot. So far no one has ever provided any console screenshot of the 401 page when this issue happend.

Moreover I forgot to mention this last time: The fix provided is to show an additional button to grant access to that Url and the fix does not prevent this issue from happening. Instead if it happens, you need not reinstall the extension, instead just click on this grant access button and the permission would be granted for the extension. But why this permission is getting removed for some user is still unknown and so I was not able to provide any solution for that: [image: image] https://user-images.githubusercontent.com/37339683/178770141-afcee50c-8978-4cea-af89-d8003e7c9a3d.png

— Reply to this email directly, view it on GitHub https://github.com/shridhar-tl/jira-assistant/issues/214#issuecomment-1183360924, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCRJLQEZ2Z7MZ7CDXF755LVT3NJVANCNFSM5YMKUTIA . You are receiving this because you were mentioned.Message ID: @.***>

Oh man, I wish I had seen this sooner. I had one Mac on macOS Catalina with JA 2.33 and Chrome that I've just replaced that did this constantly, and I never found a way to deal with it other than uninstalling and reinstalling the extension. The only possible reason was reason #3; no one else was experiencing the problem like I was, and I definitely accessed Jira from the same browser (typically, it would occur subsequent to being timed out in Jira, but logging in again would not help JA). I still have it around though, and it happened constantly, so I can get you logs from the next time.

Hi @lweisberg - Happy to know "Grant permission" button resolves your issue. So that confirms, permission is getting removed for some users and of course how it gets removed is something hard to find. But as far the click of button resolves the issue, we should be good going with it.

Additionally, in your previous comment you mentioned you are attaching screenshots. But I don't see any screenshots. Anyway, as we could confirm its the permission issue, I don't think console screenshots would help further. Initially I asked for screenshot only in case where permission is not an issue.

Hi @novosirj , no issues. Just ensure you are using the latest version of Jira Assistant (v2.38 as on date) and you try to Grant Permission as mentioned above. If issues is still not resolved, then console screenshot may help identifying the root cause.

Assuming this issue is resolved, closing this issue. If anyone else face it again, please reopen this issue with console screenshot.

Thanks - I'll check next time it happens, but it has happened many times in the past half year or so, and I've never had any issues with logging into jira itself. Larry

On Fri, Jul 8, 2022 at 5:27 AM Shridhar TL @.***> wrote:

Hi @lweisberg https://github.com/lweisberg - Their are more details provided in my initial post above to check for the permission. Have you looked at it? If not next time when the issue happens, please have a look at it and see if that is the case for you.

Additionally, you mentioned your chrome version is 103, but what is your Jira Assist version? It should be v2.37 or higher.

— Reply to this email directly, view it on GitHub https://github.com/shridhar-tl/jira-assistant/issues/214#issuecomment-1178470096, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCRJLS22PCPCZFX5NNXYDLVS6G2ZANCNFSM5YMKUTIA . You are receiving this because you were mentioned.Message ID: @.***>

Screen Shot 2022-10-11 at 4 35 57 PM Screen Shot 2022-10-11 at 4 36 36 PM I'm getting the error as discussed above, but when I click the 'Grant Access' button I just get the same error page. I'm on JA v.2.39 and Chrome Version 106.0.5249.103 (Official Build) (arm64) MacOs 12.6 JA has worked fine for me in the past but I haven't used it in probably a month and now I get this message. I'm going to try reinstalling it and see if that works.


Note: it does work after re-install.

Hi @timjosborn - First of all, you are using old version of JA. Current version is v2.41. Please update to the latest version so that you get lots of bug fixes and new features added in this version.

Hi @timjosborn - First of all, you are using old version of JA. Current version is v2.41. Please update to the latest version so that you get lots of bug fixes and new features added in this version.

Thank you! It seems to be working fine on 2.41.

@shridhar-tl I am getting a CORS error. This is not discussed already in this thread. Is there a workaround for this? Below is the full error:

Access to fetch at 'https://MY_SITE.atlassian.net/rest/api/2/myself' from origin 'chrome-extension://momjbjbjpbcbnepbgkkiaofkgimihbii' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I tried https://app.jiraassistant.com/ too. I get 200 but gets redirected to 401 page. There are no errors in the Network tab too.

🟢