NIFCLOUD-mbaas / monaca_push_plugin

ニフクラ mobile backendのMonaca用プッシュ通知プラグイン
Other
6 stars 9 forks source link

setDeviceTokenの第二引数clietKeyに""をセットすると、アプリが異常終了します。 #32

Closed oonoyosp closed 6 years ago

oonoyosp commented 7 years ago

不具合の概要(Description of bug)

(お客様からの不具合報告) [Androidのみ]setDeviceTokenの第二引数clietKeyに""をセットすると、アプリが異常終了します。

エラーログ

05-16 14:39:27.512 3476-3814/xxxxxxxxxxxxxx E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2 
Process: xxxxxxxxxxxxxx, PID: 3476 
java.lang.RuntimeException: An error occured while executing doInBackground() 
at android.os.AsyncTask$3.done(AsyncTask.java:309) 
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) 
at java.util.concurrent.FutureTask.setException(FutureTask.java:222) 
at java.util.concurrent.FutureTask.run(FutureTask.java:242) 
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
at java.lang.Thread.run(Thread.java:818) 
Caused by: java.lang.IllegalArgumentException: signature 
at com.nifty.cloud.mb.core.NCMBRequest.createSignature(NCMBRequest.java:377) 
at com.nifty.cloud.mb.core.NCMBRequest.<init>(NCMBRequest.java:338) 
at com.nifty.cloud.mb.core.NCMBRequest.<init>(NCMBRequest.java:232) 
at com.nifty.cloud.mb.core.NCMBService.sendRequestAsync(NCMBService.java:237) 
at com.nifty.cloud.mb.core.NCMBService.sendRequestAsync(NCMBService.java:318) 
at com.nifty.cloud.mb.core.NCMBInstallationService.updateInstallationInBackground(NCMBInstallationService.java:227) 
at com.nifty.cloud.mb.core.NCMBInstallation.saveInBackground(NCMBInstallation.java:652) 
at plugin.push.nifty.NiftyPushPlugin$2.done(NiftyPushPlugin.java:263) 
at com.nifty.cloud.mb.core.NCMBInstallation$1.doInBackground(NCMBInstallation.java:442) 
at com.nifty.cloud.mb.core.NCMBInstallation$1.doInBackground(NCMBInstallation.java:437) 
at android.os.AsyncTask$2.call(AsyncTask.java:297) 
at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)? 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)? 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)? 
at java.lang.Thread.run(Thread.java:818)?
ncmbadmin commented 6 years ago

ご報告いただき、ありがとうございます。 以下のように設定致しましたら、 同じくエラー再現することができました。 引続き対応を進めさせて頂きます。

                window.NCMB.monaca.setDeviceToken(
                    "******",
                    "",
                    "******",
                    successCallback,
                    errorCallback
                );
01-24 16:19:27.300: E/AndroidRuntime(18212):    at com.nifty.cloud.mb.core.NCMBInstallation.saveInBackground(NCMBInstallation.java:643)
01-24 16:19:27.300: E/AndroidRuntime(18212):    at plugin.push.nifty.NiftyPushPlugin$2.done(NiftyPushPlugin.java:263)
01-24 16:19:27.300: E/AndroidRuntime(18212):    at com.nifty.cloud.mb.core.NCMBInstallation$1.doInBackground(NCMBInstallation.java:442)
01-24 16:19:27.300: E/AndroidRuntime(18212):    at com.nifty.cloud.mb.core.NCMBInstallation$1.doInBackground(NCMBInstallation.java:437)
01-24 16:19:27.300: E/AndroidRuntime(18212):    at android.os.AsyncTask$2.call(AsyncTask.java:305)
01-24 16:19:27.300: E/AndroidRuntime(18212):    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
01-24 16:19:27.300: E/AndroidRuntime(18212):    ... 4 more
01-24 16:19:27.303: W/ActivityManager(2121):   Force finishing activity com.fjct.PushSample/.MainActivity