uniqush / uniqush-push

Uniqush is a free and open source software system which provides a unified push service for server side notification to apps on mobile devices.

Home Page:http://uniqush.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(Beginner's question) Cannot get a push to work after successfully registering a subscription

aaronvdbrugge opened this issue · comments

I managed to get it running but I think I'm doing one step wrong. Could you please take a look at my console log? Perhaps you can recognize the issue.

This is my Console log:

image

This is my Android app. I used it to send a WWW form to my server http://216.119.157.64:5400/subscribe.
As you can see from the returned text beneath INITIALIZE, it looks like that worked. It says UNIQUSH_SUCCESS.

screenshot_2019-02-19-20-27-44

So I'm not sure what's wrong. I might be doing something very obviously wrong, because this is my very first time working with notifications.

I got them to work with a local demo server on my laptop/WLAN but that's not useful for real use cases. Now I'm trying to get it to work with uniqush-push on my cloud server.

After calling addpsp to add a push endpoint, then need to call subscribe to subscribe that user to that service.

Then you can call push with some friendly name instead of that hash.

Please see the docs, particularly /subscribe

https://uniqush.org/documentation/usage.html

After calling addpsp to add a push endpoint, then need to call subscribe to subscribe that user to that service.

Then you can call push with some friendly name instead of that hash.

Please see the docs, particularly /subscribe

https://uniqush.org/documentation/usage.html

What I did was:

  • Run curl addpsp from my Ubuntu console
  • From the app I called http://216.119.157.64:5400/subscribe and used WWW to add necessary forms (the return that I got can be seen in the second picture I posted, it says it was a SUCCESS)
  • Then I run curl push from my Ubuntu console. You can see that in the first picture.

So I followed what you said already but it doesn't work?

I read the documentation over and over hehe.

Can you tell anything from my console picture what the issue is?

Is there any way to "debug" uniqush-push by viewing a list of subscribers, providers, etc.? @mishan

@aaronvdbrugge You can always poke inside your Redis instance with redis-cli

Here are the Redis keys it uses (from pushredisdb.go):

const (
	DELIVERY_POINT_PREFIX                                  string = "delivery.point:"         // STRING (prefix of)- Maps the delivery point name to a json blob of information about a delivery point.
	PUSH_SERVICE_PROVIDER_PREFIX                           string = "push.service.provider:"  // STRING (prefix of) - Maps a push service provider name to a json blob of information about it.
	SERVICE_SUBSCRIBER_TO_DELIVERY_POINTS_PREFIX           string = "srv.sub-2-dp:"           // SET (prefix of) - Maps a service name + subscriber to a set of delivery point names
	SERVICE_DELIVERY_POINT_TO_PUSH_SERVICE_PROVIDER_PREFIX string = "srv.dp-2-psp:"           // STRING (prefix of) - Maps a service name + delivery point name to the push service provider
	SERVICE_TO_PUSH_SERVICE_PROVIDERS_PREFIX               string = "srv-2-psp:"              // SET (prefix of) - Maps a service name to a set of PSP names
	DELIVERY_POINT_COUNTER_PREFIX                          string = "delivery.point.counter:" // STRING (prefix of) - Maps a delivery point name to the number of subcribers(summed across each service).
	SERVICES_SET                                           string = "services{0}"             // SET - This is a set of service names.
)```

You can do like KEYS push.service.provider:* for example