{"action":"created","issue":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/4084","repository_url":"https://api.github.com/repos/crystal-lang/crystal","labels_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4084/labels{/name}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4084/comments","events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4084/events","html_url":"https://github.com/crystal-lang/crystal/issues/4084","id":210437763,"number":4084,"title":"Error starting up Crystal Play on local machine","user":{"login":"Ivo-Balbaert","id":963452,"avatar_url":"https://avatars.githubusercontent.com/u/963452?v=3","gravatar_id":"","url":"https://api.github.com/users/Ivo-Balbaert","html_url":"https://github.com/Ivo-Balbaert","followers_url":"https://api.github.com/users/Ivo-Balbaert/followers","following_url":"https://api.github.com/users/Ivo-Balbaert/following{/other_user}","gists_url":"https://api.github.com/users/Ivo-Balbaert/gists{/gist_id}","starred_url":"https://api.github.com/users/Ivo-Balbaert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ivo-Balbaert/subscriptions","organizations_url":"https://api.github.com/users/Ivo-Balbaert/orgs","repos_url":"https://api.github.com/users/Ivo-Balbaert/repos","events_url":"https://api.github.com/users/Ivo-Balbaert/events{/privacy}","received_events_url":"https://api.github.com/users/Ivo-Balbaert/received_events","type":"User","site_admin":false},"labels":[{"id":20487867,"url":"https://api.github.com/repos/crystal-lang/crystal/labels/kind:bug","name":"kind:bug","color":"fc2929","default":false},{"id":346039397,"url":"https://api.github.com/repos/crystal-lang/crystal/labels/topic:playground","name":"topic:playground","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-27T10:03:40Z","updated_at":"2017-02-28T03:40:01Z","closed_at":null,"body":"Hi,\r\n\r\nI am using Crystal 0.21.0 [c2c2276] (2017-02-21) on an Ubuntu OS version 16.04 LTS.\r\nI'm pretty sure I didn't have this problem in Crystal 0.20.0\r\n\r\nStarting up crystal play on command-line works: \r\nListening on http://localhost:8080\r\nBut when I open a Firefox browser with: localhost:8080, the normal Play screen shows up, with the compiler button spinning, but after a few seconds a popup error screen appears:\r\nsee attached screenshot.\r\n\r\nAt the terminal I see:\r\nAt the command terminal where crystal play was started I get:\r\nivo@ivo-SATELLITE-L50D-B:~$ crystal play\r\nListening on http://localhost:8080\r\nE, [2017-02-27 10:14:35 +0100 #9280] ERROR -- : Instrumention bug found (session=1, tag=1).\r\n\r\nThe full text of the error message is:\r\nException\r\n\r\nError in line 5: instantiating 'Crystal::Playground::Agent:Class#new(String, Int32)'\r\n\r\nin /opt/crystal/src/compiler/crystal/tools/playground/agent.cr:8: instantiating 'HTTP::WebSocket:Class#new(URI)'\r\n\r\n    @ws = HTTP::WebSocket.new(URI.parse(url))\r\n                          ^~~\r\n\r\nin /opt/crystal/src/http/web_socket.cr:28: instantiating 'HTTP::WebSocket::Protocol:Class#new(URI)'\r\n\r\n    new(Protocol.new(uri))\r\n                 ^~~\r\n\r\nin /opt/crystal/src/http/web_socket/protocol.cr:285: instantiating 'new(String, String, (Int32 | Nil), Bool)'\r\n\r\n      return new(host, path, uri.port, tls)\r\n             ^~~\r\n\r\nin /opt/crystal/src/http/web_socket/protocol.cr:251: expanding macro\r\n\r\n    {% if !flag?(:without_openssl) %}\r\n    ^\r\n\r\nin macro 'macro_127969024' /opt/crystal/src/http/web_socket/protocol.cr:251, line 8:\r\n\r\n   1. \r\n   2.       if tls\r\n   3.         if tls.is_a?(Bool) # true, but we want to get rid of the union\r\n   4.           context = OpenSSL::SSL::Context::Client.new\r\n   5.         else\r\n   6.           context = tls\r\n   7.         end\r\n>  8.         socket = OpenSSL::SSL::Socket::Client.new(socket, context: context, sync_close: true)\r\n   9.       end\r\n  10.     \r\n\r\ninstantiating 'OpenSSL::SSL::Socket::Client:Class#new(TCPSocket)'\r\nin /opt/crystal/src/openssl/ssl/socket.cr:4: instantiating 'super(TCPSocket, OpenSSL::SSL::Context::Client, Bool)'\r\n\r\n      super(io, context, sync_close)\r\n      ^~~~~\r\n\r\nin /opt/crystal/src/openssl/ssl/socket.cr:86: instantiating 'OpenSSL::BIO:Class#new(TCPSocket)'\r\n\r\n    @bio = BIO.new(io)\r\n               ^~~\r\n\r\nin /opt/crystal/src/openssl/bio.cr:18: instantiating 'IO#read(Slice(UInt8))'\r\n\r\n      io.read(Slice.new(buffer, len)).to_i\r\n         ^~~~\r\n\r\nin /opt/crystal/src/flate/reader.cr:68: instantiating 'IO#peek()'\r\n\r\n        @peek = @io.peek\r\n                    ^~~~\r\n\r\nin /opt/crystal/src/http/content.cr:107: instantiating 'read_chunk_start()'\r\n\r\n          read_chunk_start\r\n          ^~~~~~~~~~~~~~~~\r\n\r\nin /opt/crystal/src/http/content.cr:138: instantiating 'read_chunk_end()'\r\n\r\n      read_chunk_end\r\n      ^~~~~~~~~~~~~~\r\n\r\nin /opt/crystal/src/http/content.cr:146: instantiating 'IO#skip(Int32)'\r\n\r\n      @io.skip(2)\r\n          ^~~~\r\n\r\nin /opt/crystal/src/io.cr:893: instantiating 'read(Slice(UInt8))'\r\n\r\n      read_count = read(buffer.to_slice[0, Math.min(bytes_count, 4096)])\r\n                   ^~~~\r\n\r\nin /opt/crystal/src/gzip/reader.cr:107: instance variable '@extra' of Gzip::Header must be Slice(UInt8), not Nil\r\n\r\n          Header.new(first_byte, @io)\r\n                 ^~~\r\n\r\nThanks for your efforts on this beautiful language!\r\n\r\nIvo Balbaert\r\n![screenshot from 2017-02-27 10-58-54](https://cloud.githubusercontent.com/assets/963452/23357021/58a0c85e-fcdc-11e6-8304-8e6cc8a64b0e.png)\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments/282933143","html_url":"https://github.com/crystal-lang/crystal/issues/4084#issuecomment-282933143","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4084","id":282933143,"user":{"login":"tekjar","id":6826529,"avatar_url":"https://avatars.githubusercontent.com/u/6826529?v=3","gravatar_id":"","url":"https://api.github.com/users/tekjar","html_url":"https://github.com/tekjar","followers_url":"https://api.github.com/users/tekjar/followers","following_url":"https://api.github.com/users/tekjar/following{/other_user}","gists_url":"https://api.github.com/users/tekjar/gists{/gist_id}","starred_url":"https://api.github.com/users/tekjar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tekjar/subscriptions","organizations_url":"https://api.github.com/users/tekjar/orgs","repos_url":"https://api.github.com/users/tekjar/repos","events_url":"https://api.github.com/users/tekjar/events{/privacy}","received_events_url":"https://api.github.com/users/tekjar/received_events","type":"User","site_admin":false},"created_at":"2017-02-28T03:40:01Z","updated_at":"2017-02-28T03:40:01Z","body":"Same issue on my mac\r\n"}}
{"actor":{"display_login":"tekjar"}}