Issue #15 resolved

Internal Server Error?

Gerard Brunick
created an issue

If I follow the quick start guide, I receive the following error in the browser after I log in using "hunter2":

Internal Server Error ExitFailure 1

The command line reports:

./notmuch-web Testing 127.0.0.1 - - [13/Jun/2013:20:54:32 -0700] "GET / HTTP/1.1" 303 - "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19" 127.0.0.1 - - [13/Jun/2013:20:54:32 -0700] "GET /auth/login HTTP/1.1" 200 - "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19" 127.0.0.1 - - [13/Jun/2013:20:54:38 -0700] "POST /auth/page/password/login HTTP/1.1" 303 - "http://localhost:3000/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19" 13/Jun/2013:20:54:38 -0700 [Error#yesod-core] ExitFailure 1 @(yesod-core-1.2.1:Yesod.Core.Class.Yesod ./Yesod/Core/Class/Yesod.hs:471:5) 127.0.0.1 - - [13/Jun/2013:20:54:38 -0700] "GET / HTTP/1.1" 500 - "http://localhost:3000/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"

I downloaded notmuch-web-0.1.1.x86_64.tar.gz and I am using notmuch version 0.12-1 in Ubuntu 12.04.

Cheers, Gerard

Comments (6)

  1. John Lenz repo owner

    This error seems to be because the "notmuch search tag:inbox" command is exiting with an error, either because the notmuch binary is not found or the notmuch command is exiting with an error.

  2. Gerard Brunick reporter

    If I type "notmuch search tag:inbox" at the command line, it works. I also get a list of threads if I execute "search tag:inbox" as a "raw command" in the web interface and I can execute "Check new" from the web interface.

    Cheers, Gerard

  3. John Lenz repo owner

    I was stumped by this for a while (why would raw command work but not the home page they use mostly the same code), but then yesterday I thought of something.

    The actual command is "notmuch search --format=json --format-version=1 tag:inbox" and the format-version flag was only added in notmuch 0.15 (http://notmuchmail.org/news/release-0.15/) so maybe you have an older version of notmuch? If so, I will add a check for the notmuch version on startup

  4. Gerard Brunick reporter

    This does appear to be a version issue. I was using notmuch 0.12 as this was packaged with my version of Ubuntu. When I built notmuch 0.15 from source the problem disappeared.

    More info: it does not appear to be enough to simply remove "--format-version=1" from the search command to make notmuch-web compatible with notmuch 0.12. I wrote a small wrapper around notmuch to remove any --format-version arguments and then pass the remaining arguments on to notmuch. This allowed me to search my emails, but produced the following the error when I try to view a thread:

    NotmuchError "Error parsing for [\"show\",\"--format=json\",\"--format-version=1\",\"thread:0000000000003575\"] : key \"excluded\" not present"

    This suggests that it may take a bit of work to support older versions of notmuch; You may just want to check the version and tell the user when they need to upgrade.

  5. John Lenz repo owner

    I looked at supporting older versions but as you mentioned there are too many differences so I now print a message at startup and exit if the notmuch version is too old. I also plan in the future to improve the error message instead of a generic Internal Server Error.

  6. Log in to comment