15 ms·
"Unknown or expired link." - Why?
Why would such a valuable site continue to allow itself to be plagued with this type of repulsive usability issue?
- bradharper 15y agoWhy would such a valuable site continue to allow itself to be plagued with this type of repulsive usability issue?
- sadfasdfads 15y agoOne reason might be that posts/users are getting axed. Would be nice if everything except spam was unmoderated, imo. Also, the current rate limiters to keep spam out are blocking those that would otherwise be more active.
- kristopher 15y agoI, too, wanted to ask this question, but feared that someone would respond with something akin to "submit a patch" or "grep the source code" Obviously, it makes sense for someone who is versed in the news.arc internals to fix the problem; nonetheless this issue certainly bugs me.
- extension 15y agoYou get that when your session expires, which takes just slightly less time than writing a well thought out comment.
- bradharper 15y agoI've become accustomed to getting the error when I linger on the page for a bit, and even in that context it's pretty irritating, but tolerable. Just this morning however, I'm able to click on the logo link at top-left, immediately navigate to the bottom, select "more," and get the nasty - that's remarkably dysfunctional.
- wvenable 15y agoIt doesn't just happen when writing comments; it can happen almost anywhere on the site if you linger too long. It's the most glaring fault with the software behind this site and would be completely impracticable if this site weren't populated by technology-minded people who aren't bothered by error messages.
- FaceKicker 15y agoAgreed. I've pretty much gotten used to refreshing before I click to the next page every time...
- ericd 15y agoI just open up each page I'm interested in reading in its own tab, I've never really had a problem with the error message unless I take too long on a comment.
- deleted 15y ago[deleted]
- drivebyacct2 15y agoI think some pages are generated statically and expire. Why the login/logout pages "expire", I can't really guess at. Wow, not sure why this is so deserving of downvotes. Trying to find a source, but I thought there was a previous discussion of many HN pages being statically generated and served quickly with links that expire after a certain time (or become invalid because of what may happen on the server side of things). But oh well.
- davidcollantes 15y agoThis happens to me a lot while reading HN. I hit "More" and by the time I am done reading a few comments on a handful of entries, the next "More" has expired, and so has the current. This only happens on HN (at least to me).
- deleted 15y ago[deleted]
- d1b 15y agoActually _right_now_ I cannot click "more"(on the first page) without hitting the "Unknown or expired link" page ... so I cannot go past the first page :/ -- Someone should submit a patch :)
- paulkoer 15y agoThis is apparently an old problem that hasn't been fixed yet. As you can imagine, pg has a lot to do these days ;) See here http://news.ycombinator.com/item?id=28944 http://news.ycombinator.com/item?id=28944
- icebraining 15y agoIf you clicked on the links, you'd know why. The software stores the current state in a closure. The closure gets cached. When the cache is full, the older closures get flushed, hence the error message.
- deleted 15y ago[deleted]
- mooism2 15y agoThe HN server uses a table of closures to implement those links (the id code for the closure is the bit after fnid= in the url). When the HN server starts running out of memory, it drops entries from this table. When your browser asks for an entry that is no longer in this table, you get the "Unknown or expired link" error. This is a crazy design, but unless someone would like to patch the source code and get PG to accept it, we're stuck with it.
- gnaritas 15y agoIt's not crazy at all, it greatly simplifies development to use callbacks for actions rather than manually encoding the necessary state into the URL. Techniques such as this are what enable a single developer to be so productive by automating boring and time consuming stuff.
- srdev 15y agoExcept it doesn't appear to work robustly, which makes it poor design. "Automating boring and time consuming stuff," is all well and good if it actually produces a functional system, but that concern is secondary to robustness.
- blahedo 15y agoIt'd work robustly enough if the links didn't expire, and if we believe other posts on this page, the links are expiring due to memory limits on the system. (The other possibility is a timeout, I guess, which is easily fixed.) If it's running out of memory to store the closures it would run out of memory to store the interaction state. In other words, there's a problem here, but it's not the programming model that pg chose.
- srdev 15y agoExcept the links do expire, so its not robust. I expect that when I visit a web page, I can let it sit for an extended period of time before moving on to the next page and have it work. HN doesn't work. Furthermore, the technique of holding important state authoritatively in memory like this is not a good web-development practice for various reasons. Doubly so if its state data which can be round-tripped. Links should not break when the web server or cache (I'm not sure which one it is) runs low on memory. So yes, there is a problem with the programming model that pg chose.
- jgrahamc 15y agoIt's an artefact of the way in which news.arc (actually srv.arc) uses functions for links. Here's the key code: (= dead-msg* "\nUnknown or expired link.") (defop-raw x (str req) (w/stdout str (aif (fns* (sym (arg req "fnid"))) (it req) (pr dead-msg*)))) If the fnid (function ID) isn't in the fns* list then you get the dead message. (def flink (f) (string fnurl* "?fnid=" (fnid (fn (req) (prn) (f req))))) In many places in the code closures are used to handle requests (see the flink code there). If the fns* list is cleared (say news.arc is restarted or harvest-fnids kills them) then you'll get the message. The use of closures in this manner means that the code needed to handle say a form submission is really compact and set up when the form itself is generated.
- piinbinary 15y agoI would be interested to know how much state is in those closures. If it is less than 200 or so bytes, it would not be impractical to encode it (b64) in the url for the next page (rather than a reference to the state).
- JoachimSchipper 15y agoYou don't want to execute code from URLs. (Yes, you can use cryptography to "sign" URLs you create. Don't try that at home unless you know the difference between MACs and hashes, and how to avoid timing attacks.)
- Dylan16807 15y agoWhoa, whoa. Putting the state from the closure in the url is not the same as putting the closure in the url.
- dspillett 15y agoBut you are still likely to want to sign the state so you can tell if it has been corrupted (or deliberately doctored) and reject it if so.
- smackfu 15y agoThe first complaints are from 1575 days (over 4 years) ago, including about the more button breaking, so I am guessing pg has no interest in fixing it.
- Tichy 15y agoHacker News is open source, so it seems as if nobody is interested in fixing it. Or are there fixes and pg has rejected them?
- wvenable 15y agoOr it's so ingrained in the architecture of the software that a fix isn't possible without completely rewriting it and changing the entire design philosophy.
- pg 15y agoSort of yes, sort of no. It's a rapid prototyping technique. Essentially you fix it case by case, by taking individual bits of code that use this technique and replacing them with the uglier and less flexible but more efficient alternative of a hard-coded url.
- bkmartin 15y agoPaul, I really do not mean any disrespect here because you are truly a class act and first rate player in the start up world. You are also a great hacker that loves to push the limits. You've created an amazing community here that I have been able to learn a ton from. I have to ask, and I'll probably get down voted to hell because I'm naive or something, but what is so elegant about a coding technique that breaks under normal usage conditions? If I put out a customer facing piece of code, especially after 4 years, wouldn't it make sense to use an "uglier and less flexible but more efficient alternative" that doesn't break? I understand your previous explanations of why this happens and of rapid prototyping etc. But at what point does the architecture actually get changed to eliminate this bug?
- Silhouette 15y agoI've been wondering about this for a long time, but just as a data point if anyone cares, it has reached the point recently that HN is basically unusable for me a lot of the time, and I really am starting to give up on trying and spend more time elsewhere instead. Perhaps one visitor is no great loss -- I'm hardly the personality around here that someone like patio11 is -- but I hope my contribution is constructive, and my comment scores have always suggested so. However, subjectively, it seems like the quality of posting and voting has taken a sharp nosedive since the "Unknown or expired link" problems have become a several-times-per-session occurrence over the past few weeks. I can't help wondering whether long-standing regular contributors are being put off as a result. If positive contributors can't even log in to refute an objectively incorrect post with a verifiable link or downvote Redditesque diversions, a downward slide seems inevitable, and then the loss of high quality posting and voting becomes a self-sustaining decline.
- Tichy 15y agoWhen writing comments, always make a copy of your text before hitting submit (CTRL+A, CTRL+C). A good strategy for any text form on the web.
- 6ren 15y ago"go back one page" (alt-left arrow) recovers your text on HN
- thwarted 15y agoThis is browser dependent (although many modern browsers do keep form content in the history).
- Silhouette 15y agoIndeed, that became a habit for me a while ago after certain social discussion sites and on-line tools I use frequently went all Web 2.0 and broke the back button when a form submission failed, typically because the form fields were only added dynamically using JS so when you go back they simple aren't there any more according to your browser. Mercifully, HN has yet to introduce that particular "improvement". That's not really the point, though, is it? The important thing is whether posters who want to offer a useful comment and/or mitigate a poor comment can do so. Once HN gets into unknown/expired mode at the moment, it seems common that even basic things like "More" links and logging in can fail as soon as you load/refresh a page, at which point the site is effectively unusable: you can't contribute even if you have something worthwhile to add saved away in your clipboard from the previous failed attempt.
- blauwbilgorgel 15y agoI thought this was to combat cross-site request forgery attacks? Else couldn't one set up malicious scripts to up-or downvote many stories, or post comments under someone else's name?
- dasil003 15y agoThose are orthogonal issues.
- gbaygon 15y agoYes please, fix it already. I this problem where in another site we would be posting complains from random blog posts over and over again.
- smountcastle 15y agoI'm getting this error when using the login link right now! EDIT: The only way I was able to login was to use the 'add comment' button on this post.
- emu 15y agoI also just tried to log in about 6-7 times in a row (clicking the "login" link on the front page, reloading the front page in between attempts), and I repeatedly received the "expired link" page. It also reliably happens clicking the "next page" link on the bottom of the front page; by the time I'm done reading the front page the next page link usually expires. Please fix?
- breckinloggins 15y agoSteps to reproduce: 1. Open Hacker News 2. Go to lunch 3. Come back from lunch and click next Every. Time.
- gnaritas 15y agoSo don't do that.
- adamrmcd 15y agoI wonder if this is exacerbated by people enabling the aptly named "noprocrast" setting in their profile, not knowing what it does... http://ycombinator.com/newsfaq.html http://ycombinator.com/newsfaq.html
- xentronium 15y agoNoprocrast page is entirely different page from "Unknown or expired link"
- przemoc 15y agoRestrain from eating then.
- przemoc 15y agoHm... Didn't know that obviously jest comments are ill-favoured in HN. Hackering is a serious business apparently.
- georgemcbay 15y agoBack when it took a lunch break to cause this issue it didn't bother me at all. These days it happens so fast that it is constantly interrupting me while actively browsing through the site.
- brlewis 15y agoPG is using a really cool programming technique that I'm afraid is ahead of its time relative to current hardware. An upgrade to the HN server should allay the problem. To see the potential, look at this code snippet from an academic paper on the topic. The web server presents a form asking for a number, then presents a form asking for another number, then displays their product. This technique makes event-driven web applications feel (to the programmer) like sequential imperative programs. ;; main body ‘(html (head (title ”Product”)) (body (p ”The product is: ” ,(number→string (∗ (get-number ”first”) (get-number ”second”)))))) The paper: http://cs.brown.edu/~sk/Publications/Papers/Published/khmgpf-impl-use-plt-web-server-journal/ http://cs.brown.edu/~sk/Publications/Papers/Published/khmgpf...
- pg 15y agoIt's not so much that it's ahead of its time relative to hardware as it is something you do in the early versions of a program. Using closures to store state on the server is a rapid prototyping technique, like using lists as data structures. It's elegant but inefficient. In the initial version of HN I used closures for practically all links. As traffic has increased over the years, I've gradually replaced them with hard-coded urls. Lately traffic has grown rapidly (it usually does in the fall) and I've been working on other things (mostly banning crawlers that don't respect robots.txt), so the rate of expired links has become more conspicuous. I'll add a few more hard-coded urls and that will get it down again.
- biot 15y agoOver the last week the home page appears to be cached longer than the arc timeout, no doubt due to the spike in traffic. As I throw away cookies when closing the browser, I need to login daily. It's been impossible to login from the HN home page because of this. Refreshing the page doesn't help; I've had to click through to a story to be able to login. You should hard-code that one too.
- pg 15y agoThe problem there is that we switched to a new deliberately slow hashing function for passwords. Edit: I investigated further, and actually you're right, the problem was due to caching. It should be better now because we're not caching for as long. But I will work on making login links not use closures.
- tomcreighton 15y agoI find it interesting that most discussions I've seen about this exact topic are about Arc and closures... instead of about the fact that this may well be an interesting programming thing to do but it's a moronic user experience thing to do.
- pg 15y agoYour comment is in a sense its own refutation, because the ultimate test of user experience is whether users continue to use the software. Getting user experience right depends on the users. I wouldn't use this technique in an online store. Random online shoppers would be confused by expired links, and you'd lose sales. But HN users aren't confused by them. What HN users care about is the quality of the stuff on the site. Since I can't work full time on HN, I focus on the things that matter most. What I spend my time thinking about is e.g. detecting voting rings. Those affect what you see on the frontpage, which is what users of this site care most about.
- Natsu 15y agoYou're right, but at times, I've found it nearly impossible to log in because I can't seem to get a new login URL. Nothing works except waiting it out. So please look into that if you can. I almost submitted a story like this because I've spent 5+ minutes trying to log in several times now.
- pg 15y agoYou're right, there was a problem due to caching login links for the last couple days. It should be fixed though. Sorry about that.
- tomcreighton 15y agoI don't dispute that you're a busy guy. That said: I come for the community - and the community has obviously noticed that the site occasionally throws up an annoying 'error'. The fact that you've done something cool programatically has no bearing on what I get from HN.
- 15y ago
- JohnsonB 15y agoGood question, but in my opinion it's somewhat rhetorical. Given bugs like these, the ongoing optimization battle, and fairly reasonable feature requests (see the huge HN topic on that), isn't it about time Paul Graham hired someone full or part time to work all these issues out? Given how important HN is to YC, I would think it's worth it. Are any of these tasks really things pg has to do or are the best use of his time?
- brlewis 15y agoIt's good to do things you enjoy. Best use of his time? I don't think anyone can definitively answer that.
- socialmediaking 15y agoIt seems kind of ironic to have such an egregious bug on a site dealing with coding and technology...
- adamrmcd 15y agoSilly question, but, if HN is purportedly open-source where can I download the source code?
- mrb 15y ago1. http://arclanguage.org/install 2. Extract arc3.tar 3. See news.arc However, AFAIK pg forked from the latest public news.arc, so the current Hacker News platform is not open source.
- abdulhaq 15y agoThe problem could made less painful by including a link back to http://news.ycombinator.com http://news.ycombinator.com on the "Unknown or expired link" page. That would save me fishing around with the mouse and the back button to get a new start.
- VBprogrammer 15y agoI would go one step further and just send me back to the homepage.
- odobenus 15y agoEveryone who has literally answered the question "Why?" has completely missed the point. What would PG say about a primary site feature that is so completely broken that it drives users to complain actively, and maybe stop using the site? That it is their problem because they don't understand the technical details? Well, obviously, no one is losing any money here, so maybe that's the answer after all.