-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
showing push error #1394
Comments
What adapter are you using? Which devices are you sending to? Android, iOS? Can you get the _PushStatus object? |
I am using parse push adapter; sending to android devices _PushStatus {
} |
I'll have a look. what version of parse-server are you using? |
2.2.6 |
thanks. It seems to be the parse-server-push-adapter that is not reporting correctly the statuses of the pushes. |
When running with VERBOSE=1, you should have that kind of logs:
Can you please provide them? |
verbose: POST /parse/push { 'user-agent': 'node-XMLHttpRequest, Parse/js1.8.1 (NodeJS 5.3.0)', i am getting this when i run using VERBOSE |
Seems to be a misconfiguration in parse-server-push adapter, how did you set it up? |
i have set it up in index.js using google project number and sender api key |
Would you care to show it? |
what's the version of parse-server-push-adapter? in |
1.0.4 |
Is end of ',' in emailAdapter-apiKey and push line relate this bug? emailAdapter
push
|
@estylehq elborate please |
updated. I think that isn't cause this prob. maybe. :( |
means in my index file i have remove the comma that i have instered at the end of the email adapter |
yeah. and end of push configuration too. |
var api = new ParseServer({ verifyUserEmails:true, /??//// is this correct |
remove comma end of push config. |
var api = new ParseServer({ verifyUserEmails:true, |
Updated index.js but the error is still same |
can you please format correctly your index.js configuration? It's impossible to see where your error is.... Also we have many users having a functional push setup. |
i have reformated the code of index.js and can you tell me that if want to send push to a specfic user using the object id of that users |
That question should be asked over stackoverlow, or any other forum. We're not here to provide support for your implementations. |
ok will the client push enable in future use |
I don't believe it will ever be enable as this is a very important security problem. Also, many users have worked around it by creating a cloud code function. Look through the issues, and other references, and you should be good to go. Coming back to your issue, can we have a properly formatted index.js? |
yes i have formatted it here it is verifyUserEmails:true, |
this is not formatted.... formatted is:
|
then what about push notification adapter |
what do you mean? |
in index,js we have to declare both push adapter , email adapter and server info(master key,app id,mongo db connection string) then the formateed code that have been provided in that where i would add push adapter |
this was just an example, to show you how to properly format the code when you share it. Your shared file appear all flat, with multiple } on certain lines... I can't really say what's wrong in your configuration because it's just plain ugly and not readable |
i have checked everything again but the problem is steill there
var query = new Parse.Query(Parse.User);
useMasterKey:true,
}); |
the query on push should be on Parse.Installation not on Parse.User... That's why you're not getting anything... |
Android Code:
final Map<String, Object> params = new HashMap<>();
params.put("message", message);
params.put("userId", ParseUser.getCurrentUser().getObjectId());
///////////////////////////////////////////////
main.js
Parse.Cloud.define("sendPush", function(request, response) {
var sendUserId = request.params.userId;
var msg = request.params.message;
var query = new Parse.Query(Parse.Installation);
query.equalTo('userId', sendUserId);
});
But not getting push
Here is the verbose //////
verbose: sending push to 1 installations
verbose: sent push! 0 success, 0 failures
The text was updated successfully, but these errors were encountered: