-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Labels
type:questionSupport or code-level questionSupport or code-level question
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
I'm facing an issue with live queries.
The client receives the "open" event but doesn't receive the "create" or "update" events.
Server setup:
var app = express();
app.use(compression());
app.enable('trust proxy');
app.use(bodyParser.json({limit: '50mb'}));
app.use(compression());
app.use(cookieParser());
app.use(device.capture());
app.use('/parse', new ParseServer({
databaseURI: DATABASE_URI,
appId: APP_ID,
masterKey: MASTER_KEY,
serverURL: 'http://localhost/parse',
cloud: __dirname + '/cloud/main.js',
liveQuery: {
classNames: ['Order', 'Sale']
}
}));
app.set('view engine', 'ejs');
app.use('/', routes);
const httpServer = require('http').createServer(app);
httpServer.listen(80);
var parseLiveQueryServer = ParseServer.createLiveQueryServer(httpServer);Client setup:
Parse.initialize(APP_ID);
Parse.serverURL = 'http://localhost/parse';var query = new Parse.Query('Sale');
query.equalTo('status','pending');
var subscription = await query.subscribe();
subscription.on('open', () => {
console.log('subscription opened');
});
subscription.on('create', (object) => {
console.log('object created',object);
});
subscription.on('update', (object) => {
console.log('object updated',object);
});Environment
"axios": "^0.21.1",
"body-parser": "^1.19.0",
"card-validator": "^8.1.1",
"compression": "^1.7.4",
"cookie-parser": "^1.4.5",
"coordenadas-do-cep": "^1.2.0",
"ejs": "^3.1.5",
"excel4node": "^1.7.2",
"express": "^4.17.1",
"express-device": "^0.4.2",
"fs": "0.0.1-security",
"http": "0.0.1-security",
"https": "^1.0.0",
"image-search-google": "^1.3.0",
"parse-dashboard": "^2.1.0",
"parse-server": "^4.5.0",
"path": "^0.12.7",
"request": "^2.88.2",
"serve-favicon": "^2.5.0",
"shelljs": "^0.8.4"
Server
- Parse Server version: ^4.5.0
- Operating system: Windows & Linux
- Local or remote host: localhost
Database
- System : MongoDB
- Database version: v4.4.6
- Local or remote host: Google Cloud
Client
- SDK: JavaScript
- SDK version: 3.3.0
Logs
info: Create new client: 3e332475-fabe-488c-9a9c-fd6b69cc3ce6
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type:questionSupport or code-level questionSupport or code-level question