TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Decode Youtube 500 page

44 pointsby aeon10over 11 years ago
This is youtube&#x27;s 500 page. I wonder if someone knows how the &#x27;information&#x27; is encoded. It is not base64. Does anyone know how to decode it.<p>http:&#x2F;&#x2F;paste.pm&#x2F;raw&#x2F;dme

9 comments

WhatsNameover 11 years ago
An analysis of this can be found here: <a href="http://www.cambus.net/decoding-youtube-http-error-500-message/" rel="nofollow">http:&#x2F;&#x2F;www.cambus.net&#x2F;decoding-youtube-http-error-500-messag...</a>
评论 #7213474 未加载
djthorpeover 11 years ago
The code is indeed very useful to debug issues. When asked for it by YouTube, please provide the actual text rather than a screenshot...I get sent the screenshot a lot and then I have to use OCR software in order to decode it.
评论 #7211611 未加载
Perseidsover 11 years ago
Why do you assume it is not base64 encoded? I have always come to believe it is some encrypted data. If I was Google I would probably give every server a UUID and a symmetric key. If an error occurs encrypt (and authenticate) the stacktrace and other debug information with that symmetric key and prepend the UUID. As a developer you can then find out the server that produced the error message, log in via SSH and decrypt the debug information.<p>But it would be interesting to collect a lot of this error messages to check if they appear to be completely random.
评论 #7210845 未加载
slashdotaccountover 11 years ago
It is non-standard base64: it uses &#x27;_&#x27; and &#x27;-&#x27; instead of &#x27;+&#x27; and &#x27;&#x2F;&#x27;. You can read in Wikipedia at <a href="https://en.wikipedia.org/wiki/Base64" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Base64</a>
kaiviover 11 years ago
It is surely an encrypted stack trace, encoded in base64, which is probably being spit out by the load balancer proxy. I would not be surprised if Youtube developers used their own Chrome extension for making that binary meat readable.<p>I have once set out to write a module for Nodejs for the same purpose, but never finished it. Can&#x27;t really see a downside in this way of reporting errors.
goblin89over 11 years ago
Perhaps questions like this one should be asked somewhere else, possibly StackOverflow: <a href="http://stackoverflow.com/questions/21681084/decoding-youtubes-error-500-page" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;21681084&#x2F;decoding-youtube...</a>
评论 #7211862 未加载
babawereover 11 years ago
1. Non-standard base64 and 2. Definitely Compressed ... by guess would be snappy compression 3. Possibility of serialization using protocol buffer 4. not sure if such information would be encrypted after such a server failure
nigmaover 11 years ago
Using Python 3.3:<p><pre><code> import base64 base64.urlsafe_b64decode(s)</code></pre>
评论 #7211121 未加载
tamiriisabout 11 years ago
Tudo 2