Menu

#7 Launchpad fails to sync when no user assigned bugs exist

Bug
open
Backends (5)
5
2011-03-28
2011-03-28
No

Launchpad dies if no user bugs are found as the urls used are not valid. I propose that to solve this a prompt could be displayed to the user telling them that they have no user assigned bugs and if they want to continue with subscriber bugs and reported bugs instead of just dying outright as is the case right now. I have tested this with my Launchpad account where I have no user assigned bugs but I do have reported bugs and I can't use Launchpad as a tracker due to this issue.

Discussion

  • Matt Barringer

    Matt Barringer - 2011-03-28

    It dies as in segfaulting? Could you run it in GDB and attach the debug output + stacktrace?

    Entomologist *should* just be skipping past empty bug lists. displaying nothing at all if a user doesn't have any bugs assigned/reported/cc'd, and it does that with all of my test accounts on the various trackers, but AFAIK the Launchpad support hasn't been used by anyone in a real-world situation yet so I don't know what bugs lurk in that backend.

     
  • David Williams

    David Williams - 2011-03-29

    After looking through the code and trying to find a way to fix it I found that the order it happened in wasn't what I expected. It seems to be fine with searching for subscriber bugs but for both user assigned and reported bugs it returns Host not found. I've tried figuring out why it keeps saying Host not found and I can't find the reason why its doing it, I've tried using the same url and the same error is returned after searching for subscriber bugs. I just can't seem to find why it's deciding to return Host not found with what is known to be a good url since it works first time.

     
  • David Williams

    David Williams - 2011-03-29

    I've also noticed that when I add the tracker it refuses to find the Host for user assigned bugs. It then adds the tracker and I can press Sync, it passes subscribed bugs fine(I have no subscribed bugs so it doesn't return anything) but again it refuses to proceed further. After reading through the Launchpad API all the calls seem valid and there doesn't appear to be a reason why it's failing, at worst it should return an empty string for everything apart from reported bugs but it's not even getting that far.

     
  • Matt Barringer

    Matt Barringer - 2011-03-29

    Is it QNetworkAccessManager saying "host not found", or is it reporting something that the Launchpad server is saying? AFAIK, Entomologist is the first non-launchpadlib program to interact with their server, and that unearths some problems that they didn't even know about (we have to use a fake cookie header to get past their proxies, for example).

     
  • David Williams

    David Williams - 2011-03-29

    It happens when QNetworkRequest attempts to get a reply from Launchpad. It must be something to do with Launchpad itself as the same URL query returns Host not found the second time it's used. I'll test it more and see if I can see anything else that's causing it and if not I'll file a bug with Launchpad about it.

     
  • Matt Barringer

    Matt Barringer - 2011-03-29

    What Qt version are you using? I remember reading something on a forum a while back where a user was complaining that QNetworkAccessManager would work for the first request but then not work for other requests, but I've never encountered that myself.

     
  • David Williams

    David Williams - 2011-05-09

    I've been trying again to get this to work and it seems like the behaviour is very strange. I'll post the debug output as I'm not really sure why it's failing. From all the the Launchpad documentation I've read it seems like a valid query String and it should return one bug as I'm subscribed to one on Launchpad itself which you can see at: http://bugs.launchpad.net/~redache

    The debug output:
    Starting /Users/redache/Entomologist-build-desktop/entomologist.app/Contents/MacOS/entomologist...
    Could not load system locale: "qt_en_US"
    Could not load locale file
    Setup tracker
    Adding tracker to list
    Authorization header
    getSubscriberBugs fetching "https://api.bugs.launchpad.net/1.0/~redache?ws.op=searchTasks&bug_subscriber=https://api.bugs.launchpad.net/1.0/~redache&modified_since=1970-01-01T00:00:00"
    mSyncRequests is: 1
    Close event
    Hiding
    The program has unexpectedly finished.
    /Users/redache/Entomologist-build-desktop/entomologist.app/Contents/MacOS/entomologist exited with code 0

    and the qt version I have is:
    QMake version 2.01a
    Using Qt version 4.7.3 in /usr/local/Cellar/qt/4.7.3/lib

    I've tried it on both a Linux install and Mac OS X and the same bug persists. It could be something wrong with Launchpad but it's really hard to tell especially since there isn't that much information on how to access the web services API correctly.

     
  • Matt Barringer

    Matt Barringer - 2011-05-09

    The URL in that call is wrong - api.bugs.launchpad.net isn't a valid hostname. Did you use 'bugs.launchpad.net' as the hostname, or did Entomologist screw that up somehow?

    What's the debug output when you add a new tracker and use "launchpad.net" as the hostname?

     
  • David Williams

    David Williams - 2011-05-09

    I've tried it with just launchpad.net and it works but it still doesn't return any bugs for my username even though there is a reported bug.

    I'll try and patch it so that if it does return host not found it'll offer a few common reasons with the bugs.launchpad.net vs just launchpad.net as an example. I don't really see how else it could be protected against.

     

Log in to post a comment.

MongoDB Logo MongoDB