•  
      request #9532 Eclipse Tuleap Plugin not working with 8.x
    Infos
    #9532
    Kelly Ferrone (kferrone)
    2016-10-11 22:23
    2016-09-29 21:07
    9800
    Details
    Eclipse Tuleap Plugin not working with 8.x

    Recently we have just performed a full re-install of Tuleap since our old one was quite out of date. We held off so long on upgrading because every time we tried, afterwards, the Eclipse Mylyn Tuleap plugin would start failing.

    Now we have a new OS, new server, new Tuleap, new server admin, new Eclipse, new SSL, and basically new everything else too. Now that everything is brand spankin new I can truly confirm Eclipse can't connect to the new Tuleap. We still have our older Tuleap and Eclipse connects just fine. 

    Here is the response from our new tuleap in eclipse:

    POST /api/v1/tokens

    body:

    {"username":"someUser","password":"(hidden in debug)"}

    ________

    response:

    HTTP/1.1 201 Created

    body:{"user_id":100,"token":"sometoken","uri":"tokens\/sometoken"}

    An exception stack trace is not available.

    Now here is the response from our old Tuleap:

    POST /api/v1/tokens

    body:

    {"username":"someUser","password":"(hidden in debug)"}

    ________

    response:

    HTTP/1.1 200 OK

    body:

    {"user_id": 100,"token": "sometoken","uri": "tokens/sometoken"}

    Now why in the heck does the newer tuleap return a 201 and the older one returns a 200? The fact both will return a valid token is really weird. I used both tokens from eclipses attempt at logging in, then used some curl to test them out and I received all kinds of data back from new and old. 

    I think it has something to do with the "/api/v1/tokens" enpoint. On all the docs for the API I see it is 3.x now. Also the docs say a token is at the "/api/tokens" endpoint, i.e. no v1 in the enpoint. 

    The following commands are both on the new tuleap and they kinda show the issue:

     - this one does not have the v1 and it works with a 200 response. 

    curl -XPOST --header 'Content-type: application/json' -d '{"username":"someuser", "password":"somepasword!"}' https://tuleap.example.com/api/tokens -i

     - when the same command is run with the v1 you will receive a 201 response. 

    curl -XPOST --header 'Content-type: application/json' -d '{"username":"someuser", "password":"somepasword!"}' https://tuleap.example.com/api/v1/tokens -i

    Is anyone else having this issue? Can anyone point me in the right direction to fix this? 

    Mylyn
    8.19
    CentOS 6
    • [x] enhancement
    • [x] internal improvement
    Empty
    Stage
    Empty
    New
    Empty
    Attachments
    The tuleap update site from Market
    Tuleap install from mylyn
    No projects in list when creating query
    Tuleap.net gets the project list
    References
    References list is empty

    Follow-ups

    User avatar

    Now why in the heck does the newer tuleap return a 201 and the older one returns a 200? The fact both will return a valid token is really weird. I used both tokens from eclipses attempt at logging in, then used some curl to test them out and I received all kinds of data back from new and old. 

    Just for reference, because the older version didn't follow the RFC. The HTTP RFC tells us to return 201 when POST created a new resource.

    For the v1 vs no version specified, its the very same routes. If you don't specify the version, you fallback to v1.

    User avatar

    I just tried the following in my terminal with and without the "v1" and it returns a list of projects as expected. I'm pretty sure it's not my Tuleap server. 

    curl -XGET --header 'Content-type: application/json' \
      --header 'X-Auth-Token: someToken' \
      --header 'X-Auth-UserId: 100' \
      https://tuleap.mycompany.com/api/projects/

    User avatar

    Well this is interesting too. Even though I can now authenticate successfully, I still get the same error as before but Eclipse just doesn't complain now. 

    POST /api/v1/tokens
    body:
    {"username":"someUser","password":"(hidden in debug)"}
    __________
    response:
    HTTP/1.1 201 Created
    body:
    {"user_id":100,"token":"someToken","uri":"tokens\/someToken"}

    User avatar
    That's weird, clicking the "Refresh" button does nothing? Can you open the Error Log view and see if there's any errors related to the query?

    Patrick
    User avatar
    last edited by: Kelly Ferrone (kferrone) 2016-09-29 22:43

    Well it worked and I logged in and added the repo successfully. Unfortunately I don't have the option to select a project when I am creating a query now?!

    See attached screenshot

    Here is the response from the debugger:

    GET /api/v1/projects?limit=50
    __________
    response:
    HTTP/1.1 200 OK
    body:
    []


    User avatar
    Yea I'm currently trying to figure out what was the release train of the older connector so I can do something similar. I recently just picked up the code base of the old connector (which was unmaintained before) so there are still some quirks like this that need to be adressed. I should be able to release a newer "newer" version next week, if you have any more issues concerning the connector don't hesitate to open a ticket! For now I'll be waiting for more information on this one, hopefully the 2.0 build from 2016 fixes your problem.

    Patrick
    User avatar

    Ok now I'm really confused, what you just gave me is a lower version than what I had?

    This one came from the "Install more connectors" in the "Add repository" wizard from Mylyn 
     - Location: http://eclipse.tuleap.net/mylyn.tasks/stable/
     - Mylyn Tasks Connector: Tuleap    2.2.0.I20141015-0736    org.tuleap.mylyn.task-feature.feature.group    Eclipse Mylyn

    This one came from the Eclipse marketplace on the web and what you just gave me: 
     - Location: http://eclipse.tuleap.net/mylyn.tasks/update/
     - Mylyn Tasks Connector: Tuleap    2.0.0.I20160921-1457    org.tuleap.mylyn.task_feature.feature.group    Eclipse Mylyn

    I'll try the lower version and let you know what happens. 

    I have attached some screenshots to show the difference in the repos. 


    User avatar
    I'm not exactly sure this ui from mylyn reflect the latest update site... I can ask the mylyn devs but I'm pretty it does not, as this was indeed fixed a few commits ago. If you want to install it from the latest update site, go to help->install new software (from eclipse), copy paste the following update site at the box and install the feature :

    http://eclipse.tuleap.net/mylyn.tasks/update/

    You can also install it using the marketplace. Please tell me if it works! I think the version will be the same, as even though the connector was patched, the version wasn't correctly incremented (this is to be fixed soon!)

    Patrick
    User avatar
    Latest connector? I installed by selecting "Add Repository" in Mylyn, then "Install More Connectors," then selecting Tuleap and install. Is that one not the latest? What is the version of the latest one?
    User avatar
    Hi @kferrone, have you tried using the latest connector from the marketplace? This bug was fixed a few weeks ago as the new tuleap server now respects some specifications in regards to creating resources.
    User avatar

    So I just tried to log into "https://tuleap.net/" with eclipse and received the exact same problem.  I also had my team try with their Macs, Windows, and Linuxes and we all received the same error on ours and tuleap.net. I even tried a fresh and super minimal eclipse with only the Tuleap plugin installed but still the same problem.  So now I can truly confirm the problem is with Eclipse connecting to 8.x Tuleap.