How can I send pusher beams browser notification alerts with nextjs? - reactjs

I'm implementing Pusher-Beams with next.js using authenticated users flow exactly as described in beams docs, and I got in the browser console client is subscribed and registered successfully.
However at pusher-beams debug-console website page I have these messages when I click on push notification button and nothing shown in my application,
I don't know what exactly I'm doing wrong here?!! and why I keep getting device de-registered message?
Note: I've tried with Chrome, Firefox and Brave but it is not working.

Related

Opening new default browser window in plain React on a Mobile while using Facebook browser

Folks,
We are in a unique situation here. Our React site integrates with Signicat for identity solution. Most of our user base comes from Facebook i.e. they use the Facebook app, look at our posts and click on links we post which redirect to certain sections in our website which require identification.
So an example link posted on Facebook group https://example.com/en/startpage-in-english/ is converted into https://l.facebook.com/l.php?u=https%3A%2F%2Fexample.com%2Fen%2Fstartpage-in-english%2F%3Ffbclid%3DIwAR3loYqYOvom5k8_mOww89p5tun5H9HqIIKE1ebwwCcB3PD4jzxpTVyZGCk&h=AT1E3p1ejYWH9l2KhUo8D_RVjl_EzKBat4woeMHgRv7yXpT9Y-EZoBcK26sQtjjBBwAQt7Pt83a-i_k5JCGuvOBWfgB9pZ7Uv8LnDlyphNKc1Og0nl6QIqWd_nFEAva3OWN-PZ3byqsU7K0I5A&__tn__=-UK-R&c[0]=AT0-5n51iPMlSYghORXW8qxYXJQEejQTAhfiDQ3P3DK_ZTZM3GWbN4zXYKf-nyD_hWJdxQccenDp-5VgphfWuD6ZQ0ikeXq4lv4bjLbSJVFP9k4IxeMBT5mDa9jNdYnYlNs-DkXOM-LiPhhl-Obra9CAbtvihe-G7-8. When users click on the link, Facebook by default opens the link in its own Facebook browser. The subsequent steps in our portal need the user to identify himself and when the identification is completed and in the final step the request to Signicat hangs forever.
We identified that this issue is only happening with Facebook browser and hence one of the workarounds was to Open the default browser with the link to our website.
Note that:
a. this is not a React-Native app, our website is built using plain React hence the WebView solution does not work.
b. Facebook browser suppresses "window.open" with "newwindow" call and simply displays the site in the same Facebook browser instance.
So bottom line is, we need a way to Open the default OS Browser from Facebook App/Browser with the link to our site. Hope somebody can help!
Thanks in advance...
SG

react pwa firebase notification not working in android

i'm using firebase for my react PWA push notification , I've got everything setup for web app firebase push notification. when I try requesting a notification to desktop it works perfectly but on android devices when I send notification, event hough Postman gives success and message ID and etc but nothing shows on the screen neither in use, nor in background.
Not saying this is the answer in your case but, I had the same problem (notifications worked on desktop and IOS devices but not on Android). My problem was that I had notifications turned off. On your Android phone or tablet, open the Chrome app and try this.
To the right of the address bar, tap More. Settings. List item
Tap SiteSettings. Notifications.
At the top, turn the setting on or off.

I can access my heroku app live but my friends see only white blank page?

please check my app - https://real-estate-web-app.herokuapp.com
the app is accessible in chrome only I open the app with another browser it shows me a white blank page.
and please share the solution.
I tried all online solutions but no help
I want to share the app with the client and my friends for testing.
I was able to open up the app in both Chrome and Firefox, loading just fine. Only thing I noticed was something odd with the Google Map API's, message about it receiving too many calls to the API. Also I believe by default Heroku has a "sleep" type setting, so the page doesn't stay loaded if the URL hasn't been visited recently; basically it pings the server and tells it to wake back up and then process the request and load the app. This may result in like a 10-15 second load time the first time hitting the page.

messaging_optins webhook event not working for messenger

I'm trying to get the event when the developer/tester/admin click on the messenger plugin to start the chat.
these are the selected event with my app:
Selected events: messages, messaging_postbacks, messaging_optins
from these 3 events, two are working perfectly. but messaging_optins isn't working.
from the documentation:
https://developers.facebook.com/docs/messenger-platform/reference/webhook-events/messaging_optins
This callback will occur when the send to Messenger plugin has been
tapped, a user has accepted a message request using customer matching,
or a user has opted in to receive messages via the checkbox plugin.
I'm tapping on the start chat button with a different developer account. but every time it fails to send me the webhook for this. but other 2 hooks are working perfectly!
Can you guys please help me with that?

What error trigger the Oops, couldn't load error in kik web app

I am trying to integrate my app into kik, but for a specific action I fall in an error page that says:
Oops, couldn't load. Please try again later.
This panel looks like a kik panel with my app logo at the top
But everything is OK, If I try my app in Chrome with Kik plugin it works well. In fact my app creates an iframe and load it then we use postMessage to communicate between parent and iframe. I put some logs and it seems that everything is OK. Iframe is loaded and send message to parent with postmessage. But when I am in kik, the 'couldn't load' message appears and stops my app.
Does someone know what cause this panel to appear?
I had the exact same problem.
The problem is the combination of loading an iframe after doing browser history manipulation. Since there is no back button in Kik you can just do the page updates without updating the browser history and this will solve your problem.
I use this line to detect Kik and, if detected, ignore browser history updates:
if (!kik.enabled) {
//We are not running in Kik so we can do browser history manipulation here
}
Websites in the Kik browser must be single-page applications. The error screen shows up when the website either fails to load or tries to navigate elsewhere.
Is your website doing any navigation? Also, is there a place where we could take a look at the code?

Resources