I am having an issue with fcm frontend(JS) part of application. I have implemented the JS code of getting a token from server but unable to receive a notification on my client.
I have my rails project setup and it is running using RPUSH. Rpush script is started as well. I am using CURL to send a push notification. I get success message as CURL response but it is not being received on my end. I have tried serviceworker-rails gem as well.
Service worker is started and I am able to receive token via JS request to fcm.
Related
I just uploaded my nodejs app on Heroku which makes a post request on my localhost 127.0.0.1 my localhost server is on PHP which takes a file and some data and generates an invoice but the problem is I get this error in the Heroku log when my deployed node server tries to make a post request to my PHP server using Axios.
enter image description here
You can see there is a message This is an error ignore that because I concatenated that with the error.
I would appreciate any help thanks.:)
I am new in reactjs and nodejs.I made an application with react frontend and express backend. There are axios post and get requests for get data from mssql database via express.
When the project in production level, I write the IPv4 address and port for access dashboard from another device in local network. After build,when I use for example localhost:5000 for requests, I can see all datas which are come from database in the device which react project running but with this I cant see datas from android phone in local network.
What should I do? Isn't there any other way than writing a static IP address? This project can be run different machines.
I am sorry for my spelling mistakes.
I have been struggling to make push notifications work.
I am recieving the following error
; FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script. (messaging/failed-serviceworker-registration).
I have already tried to google and applied https://stackoverflow.com/a/42264578/5192105
But still it works locally but not on the server.
The js file firebase-messaging-sw.js exists in the path:https://mobile-app.golocall.com/api/src/public/firebase-messaging-sw.js
I have used slim-php as backend framework.
Please help me out in resolving the error.
It tries to find the service worker file on the root of the application; hence the application tries to load
https://mobile-app.golocall.com/firebase-messaging-sw.js
while the actual file is located at
https://mobile-app.golocall.com/api/src/public/firebase-messaging-sw.js
EDIT:
You may be able to import the service worker like this:
importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-messaging.js');
If this doesn't work, you may need to declare your own service worker.
Here is a link to more information on the topic:
https://firebase.google.com/docs/cloud-messaging/js/receive
i upload angular 4 project to apatche server after build but it not working it get error it cant reach to js files
and try to upload it on firebase hosting but it can't access http request on http://localhost:3000/product/
I have set up a prerender server on my local machine.
It is on port 3033 and it seems to display a rendered version of my meteor site when I type this in
curl http://localhost:3033/http://localhost:3000/?_escaped_fragment_=
Knowing that my prerender site works, I'm trying to set it up so that if I go to
curl http://localhost:3000/?_escaped_fragment_=
it should give me my Meteor site.
I'm using this package (https://github.com/dfischer/meteor-prerenderio) and I've got this line in my settings.json file
"PrerenderIO": {
"prerenderServiceUrl": "http://localhost:3033/"
}
However, when I run
curl http://localhost:3000/?_escaped_fragment_=
it returns nothing and I'm getting this message shown up on my meteor server log
res.send(status, body): Use res.status(status).send(body) instead
and it doesn't seem to be hitting the prerender server.
What is this message and why aren't I able to hit the prerender server?