Comments (8)
Maybe something wrong with the settings in application.properties
Is the path for fcm.service-account-file
correct?
fcm.service-account-file=<path to json file>
from blog.
Maybe something wrong with the service account json file.
Does it look similar to this?
{
"type": "service_account",
"project_id": "demoproj",
"private_key_id": "7ba",
"private_key": "-----BEGIN PRIVATE KEY----------END PRIVATE KEY-----\n",
"client_email": "firebase-adminsdk-c2gco@d",
"client_id": "10523",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-c2gc"
}
from blog.
good , now i get a new message:
2018-06-11 14:21:27.548 ERROR 3728 --- [pool-1-thread-1] com.qmexpress : Joke object :
Sending chuck joke...
2018-06-11 14:21:27.563 ERROR 3728 --- [pool-1-thread-1] o.s.s.s.TaskUtils$LoggingErrorHandler : Unexpected error occurred in scheduled task.
java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.
from blog.
Try the latest firebase sdk 6.2.0
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>6.2.0</version>
If that does not work try an older version
<version>5.10.0</version>
from blog.
I have tried to clone your repos and run , get the same message, but application is running mean we can access to http://localhost:8080/index.hml
and one more thing how we test the endpoint /register
from blog.
The repository on GitHub uses 6.1.0. Did you try 6.2.0 or 5.10.0?
to test the endpoint you have to open the browser and point it to the index.html page.
from blog.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.576 s
[INFO] Finished at: 2018-06-11T16:05:31+07:00
[INFO] ------------------------------------------------------------------------
2018-06-11 16:05:31.786 INFO 5000 --- [ Thread-8] onfigReactiveWebServerApplicationContext : Closing org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext@32210b60: startup date [Mon Jun 11 16:05:20 ICT 2018]; root of context hierarchy
2018-06-11 16:05:31.794 INFO 5000 --- [ Thread-8] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
Sending chuck joke...
2018-06-11 16:05:32.032 INFO 5000 --- [ Thread-8] r.ipc.netty.tcp.BlockingNettyContext : Stopped HttpServer on /0:0:0:0:0:0:0:0:8080
2018-06-11 16:05:32.063 ERROR 5000 --- [pool-1-thread-1] o.s.s.s.TaskUtils$LoggingErrorHandler : Unexpected error occurred in scheduled task.
java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.
at com.google.firebase.FirebaseApp.getInstance(FirebaseApp.java:169) ~[firebase-admin-5.10.0.jar:na]
at com.google.firebase.FirebaseApp.getInstance(FirebaseApp.java:140) ~[firebase-admin-5.10.0.jar:na]
at com.google.firebase.messaging.FirebaseMessaging.getInstance(FirebaseMessaging.java:121) ~[firebase-admin-5.10.0.jar:na]
at ch.rasc.swpush.fcm.FcmClient.send(FcmClient.java:52) ~[classes/:na]
at ch.rasc.swpush.PushChuckJokeService.sendPushMessage(PushChuckJokeService.java:47) ~[classes/:na]
at ch.rasc.swpush.PushChuckJokeService.sendChuckQuotes(PushChuckJokeService.java:32) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_171]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_171]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_171]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171]
from blog.
my file is look like this.
from blog.
Related Issues (20)
- CORS preflight issue HOT 11
- /secret and /authenticate routes returning 403 HOT 2
- Throws error HOT 1
- sw-push not works HOT 1
- sw-push, can you tell me messagingSenderId and gcm_sender_id are the same? HOT 14
- [ionic] ts error: FileEntry not found HOT 9
- JWT Authentification: check username HOT 4
- console.log(reader.result ) is {} HOT 5
- [Ionic-4] - no longer working for me HOT 7
- Getting error in polyfills.js line 3 - calls to REST services are showing status as canceled HOT 1
- Runtime Error after building the app in Ionic 4 HOT 2
- Check if file is uploaded HOT 4
- Crop image before upload it HOT 1
- POST http://localhost:8080/clienterror net::ERR_CONNECTION_REFUSED HOT 8
- hotcodepush app on Ionic 4 fails to load the updates HOT 9
- uploaded Image not rendered directly on screen HOT 4
- Runtime error -> jwt (Spring) HOT 2
- readAsArrayBuffer Not Supported HOT 1
- The example does not work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog.