Error loading jira issue list

Alexey Ermilov March 18, 2014

Hello!

We're trying UseTFS but cannot get it work.

We have VS2010, UseTFS plugin is installed on Jira 6.2 and successfully scanned TFS 2012 check-ins. There are no errors with connection from UseTFS Settings application to Jira&UseTFS plugin.

But when we try to check-in pending changes to TFS (accoring to UseTFS check-in policy), we get an empty list of jira issues in Jira Issue list ver 2.9.4 application. There is nothing in Event Log about UseTFS error.

https://dl.dropboxusercontent.com/u/5090253/UseTFS_err.png


How to fix that?

Thanks in advance.

2 answers

0 votes
Alexey Ermilov March 18, 2014

Hello!

1. When I start UseTFS client, I get an information window 'You are currently running trial version of UseTFS. Trial days remaining: 29'. So I think there's no connection problems between client and Jira.

2. I've got a responce - full list of filters:

<filters><filters><name>All active tasks</name><id>10003</id><jql>status in (Open, "In Progress", Reopened)</jql><owner>aermilov</owner></filters><filters><name>All my active tasks</name><id>10002</id><jql>assignee = currentUser() AND status in (Open, "In Progress", Reopened)</jql><owner>aermilov</owner></filters><filters><name>All my tasks</name><id>10001</id><jql>assignee = currentUser()</jql><owner>aermilov</owner></filters><filters><name>Filter for BLS Board</name><id>10800</id><jql>project = BLS ORDER BY Rank ASC</jql><owner>aermilov</owner></filters><username>aermilov</username><filterscount>4</filterscount></filters>

3. Yep, I was looking for error logs in Event Viewer. Anyway 'CurrentLog.txt' is empty in UseTFS installation folder.

4. If I try to enable 'Is on-demand JIRA Instance' I get error 'I'm sorry but seems that there is a problem with license of UseTFS JIRA plugin'. May be it is because of trial version, i don't know..

Alexey Ermilov March 18, 2014

1. When I press Double click here to associate checkin with JIRA issue I get 403 response:

HTTP/1.1 400 Bad Request
Connection: Keep-Alive
Transfer-Encoding: chunked
Date: Wed, 19 Mar 2014 13:30:01 GMT
Content-Type: application/json;charset=UTF-8
Server: Apache-Coyote/1.1
X-AREQUESTID: 1050x7729x1
X-AUSERNAME: anonymous
Cache-Control: no-cache, no-store, no-transform
X-Content-Type-Options: nosniff

74
{"errorMessages":["Field 'assignee' does not exist or this field cannot be viewed by anonymous users."],"errors":{}}
0

Request:

GET http://jira.koruswms.ru/rest/api/2/search?jql=assignee%20%3D%20currentUser()%20ORDER%20BY%20updated&startAt=0&maxResults=100 HTTP/1.1
Accept: application/json
User-Agent: RestSharp 102.7.0.0
Host: jira.koruswms.ru
Cookie: atlassian.xsrf.token=B3P6-C91S-T67Y-ZRNZ|43e73e7e222a437bca1749b5ed73554c776a1781|lout; fields=System.String[]
Accept-Encoding: gzip, deflate

2. When I press 'Refresh queries' or 'Search' I get interesting 403 response:

HTTP/1.1 400 Bad Request
Connection: Keep-Alive
Transfer-Encoding: chunked
Date: Wed, 19 Mar 2014 13:25:37 GMT
Content-Type: application/json;charset=UTF-8
Server: Apache-Coyote/1.1
X-AREQUESTID: 1045x7701x1
X-AUSERNAME: anonymous
Cache-Control: no-cache, no-store, no-transform
X-Content-Type-Options: nosniff

d8
{"errorMessages":["Error in the JQL Query: Expecting operator but got 'to'. The valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'. (line 1, character 10)"],"errors":{}}
0

Request:

GET http://jira.koruswms.ru/rest/api/2/search?jql=Assigned%20to%20me%20%5BPredefined%5D&startAt=0&maxResults=100 HTTP/1.1
Accept: application/json
User-Agent: RestSharp 102.7.0.0
Host: jira.koruswms.ru
Cookie: atlassian.xsrf.token=B3P6-C91S-T67Y-ZRNZ|43e73e7e222a437bca1749b5ed73554c776a1781|lout; fields=System.String[]
Accept-Encoding: gzip, deflate

Andrzej Pasterczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 18, 2014

Interesting. Could you check with Fiddler4 ( http://www.telerik.com/download/fiddler what are requests/responses when the plugin communicates with JIRA ?

Andrzej Pasterczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 18, 2014

OK, that's weird...

First case - you can query by assignee in JIRA with this user, correct?

In the second case it seems the client treats this query as plain JQL...

Can you type in e.g. project = SOME_PROJECT in the filter name and hit enter.

BTW - thanks for your time with troubleshooting this.

Alexey Ermilov March 19, 2014

Hello!

I successfully get list of all issues by requesting "http://jira.koruswms.ru/rest/api/2/search?" in browser.

Also I get list of issues by specified project by requesting "http://jira.koruswms.ru/rest/api/2/search?jql=project=Development".

Query with user name in request string also works.

I have an idea.. can this error be because of my user? I use domain user on my development machine to work with VS&TFS, but in JIRA my user is not domain though it has the same name.

P.S. In UseTFS client application I entered correct non-domain user and password. Also Atlassian connector for VS works fine.

Andrzej Pasterczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2014

Well, unless you've selected NTLM authentication in UseTFS settings it should not make difference which user is logged in as long as user/pass in settings is correct (non-domain).

One more thing - do you start Visual Studio "as Administrator"? If not please try that. That's the only thing that I can think of right now that might have some impact...

If that fails we'll try to add some more logging to client and provide you with new version.

Alexey Ermilov March 19, 2014

1. Use NTLM authentication setting is Off.

2. VS2010 starts as Administrator.

Okay, let's try to add logging to client. How to do that?
As I understand, problem begins with response "Field 'assignee' does not exist or this field cannot be viewed by anonymous users" that causes empty filters list

Andrzej Pasterczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2014

We have to add it to source code first and build new package for you. There is something odd as all check-in policy related errors should go to event log with details so the problem is probably specific to your workstation setup.

In the meantime two more things worth trying on your side:

  • does it work on any other machine / with other jira user credentials?
  • cleaning settings
    • close the UseTFS client in tray
    • remove HKEY_CURRENT_USER\Software\Pigsty
      from registry
    • start tray client again and configure it
Alexey Ermilov March 19, 2014

We've tried UseTFS client on 2 different machines with differens users (also non-domain for JIRA) - the same erorrs.

Cleaning Registry entries also didn't help.

BTW, I've just got an error in Event Viewer with Source='UseTFS Check-in policy':

Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.ReadInternal()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter, Boolean inArray)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at Pigsty.Jira.JiraApi.Execute[T](RestRequest request)
   at Pigsty.Jira.JiraApi.Usetfs_GetFilters()
   at Pigsty.UseTFS.CheckinPolicy.JiraIssueList.LoadQueries()
Alexey Ermilov March 19, 2014

Oh, I forgot one more thing.

I get error when try to use (from system tray) UseTFS Client-> Administration -> Repositories Configuration:

Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Line 0, position 0.
   в Newtonsoft.Json.JsonTextReader.ParseValue()
   в Newtonsoft.Json.JsonTextReader.ReadInternal()
   в Newtonsoft.Json.JsonTextReader.Read()
   в Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter, Boolean inArray)
   в Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType)
   в Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   в Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   в Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   в Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   в Pigsty.Jira.JiraApi.Execute[T](RestRequest request)
   в Pigsty.Jira.JiraApi.Usetfs_GetRepositories()
   в Pigsty.UseTFS.UseTfsWorkSynchronizerForm..ctor(Settings settings, JiraApi jiraApi)
   в Pigsty.UseTFS.Form1.repositoriesConfigurationToolStripMenuItem_Click(Object sender, EventArgs e)
   в System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   в System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)...

Andrzej Pasterczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2014

Hmmmm... then it seems you're getting non-json response (XML or HTML guessing on first character that is '<') which is odd as JIRA should respect 'Accept: application/json' header that I see is sent based on your previous fiddler info.

Can you check with fiddler again what you get in response on 'Repositories Configuration'?

Alexey Ermilov March 19, 2014

This is a request header:

GET http://jira.koruswms.ru/rest/usetfs/latest/repository HTTP/1.1
Authorization: Basic YWVybWlsb3Y6Y2FyYW1iYQ==
Accept: application/json, application/xml, text/json, text/x-json, text/javascript, text/xml

And response (sorry, I cannot insert whole response text due to 2000 chars limitation on comment) is XML:

...
&lt;TD width=400 colSpan=2&gt;&lt;FONT id=L_defaultr_4
      style="FONT: 8pt/11pt verdana; COLOR: #000000"&gt;&lt;ID id=L_defaultr_5&gt;&lt;B&gt;Explanation: &lt;/B&gt;There is a problem with the page you are trying to reach and it cannot be displayed.&lt;/ID&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
  &lt;TR&gt;
    &lt;TD width=400 colSpan=2&gt;&lt;FONT id=L_defaultr_6 
      style="FONT: 8pt/11pt verdana; COLOR: #000000"&gt;
      &lt;HR color=#c0c0c0 noShade&gt;

      &lt;P id=L_defaultr_7&gt;&lt;B&gt;Try the following:&lt;/B&gt;&lt;/P&gt;
      &lt;UL&gt;
        &lt;LI id=L_defaultr_8&gt;&lt;B&gt;Refresh page:&lt;/B&gt; Search for the page again by clicking the Refresh button. The timeout may have occurred due to Internet congestion.
&lt;LI id=L_defaultr_9&gt;&lt;B&gt;Check spelling:&lt;/B&gt; Check that you typed the Web page address correctly. The address may have been mistyped.
&lt;LI id=L_defaultr_10&gt;&lt;B&gt;Access from a link:&lt;/B&gt; If there is a link to the page you are looking for, try accessing the page from that link.

      &lt;/UL&gt;
      &lt;HR color=#c0c0c0 noShade&gt;

      &lt;P id=L_defaultr_11&gt;Technical Information (for support personnel)&lt;/P&gt;
      &lt;UL&gt;
        &lt;LI id=L_defaultr_12&gt;Error Code: 403 Forbidden. The server denied the specified Uniform Resource Locator (URL). Contact the server administrator. (12202)

        &lt;/UL&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;

Alexey Ermilov March 19, 2014

Very strange, because I successfully get repositories list in XML format using GET URL from request in browser..

Andrzej Pasterczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2014

Do you have some kind of internet proxy or server in between workstation and actual JIRA instance? This doesn't look like JIRA response at all, more like IIS which as far as I know can't host Jira directly but could be configured as reverse proxy.

If JIRA server is in your intranet where you could access it via some direct URL (instead of going through IIS) that might help.

Alexey Ermilov March 19, 2014

Very strange, because I successfully get repositories list in XML format using GET URL from request in browser..

Alexey Ermilov March 19, 2014

Hmm.. No, we don't use proxy. Atlassian connector for Visual Studio works fine at the same time. As well as all these requests from browser on the same machine.

Im not sure, that this is network problem.

Andrzej Pasterczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2014

...or enable NTLM in client, I'm not yet sure if that will help ( but my current guess is that you have IIS in front of JIRA that requires NTLM in addition to JIRA security settings.

If I try to access that URL from my machine I also get 403 in browser (even though I can see JIRA login page just fine). The only difference is probably that I'm not authenticated in your domain.

Alexey Ermilov March 19, 2014

Okay! We changed JIRA users from local to domain (Active Directory server), I set NTLM in client and got new error when trying to open jira filters list window:

"Object reference not set to an instance of an object". All buttons in Jira Issue list application are disabled (except Settings). No records in Event Viewer, no requests in Fiddler. Something wrong with client app :(

BTW, why client app don't save NTLM setting? Next time I start Settings , the "Use NTLM" is unchecked.

Andrzej Pasterczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2014

OK... I guess we'll have to replicate this somehow on our environment for debugging purposes. Is it possible for you to get some more details regarding configuration - is there really IIS infront of JIRA, what is the authentication required by IIS, etc. We can continue discussion over email - andrzej.pasterczyk@pigsty.com.pl

0 votes
Andrzej Pasterczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 18, 2014

Hi,

  1. Please double check UseTFS client connection configuration - make sure that it's connected to the right instance of JIRA.
  2. Can you check if there's any response from http://YOUR_JIRA_SERVER/rest/usetfs/latest/filters- you can just check it from web browser (though you'll probably get HTTP 401 Unauthorized).
  3. Just to make sure - I assume you were looking for any UseTFS related entry in Event Viewer (and not in the log file in UseTFS client installtion directory), correct?
  4. If you still have this issue try enabling "Is on-demand JIRA instance", that will change the behavior on how filters are download and possibly allow you to continue testing until we find the solution.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events