Code Monkey home page Code Monkey logo

Comments (8)

ralscha avatar ralscha commented on August 28, 2024 1

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.

ralscha avatar ralscha commented on August 28, 2024 1

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.

skanel avatar skanel commented on August 28, 2024

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.

ralscha avatar ralscha commented on August 28, 2024

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.

skanel avatar skanel commented on August 28, 2024

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.

ralscha avatar ralscha commented on August 28, 2024

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.

skanel avatar skanel commented on August 28, 2024

[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.

skanel avatar skanel commented on August 28, 2024

my file is look like this.

from blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.