feedhenry / fh-mbaas-api

Apache License 2.0
3 stars 35 forks source link

FH.Push functionality broken #204

Closed alexlobanov closed 5 years ago

alexlobanov commented 5 years ago

Hi,

Looks like FH.Push is not working with last few releases of FH-Mbaas-API. Every FH.Push request failed with below error:

TypeError: require(...).Sender is not a function
    at Object.push (/opt/app-root/src/node_modules/fh-mbaas-api/lib/push.js:58:53)

It's failed on below line: https://github.com/feedhenry/fh-mbaas-api/blob/cea580030e6c4825621e9b9a8d648e79086ffbb4/lib/push.js#L58

Just because unifiedpush-node-sender don't expose Sender function directly anymore (since around ~0.13 release in Jun-Nov 2016).

Sender function was exposed on earlier version (lower then 0.14) of aerogear-unfiedpush-nodejs: https://github.com/aerogear/aerogear-unifiedpush-nodejs-client/blob/3baae88a20c01facf8d9d3e55189772f4c98fc6c/lib/unifiedpush-node-sender.js#L90

But now it's not exposed directly anymore: https://github.com/aerogear/aerogear-unifiedpush-nodejs-client/blob/master/lib/unifiedpush-node-sender.js

So all versions of FH-Mbaas-API that reference tounifiedpush-node-sender with version higher then 0.13 is broken.

Last FH-Mbaas-API version also using 0.16 version: https://github.com/feedhenry/fh-mbaas-api/blob/cea580030e6c4825621e9b9a8d648e79086ffbb4/package.json#L22

Could you please take a look on above?

Thanks.

camilamacedo86 commented 5 years ago

@austincunningham could you please check it?

damienomurchu commented 5 years ago

As per the Red Hat support case also opened for this issue, I am closing this GitHub issue to consolidate any communication in one place (the support case).