Page 1 of 1

Callback Event Error: Unknown Protocol

Posted: Wed Oct 06, 2021 10:28 am
by Qwertyip
Hi there,

I have setup the following listener on my nodejs server:

Code: Select all

const app = express();
    
    // Parse URL-encoded bodies (as sent by HTML forms)
    app.use(express.urlencoded({ extended: false }));

    // Parse JSON bodies (as sent by API clients)
    app.use(express.json());

    // Access the parse results as request.body
    app.post('/', function(request, response){
        console.log(request);
        console.log(request.body);
    });

    // Tell our app to listen on port 8090
    app.listen(8090, function (err) {
        if (err) {
        throw err
        }
    
        logger.log.info('POKER :: Listening on port 8090.');
    });
Testing this using a chrome extension, it is receiving POST messages just fine.

Poker Mavens however, is throwing the error: "Unknown Protocol" in the log viewer when sending a callback, and i'm not receiving anything on the server.

Any help appreciated to solve this.
Thanks.

Re: Callback Event Error: Unknown Protocol

Posted: Wed Oct 06, 2021 11:58 am
by Kent Briggs
Does your Callback URL setting have the correct and full http path to your server, complete with the 8090 port on the end? Is your node.js server treating the connection as HTTP with the applicable response headers?

Re: Callback Event Error: Unknown Protocol

Posted: Thu Oct 07, 2021 11:54 am
by Qwertyip
Thanks for the response!

I had set the URL to: 127.0.0.1:8090
Adding the protocol of course fixed it: http://127.0.0.1:8090

Cheers,