carc.in
carc.in copied to clipboard
Links to compiled code don't display in firefox OSX
When you have a link to a compiled code example, like https://play.crystal-lang.org/#/r/157a, you can view the code when you use Chrome or Safari on OSX. When pasting this in to FireFox (47.0.1) there is a redirect back to the main page https://play.crystal-lang.org/#/crystal
It looks like a 502 error is being thrown as shown in the screen shot. The error pages shown are Nginx error pages.

Running OSX (10.11.6) FireFox (47.0.1)
Curious, seems to be up for me:
$ curl -6 https://play.crystal-lang.org/runs/157a
{"run":{"id":"157a","language":"crystal","version":"0.18.7","code":"require \"json\"\n\njson = %({\"a_key\": {\"value\": \"the value\"}})\n\nmodule ValueConverter\n def self.from_json(pull)\n value = nil\n pull.read_object do |key|\n value = pull.read_string if key == \"value\"\n end\n raise ArgumentError.new(\"Didn't find expected key: value\") unless value\n value\n end\nend\n\nstruct Something\n JSON.mapping(\n a_key: {type: String, converter: ValueConverter}\n )\nend\n\np Something.from_json(json)","stdout":"Something(@a_key=\"the value\")\n","stderr":"","exit_code":0,"created_at":"2016-08-01T14:25:20Z","url":"https://carc.in/runs/157a","html_url":"https://carc.in/#/r/157a","download_url":"https://carc.in/runs/157a.cr"}}%
$ curl -4 https://play.crystal-lang.org/runs/157a
{"run":{"id":"157a","language":"crystal","version":"0.18.7","code":"require \"json\"\n\njson = %({\"a_key\": {\"value\": \"the value\"}})\n\nmodule ValueConverter\n def self.from_json(pull)\n value = nil\n pull.read_object do |key|\n value = pull.read_string if key == \"value\"\n end\n raise ArgumentError.new(\"Didn't find expected key: value\") unless value\n value\n end\nend\n\nstruct Something\n JSON.mapping(\n a_key: {type: String, converter: ValueConverter}\n )\nend\n\np Something.from_json(json)","stdout":"Something(@a_key=\"the value\")\n","stderr":"","exit_code":0,"created_at":"2016-08-01T14:25:20Z","url":"https://carc.in/runs/157a","html_url":"https://carc.in/#/r/157a","download_url":"https://carc.in/runs/157a.cr"}}
Also works for me on Firefox 47.0.1 on (Arch)linux. How does the request sent look like?
hmm... Did you make a change? It seems it's working now. Weird thing though is I made a comment about this not working last week too, so it hasn't worked for a while for me. I even tried several things like clearing cache, and trying a incognito window. One thing I did notice before is that on the main page, the select box where you can choose your version of crystal, that select never loaded. It's loading now, so maybe something around that caused an issue but corrected itself.
I guess we can just chalk it up to evil browser demons, but at least you're aware that the could potentially be some issue. I guess I'll close it out for now, unless it starts happening again.
No, I didn't change anything. The data for the select is dynamically loaded the same way the data for run results is loaded, so both breaking at the same time makes perfect sense. In fact in the screenshot you posted you can see the failed request for it too.
Ok, it's happening again...
This is from just trying to load the home page. That select list doesn't load.
Do you connect over IPv4 or IPv6?
It depends. My ISP changes it randomly. Today I'm not working from home, and it looks like it's working here. I'm currently using IPv4 here.
Just an update on this. Looks like several others are also having this issue.

Clearing cookies just before clicking on a link will make it work, but clicking on 2 links back to back will cause the first to work and the second to break. For me, this never happens in Chrome, only in FireFox.