pusheco / pushe-flutter

Pushe plugin for Flutter framework
Other
14 stars 4 forks source link

🐛 [BUG]: Unable to obtain the Pushe core component #19

Closed arashhesni closed 3 years ago

arashhesni commented 3 years ago
The Pushe service PusheNotification is not available. This either means you have provided an invalid Pushe Service name, Pushe was not initialized successfully or you have not added the Pushe service to your gradle dependencies. طبق مستند پیش رفتم **اطلاعات محیط تست**
**لاگ خطا در لاگ‌کت**
The Pushe service PusheNotification is not available. This either means you have provided an invalid Pushe Service name, Pushe was not initialized successfully or you have not added the Pushe service to your gradle dependencies.
2021-06-01 08:32:19.026 6259-6259/com.example.notif_test E/Pushe: The Pushe service PusheAnalytics is not available. This either means you have provided an invalid Pushe Service name, Pushe was not initialized successfully or you have not added the Pushe service to your gradle dependencies.
2021-06-01 08:32:19.026 6259-6259/com.example.notif_test E/Pushe: The Pushe service PusheInAppMessaging is not available. This either means you have provided an invalid Pushe Service name, Pushe was not initialized successfully or you have not added the Pushe service to your gradle dependencies.
2021-06-01 08:32:19.026 6259-6259/com.example.notif_test E/Pushe: The Pushe service PusheFCM is not available. This either means you have provided an invalid Pushe Service name, Pushe was not initialized successfully or you have not added the Pushe service to your gradle dependencies.
2021-06-01 08:32:19.026 6259-6259/com.example.notif_test E/Pushe: The Pushe service PusheHMS is not available. This either means you have provided an invalid Pushe Service name, Pushe was not initialized successfully or you have not added the Pushe service to your gradle dependencies.
2021-06-01 08:32:19.027 6259-6259/com.example.notif_test E/Pushe: Getting Custom Id failed
    co.pushe.plus.internal.PusheException: Unable to obtain the Pushe core component. This probably means Pushe initialization has failed.
        at co.pushe.plus.Pushe.getCoreComponentOrFail(Pushe.java:4)
        at co.pushe.plus.Pushe.getCustomId(Pushe.java:1)
        at co.pushe.plus.flutter.PusheChandler.onMethodCall(PusheChandler.kt:80)
        at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
        at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
        at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:335)
        at android.os.Looper.loop(Looper.java:183)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
2021-06-01 08:32:23.945 6259-6259/com.example.notif_test E/Pushe: The Pushe service PusheNotification is not available. This either means you have provided an invalid Pushe Service name, Pushe was not initialized successfully or you have not added the Pushe service to your gradle dependencies.
2021-06-01 08:32:23.945 6259-6259/com.example.notif_test E/Pushe: The Pushe service PusheAnalytics is not available. This either means you have provided an invalid Pushe Service name, Pushe was not initialized successfully or you have not added the Pushe service to your gradle dependencies.
2021-06-01 08:32:23.945 6259-6259/com.example.notif_test E/Pushe: The Pushe service PusheInAppMessaging is not available. This either means you have provided an invalid Pushe Service name, Pushe was not initialized successfully or you have not added the Pushe service to your gradle dependencies.
2021-06-01 08:32:23.945 6259-6259/com.example.notif_test E/Pushe: The Pushe service PusheFCM is not available. This either means you have provided an invalid Pushe Service name, Pushe was not initialized successfully or you have not added the Pushe service to your gradle dependencies.
2021-06-01 08:32:23.945 6259-6259/com.example.notif_test E/Pushe: The Pushe service PusheHMS is not available. This either means you have provided an invalid Pushe Service name, Pushe was not initialized successfully or you have not added the Pushe service to your gradle dependencies.
2021-06-01 08:32:23.946 6259-6259/com.example.notif_test E/Pushe: Setting Custom Id failed
    co.pushe.plus.internal.PusheException: Unable to obtain the Pushe core component. This probably means Pushe initialization has failed.
        at co.pushe.plus.Pushe.getCoreComponentOrFail(Pushe.java:4)
        at co.pushe.plus.Pushe.setCustomId(Pushe.java:1)
        at co.pushe.plus.flutter.PusheChandler.setCustomId(PusheChandler.kt:151)
        at co.pushe.plus.flutter.PusheChandler.onMethodCall(PusheChandler.kt:81)
        at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
        at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
        at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:335)
        at android.os.Looper.loop(Looper.java:183)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
mahdi-malv commented 3 years ago
سلام عذرخواهی میکنم بابت تاخیر در پاسخ دادن احتمال داره این خطا بخاطر این باشه که زودتر از init شدن کدهای پوشه یکی از فانکشنالیتی ها استفاده شده برای حلش (درصورتی که مشکل رو درست تشخیص داده باشم) باید کدی که استفاده میکنید رو توی setInitializationCompletedListener بذارید [**مستندات بخش مربوطه**](https://docs.pushe.co/docs/flutter/registration) یکی از اینها
Pushe.setRegistrationCompleteListener(() {
  // Registration completed. You may now use functionalities of Pushe
});
Pushe.setInitializationCompleteListener(() {
  // Modules are ready to use
  // Again, this does not mean device is registered to server
});
mahdi-malv commented 3 years ago

Closing because of in activity for 15days. Feel free to re-open if issue stills exists