AWS Parse Server AMI with Livequery (Websocket error)

Hi,

i am working on a project which requires a Parse Server being hosted on AWS. I came across your Parse Server AMI By Bitnami and decided to use it. However when i setup everything and run my ionic app, it will state:

WebSocket connection to ‘ws://ec2-*********.ap-southeast-1.compute.amazonaws.com/parse’ failed: Error during WebSocket handshake: Unexpected response code: 403

and through online search, i could not find anything related to this error. Is this got to do with some settings within your AMI which i did not set properly? I searched online and heard about this something to do with NGINX however as i notice your instance is using apache and there is no trace of NGINX. I have attached a screenshot of the error by just running the app on ionic serve. Please advice.

Thanks,

EDIT:

i went on to check my server codes, it seems like the default parse server by bitnami does not have livequery, what do i need to add in order to use livequery on the server?

var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var app = express();
// Specify the connection string for your mongodb database
// and the location to your Parse cloud code
var api = new ParseServer({
    databaseURI: "mongodb://root:B7cBoeHrFiEx@127.0.0.1:27017/bitnami_parse",
    cloud: "./node_modules/parse-server/lib/cloud-code/Parse.Cloud.js",
    appId: "*******",
    masterKey: "********",
    fileKey: "*******",
    serverURL: 'http://ec2-*******.ap-southeast-1.compute.amazonaws.com:80/parse'
});
// Serve the Parse API on the /parse URL prefix
app.use('/parse', api);

var port = 1337;
app.listen(port, function() {
    console.log('parse-server running on port ' + port);
});

//Parse Dashboard
var ParseDashboard = require('parse-dashboard');
var dashboard = new ParseDashboard({
    apps: [
        {
            appName: "My Bitnami Parse API",
            appId: "*******",
            masterKey: "*******",
            fileKey: "*******",
            production: true,
            serverURL: 'http://ec2-*******.ap-southeast-1.compute.amazonaws.com:80/parse'
        }
    ],
    users: [
        {
            user: "user",
            pass: "*****"
        }
    ], useEncryptedPasswords: true
});

var allowInsecureHTTP = true;

// Serve the Parse Dashboard on the /parsedashboard URL prefix
app.use('/', dashboard);

var portdash = 4040;
app.listen(portdash, function() {
    console.log('parse-dashboard running on port ' + portdash);
});

Hi @lyonng_hk,

livequery is included in the Bitnami Parse application but not configured by default. As it says in this blog post Parse Server Goes Realtime with Live Queries, you should be able to add the configuration described to the /home/bitnami/apps/parse/htdocs/server.js file.

However, this community forum is intended to solve problems related to the Bitnami Stacks, Virtual Machine or Cloud Images. For information regarding the application itself or customization of the content within the application, we highly recommend checking forums and user guides made available by the project behind the application where you will find more appropriate contents and support about that matter.

Best regards,
Andrés Bono