kronusaturn / lw2-viewer

An alternative frontend for LessWrong 2.0
https://www.greaterwrong.com/
MIT License
64 stars 6 forks source link

Issues setting up test server #13

Closed jimrandomh closed 5 years ago

jimrandomh commented 5 years ago

Over at LW2, we're making change which are likely to impact GreaterWrong, via API changes, so I'm trying to set up a local test server of GreaterWrong.

First a couple minor issues that I've managed to resolve. The site URI needs to be set in config.lisp, and needs a trailing slash, otherwise I get an error like [ERROR]] Unknown site: localhost:4242. There's a crash on start, which seemed to be resolved by upgrading SBCL to the latest version (from my distro's 1.4.10 to the latest, 1.4.16):

CORRUPTION WARNING in SBCL pid 29056(tid 0x7f309030f700):
Memory fault at (nil) (pc=0x22f879ea, sp=0x7f309030db48)

An issue I haven't resolved yet is that when trying to log in, I get

The TLS/SSL connection on handle #.(SB-SYS:INT-SAP #X7F589C343120) has been closed (return code: 5). SSL error queue is empty.

I'm not sure where SSL comes into it, since the LW install I have it pointed at is localhost:3000, which doesn't have https set up at all. Since the thing that's likely to break, which I'm looking to test, is creating and editing posts, this blocks testing.

GW also appears to have two hardcoded font URIs, https://fonts.greaterwrong.com/?fonts=BitmapFonts,FontAwesomeGW&base64encode=1 and https://fonts.greaterwrong.com/?fonts=InconsolataGW,CharterGW,ConcourseGW,Whitney,MundoSans,SourceSansPro,Raleway,ProximaNova,TiredOfCourier,AnonymousPro,InputSans,InputSansNarrow,InputSansCondensed,GaramondPremierPro,TriplicateCode,TradeGothic,NewsGothicBT,Caecilia,SourceSerifPro,SourceCodePro, which fail with 403s. When greaterwrong.com loads these, it does so with subtly different URIs, https://fonts.greaterwrong.com/?fonts=BitmapFonts%2CFontAwesomeGW&base64encode=1&v=1549854348.css and https://fonts.greaterwrong.com/?fonts=InconsolataGW%2CCharterGW%2CConcourseGW%2CWhitney%2CMundoSans%2CSourceSansPro%2CRaleway%2CProximaNova%2CTiredOfCourier%2CAnonymousPro%2CInputSans%2CInputSansNarrow%2CInputSansCondensed%2CGaramondPremierPro%2CTriplicateCode%2CTradeGothic%2CNewsGothicBT%2CCaecilia%2CSourceSerifPro%2CSourceCodePro&v=1549510624.css, which work.

kronusaturn commented 5 years ago

Regarding the SSL issue, you probably need to change \:websocket-uri in config.lisp to ws://localhost:3000/ (instead of wss:// which indicates SSL websockets.)

jimrandomh commented 5 years ago

Yep, that was it. Still have the fonts issue, but that doesn't block testing.