You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get a list of AccessTokens, and using these to get a list of Twitter followers who are also my app users. But I keep getting this error "verbose: error: MongoError: TypeError: callback is not a function". What am I doing wrong?
verbose: GET /parse/classes/UserAccessToken { 'user-agent': 'node-XMLHttpRequest, Parse/js1.8.5 (NodeJS 4.3.0)',
accept: '/',
'content-type': 'text/plain',
host: 'localhost:1337',
'content-length': '442',
connection: 'close' } {
"where": {
"createdFor": {
"$inQuery": {
"where": {
"status": {
"$in": [
"Active",
"Inactive"
]
}
},
"className": "_User"
}
},
"activeSocialLink": 3,
"objectId": {
"$ne": "bohjnw1kkj"
}
},
"limit": 100
}
verbose: error: MongoError: TypeError: callback is not a function
at null.messageHandler (D:\Work\ConradLabs\Doofl\doofl-parseserver\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\topologies\server.js:399:39)
at Socket. (D:\Work\ConradLabs\Doofl\doofl-parseserver\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:302:22)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at TCP.onread (net.js:523:20)
error: Uncaught internal server error. { [MongoError: TypeError: callback is not a function]
name: 'MongoError',
message: [TypeError: callback is not a function] } MongoError: TypeError: callback is not a function
at null.messageHandler (D:\Work\ConradLabs\Doofl\doofl-parseserver\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\topologies\server.js:399:39)
at Socket. (D:\Work\ConradLabs\Doofl\doofl-parseserver\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:302:22)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at TCP.onread (net.js:523:20)
The text was updated successfully, but these errors were encountered:
I am closing this out as we're trying to cut down on the number of non-issues. This will help us focus on the issues that are actively preventing people from migrating their production apps to Parse Server.
For code-level and/or implementation-related questions or technical support, please refer to Stack Overflow.
Issue Description
I am trying to get a list of AccessTokens, and using these to get a list of Twitter followers who are also my app users. But I keep getting this error "verbose: error: MongoError: TypeError: callback is not a function". What am I doing wrong?
Copying the code:
return accessTokenQuery.find({ useMasterKey: true })
.then(function(targetAccessTokens){
if(targetAccessTokens==undefined){
return Parse.Promise.as();
}
var twitterIds = "";
var addComma = false;
var idMap = [];
for(var i=0; i< targetAccessTokens.length; i++){
twitterIds += (addComma? ",": "") + targetAccessTokens[i].get("twitterId");
idMap[targetAccessTokens[i].get("twitterId")] = targetAccessTokens[i];
addComma = true;
}
return postsJS.getTwitterUserFriendsLookupPromise(twitterIds, config, sourceAccessToken, twitterSecretKey)
.then(function(response){
if(response==undefined || response.data==undefined){
return Parse.Promise.error(response);
}
Logs/Trace
verbose: GET /parse/classes/UserAccessToken { 'user-agent': 'node-XMLHttpRequest, Parse/js1.8.5 (NodeJS 4.3.0)',
accept: '/',
'content-type': 'text/plain',
host: 'localhost:1337',
'content-length': '442',
connection: 'close' } {
"where": {
"createdFor": {
"$inQuery": {
"where": {
"status": {
"$in": [
"Active",
"Inactive"
]
}
},
"className": "_User"
}
},
"activeSocialLink": 3,
"objectId": {
"$ne": "bohjnw1kkj"
}
},
"limit": 100
}
verbose: error: MongoError: TypeError: callback is not a function
at null.messageHandler (D:\Work\ConradLabs\Doofl\doofl-parseserver\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\topologies\server.js:399:39)
at Socket. (D:\Work\ConradLabs\Doofl\doofl-parseserver\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:302:22)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at TCP.onread (net.js:523:20)
error: Uncaught internal server error. { [MongoError: TypeError: callback is not a function]
name: 'MongoError',
message: [TypeError: callback is not a function] } MongoError: TypeError: callback is not a function
at null.messageHandler (D:\Work\ConradLabs\Doofl\doofl-parseserver\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\topologies\server.js:399:39)
at Socket. (D:\Work\ConradLabs\Doofl\doofl-parseserver\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:302:22)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at TCP.onread (net.js:523:20)
The text was updated successfully, but these errors were encountered: