Original author: s.asta...@gmail.com (July 06, 2009 23:25:15)
I noticed that if I run hledger web in gnome terminal, the program starts
Epiphany web browser, but the web browser cannot open anything.
$ hledger web
starting web server on port 5000
starting web browser
[empty page in the web browser]
If I run hledger web in console, I can see “localhost contacted. Waiting
for reply” message (is it w3m?). Meanwhile page "localhost:5000" does not
open in Firefox neither. If I terminate the brower (w3m) with ^C, than —
magic! — I can suddenly open localhost:5000 in Firefox!
Actually, hledger is listening, but not where every program expects to
$ netstat -l --inet6 --inet -n | grep :5000
tcp6 0 0 :::5000 :::* LISTEN
I am not sure it is good to listen on IPv6 by default... But I don't know,
why it's not possible to open web page when the browser is launched, but it
is possible just after the browser is terminated... I think openBrowserOn
is not OK.
Workaround: run hledger web --debug. It does not attempt to start a
browser, and everything works.
hledger web --debug
I suggest not starting the web browser by default (provide an option to
start it, but run only a server by default).
Original issue: http://code.google.com/p/hledger/issues/detail?id=6
From email@example.com on July 09, 2009 14:06:02
Thanks for the report. On gnu/linux hledger web tries to run "sensible-browser". Here, on a x86_64 with
ubuntu intrepid I have lynx installed, and it works, and I see
$ netstat -l --inet6 --inet -n | grep :5000 tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN
hledger is just calling simpleHTTP. What are your platform details and version of happstack* ?
From firstname.lastname@example.org on July 09, 2009 15:25:55
It seems to be a misfeature of current happstack on some platforms:
From email@example.com on March 06, 2010 23:29:21
New data point: in gnome terminal on an ubuntu karmic netbook, with chrome 5
configured as sensible-browser, running "hledger 0.8 with web (using simpleserver)"
(no happstack), I see this problem. hledger web brings up chrome, which gets stuck
requesting http://localhost:5000 . If I quit and restart the browser it works. netstat
shows "tcp" not "tcp6", so I feel that part may be a red herring.
From firstname.lastname@example.org on March 09, 2010 22:35:18
I could be wrong, but for me this seems to happen with Chrome, but not with Firefox.
Now I've pushed a change to start the browser in a different way, which seems to fix the
problem. More testing appreciated.