Skip to content

ParseSever LiveQuery: expressjs call save but get error "Can not find subscriptions under this class XXX" #2594

@uluru-phatnguyen

Description

@uluru-phatnguyen

Step 1: Build parser-server config in index.js

var api = new ParseServer({
  databaseURI: 'mongodb://localhost:27017/dev',
  cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
  appId: process.env.APP_ID || 'myAppId',
  masterKey: process.env.MASTER_KEY || '', //Add your master key here. Keep it secret!
  serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse',  // Don't forget to change to https if needed
  liveQuery: {
    classNames: ['XXX'] // List of classes to support for query subscriptions
  },
  // ....
});

var port = process.env.PORT || 1337;
var httpServer = require('http').createServer(app);
httpServer.listen(port, function() {
    console.log('server running on port ' + port + '.');
});

// This will enable the Live Query real-time server
ParseServer.createLiveQueryServer(httpServer);

Step 2: Build webapp by expressjs framework

Call api (above server) to update data of XXX via ParseQuery.

But i always get bug logs from server "Can not find subscriptions under this class XXX"

https://github.com/ParsePlatform/parse-server/blob/master/src/LiveQuery/ParseLiveQueryServer.js#L154-L158

I don't know how to fix, If have any solution pls tell me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions