ethereum / remix-project

Remix is a browser-based compiler and IDE that enables users to build Ethereum contracts with Solidity language and to debug transactions.
https://remix-ide.readthedocs.io
MIT License
2.47k stars 952 forks source link

Error: Specified protocol was not requested by the client. #488

Open pynchmeister opened 4 years ago

pynchmeister commented 4 years ago

I've been using RemixD with great success lately but it looks like the most recent commit caused a bug, at least on my end. Here is the full error log:

Wed Jul 08 2020 09:45:13 GMT-0400 (Eastern Daylight Time) Remixd is listening on 127.0.0.1:65520
/usr/local/lib/node_modules/remixd/node_modules/websocket/lib/WebSocketRequest.js:289
            throw new Error('Specified protocol was not requested by the client.');
            ^

Error: Specified protocol was not requested by the client.
    at WebSocketRequest.accept (/usr/local/lib/node_modules/remixd/node_modules/websocket/lib/WebSocketRequest.js:289:19)
    at WebSocketServer.<anonymous> (/usr/local/lib/node_modules/remixd/src/websocket.js:43:33)
    at WebSocketServer.emit (events.js:209:13)
    at WebSocketServer.handleUpgrade (/usr/local/lib/node_modules/remixd/node_modules/websocket/lib/WebSocketServer.js:217:14)
    at Server.emit (events.js:209:13)
    at onParserExecuteCommon (_http_server.js:603:14)
   at onParserExecute (_http_server.js:543:3)

If I can discover the root of the bug, I'll make a PR.

BarisZencir commented 4 years ago

Hi, The problem is about remix ide. İ tried to conection with old version of ide and its connected successfully. U can try it temporary, i hope it will be fix soon.

jamesBsmyth commented 4 years ago

Try reinstalling and causing a rejection error once. For some reason worked for me.

To cause the error, I hosted remixd to serve a bad URL (for example, I put an extra "/" at the end). After causing this error, I restarted remixd with a working URL and was able to reach my files on the remix IDE.

sidko commented 4 years ago

The above worked for me. Note that I could not get it to work without reinstalling remixd. The steps I took were:

$ npm install -g remixd 
$ remixd -s . --remix-ide https://remix.ethereum.org/
// close the terminal and re-open
$ remixd -s . --remix-ide https://remix.ethereum.org
pynchmeister commented 4 years ago

thanks @sidko bout that didn't work for me, hopefully I find a hack around this soon. I ought to work with the previous Remix versions for now...

ioedeveloper commented 4 years ago

Please update your remixd version to the latest (v0.2.4-alpha.0) and let us know if it fixes the error for you. @pynchmeister