Fatal Exception: java.lang.SecurityException without permission com.google.android.c2dm.permission.RECEIVE












0















Fatal Exception: java.lang.SecurityException: Not allowed to start
service Intent { act=com.google.android.c2dm.intent.REGISTER
pkg=com.google.android.gms (has extras) } without permission
com.google.android.c2dm.permission.RECEIVE
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1419)
at android.app.ContextImpl.startService(ContextImpl.java:1396)
at android.content.ContextWrapper.startService(ContextWrapper.java:623)
at com.google.firebase.iid.zzat.zze(Unknown Source:130)
at com.google.firebase.iid.zzat.zzd(Unknown Source:91)
at com.google.firebase.iid.zzat.zzc(Unknown Source:90)
at com.google.firebase.iid.zzr.zza(Unknown Source:73)
at com.google.firebase.iid.zzs.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)











share|improve this question
























  • Post your manifest file
    – Rahul Chandrabhan
    Dec 28 '18 at 5:51






  • 1




    I just integrated firebase crash and analytics SDK, and didn't use anything about FCM, but this problem has happened on many devices, not 100%, but it will happen frequently. I don't know how to locate and fix it
    – Hante Han
    Dec 28 '18 at 5:53






  • 1




    reference github.com/HanteIsHante/file/issues/62 @RahulChandrabhan
    – Hante Han
    Jan 2 at 7:48
















0















Fatal Exception: java.lang.SecurityException: Not allowed to start
service Intent { act=com.google.android.c2dm.intent.REGISTER
pkg=com.google.android.gms (has extras) } without permission
com.google.android.c2dm.permission.RECEIVE
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1419)
at android.app.ContextImpl.startService(ContextImpl.java:1396)
at android.content.ContextWrapper.startService(ContextWrapper.java:623)
at com.google.firebase.iid.zzat.zze(Unknown Source:130)
at com.google.firebase.iid.zzat.zzd(Unknown Source:91)
at com.google.firebase.iid.zzat.zzc(Unknown Source:90)
at com.google.firebase.iid.zzr.zza(Unknown Source:73)
at com.google.firebase.iid.zzs.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)











share|improve this question
























  • Post your manifest file
    – Rahul Chandrabhan
    Dec 28 '18 at 5:51






  • 1




    I just integrated firebase crash and analytics SDK, and didn't use anything about FCM, but this problem has happened on many devices, not 100%, but it will happen frequently. I don't know how to locate and fix it
    – Hante Han
    Dec 28 '18 at 5:53






  • 1




    reference github.com/HanteIsHante/file/issues/62 @RahulChandrabhan
    – Hante Han
    Jan 2 at 7:48














0












0








0








Fatal Exception: java.lang.SecurityException: Not allowed to start
service Intent { act=com.google.android.c2dm.intent.REGISTER
pkg=com.google.android.gms (has extras) } without permission
com.google.android.c2dm.permission.RECEIVE
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1419)
at android.app.ContextImpl.startService(ContextImpl.java:1396)
at android.content.ContextWrapper.startService(ContextWrapper.java:623)
at com.google.firebase.iid.zzat.zze(Unknown Source:130)
at com.google.firebase.iid.zzat.zzd(Unknown Source:91)
at com.google.firebase.iid.zzat.zzc(Unknown Source:90)
at com.google.firebase.iid.zzr.zza(Unknown Source:73)
at com.google.firebase.iid.zzs.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)











share|improve this question
















Fatal Exception: java.lang.SecurityException: Not allowed to start
service Intent { act=com.google.android.c2dm.intent.REGISTER
pkg=com.google.android.gms (has extras) } without permission
com.google.android.c2dm.permission.RECEIVE
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1419)
at android.app.ContextImpl.startService(ContextImpl.java:1396)
at android.content.ContextWrapper.startService(ContextWrapper.java:623)
at com.google.firebase.iid.zzat.zze(Unknown Source:130)
at com.google.firebase.iid.zzat.zzd(Unknown Source:91)
at com.google.firebase.iid.zzat.zzc(Unknown Source:90)
at com.google.firebase.iid.zzr.zza(Unknown Source:73)
at com.google.firebase.iid.zzs.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)








android sdk android-permissions user-permissions






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 28 '18 at 6:34









Mangesh Pawar

378




378










asked Dec 28 '18 at 5:38









Hante HanHante Han

1




1












  • Post your manifest file
    – Rahul Chandrabhan
    Dec 28 '18 at 5:51






  • 1




    I just integrated firebase crash and analytics SDK, and didn't use anything about FCM, but this problem has happened on many devices, not 100%, but it will happen frequently. I don't know how to locate and fix it
    – Hante Han
    Dec 28 '18 at 5:53






  • 1




    reference github.com/HanteIsHante/file/issues/62 @RahulChandrabhan
    – Hante Han
    Jan 2 at 7:48


















  • Post your manifest file
    – Rahul Chandrabhan
    Dec 28 '18 at 5:51






  • 1




    I just integrated firebase crash and analytics SDK, and didn't use anything about FCM, but this problem has happened on many devices, not 100%, but it will happen frequently. I don't know how to locate and fix it
    – Hante Han
    Dec 28 '18 at 5:53






  • 1




    reference github.com/HanteIsHante/file/issues/62 @RahulChandrabhan
    – Hante Han
    Jan 2 at 7:48
















Post your manifest file
– Rahul Chandrabhan
Dec 28 '18 at 5:51




Post your manifest file
– Rahul Chandrabhan
Dec 28 '18 at 5:51




1




1




I just integrated firebase crash and analytics SDK, and didn't use anything about FCM, but this problem has happened on many devices, not 100%, but it will happen frequently. I don't know how to locate and fix it
– Hante Han
Dec 28 '18 at 5:53




I just integrated firebase crash and analytics SDK, and didn't use anything about FCM, but this problem has happened on many devices, not 100%, but it will happen frequently. I don't know how to locate and fix it
– Hante Han
Dec 28 '18 at 5:53




1




1




reference github.com/HanteIsHante/file/issues/62 @RahulChandrabhan
– Hante Han
Jan 2 at 7:48




reference github.com/HanteIsHante/file/issues/62 @RahulChandrabhan
– Hante Han
Jan 2 at 7:48












2 Answers
2






active

oldest

votes


















0














This happens when you installed an application that uses GCM before you installed GmsCore. Android was not able to grant the requires permission to the app because it did not know about the permission at all (because it is defined in GmsCore). To work around this issue you can re-install the app that causes the problem (no need to remove it, just install it again).



android_packages_apps_GmsCore






share|improve this answer





















  • I didn't use any operations on GCM, only Firebase's crashlytics and anlytics. I don't understand why this kind of problem with GCM still occurs.
    – Hante Han
    Dec 28 '18 at 8:56



















0














Make sure that you have added Receive permission in your android manifest.



You must also initialize runtime permission in code also it is now mandatory from api 23 and higher



if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECIEVE) != PackageManager.PERMISSION_GRANTED){


if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.RECIEVE)){
Toast.makeText(this, "Need Permission.", Toast.LENGTH_SHORT).show();
}else {
ActivityCompat.requestPermissions(this,
new String{Manifest.permission.RECIEVE}, MY_PERMISSIONS_REQUEST_RECIEVE);
}
}else{ // do noting
}


These are the runtime permissions!






share|improve this answer























  • I have tried to add the following permissions, but there are still many devices that have this problem.
    – Hante Han
    Dec 28 '18 at 8:58










  • <!--FireBase Event --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/> <permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
    – Hante Han
    Dec 28 '18 at 8:59










  • Now I don't know how to deal with it.
    – Hante Han
    Dec 28 '18 at 9:00










  • @HanteHan You've send the code of manifest file
    – Tayyab Mazhar
    Dec 29 '18 at 16:41










  • reference github.com/HanteIsHante/file/issues/62
    – Hante Han
    Jan 2 at 7:48











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53954114%2ffatal-exception-java-lang-securityexception-without-permission-com-google-andro%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














This happens when you installed an application that uses GCM before you installed GmsCore. Android was not able to grant the requires permission to the app because it did not know about the permission at all (because it is defined in GmsCore). To work around this issue you can re-install the app that causes the problem (no need to remove it, just install it again).



android_packages_apps_GmsCore






share|improve this answer





















  • I didn't use any operations on GCM, only Firebase's crashlytics and anlytics. I don't understand why this kind of problem with GCM still occurs.
    – Hante Han
    Dec 28 '18 at 8:56
















0














This happens when you installed an application that uses GCM before you installed GmsCore. Android was not able to grant the requires permission to the app because it did not know about the permission at all (because it is defined in GmsCore). To work around this issue you can re-install the app that causes the problem (no need to remove it, just install it again).



android_packages_apps_GmsCore






share|improve this answer





















  • I didn't use any operations on GCM, only Firebase's crashlytics and anlytics. I don't understand why this kind of problem with GCM still occurs.
    – Hante Han
    Dec 28 '18 at 8:56














0












0








0






This happens when you installed an application that uses GCM before you installed GmsCore. Android was not able to grant the requires permission to the app because it did not know about the permission at all (because it is defined in GmsCore). To work around this issue you can re-install the app that causes the problem (no need to remove it, just install it again).



android_packages_apps_GmsCore






share|improve this answer












This happens when you installed an application that uses GCM before you installed GmsCore. Android was not able to grant the requires permission to the app because it did not know about the permission at all (because it is defined in GmsCore). To work around this issue you can re-install the app that causes the problem (no need to remove it, just install it again).



android_packages_apps_GmsCore







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 28 '18 at 6:55









Tang HuaiZheTang HuaiZhe

563




563












  • I didn't use any operations on GCM, only Firebase's crashlytics and anlytics. I don't understand why this kind of problem with GCM still occurs.
    – Hante Han
    Dec 28 '18 at 8:56


















  • I didn't use any operations on GCM, only Firebase's crashlytics and anlytics. I don't understand why this kind of problem with GCM still occurs.
    – Hante Han
    Dec 28 '18 at 8:56
















I didn't use any operations on GCM, only Firebase's crashlytics and anlytics. I don't understand why this kind of problem with GCM still occurs.
– Hante Han
Dec 28 '18 at 8:56




I didn't use any operations on GCM, only Firebase's crashlytics and anlytics. I don't understand why this kind of problem with GCM still occurs.
– Hante Han
Dec 28 '18 at 8:56













0














Make sure that you have added Receive permission in your android manifest.



You must also initialize runtime permission in code also it is now mandatory from api 23 and higher



if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECIEVE) != PackageManager.PERMISSION_GRANTED){


if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.RECIEVE)){
Toast.makeText(this, "Need Permission.", Toast.LENGTH_SHORT).show();
}else {
ActivityCompat.requestPermissions(this,
new String{Manifest.permission.RECIEVE}, MY_PERMISSIONS_REQUEST_RECIEVE);
}
}else{ // do noting
}


These are the runtime permissions!






share|improve this answer























  • I have tried to add the following permissions, but there are still many devices that have this problem.
    – Hante Han
    Dec 28 '18 at 8:58










  • <!--FireBase Event --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/> <permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
    – Hante Han
    Dec 28 '18 at 8:59










  • Now I don't know how to deal with it.
    – Hante Han
    Dec 28 '18 at 9:00










  • @HanteHan You've send the code of manifest file
    – Tayyab Mazhar
    Dec 29 '18 at 16:41










  • reference github.com/HanteIsHante/file/issues/62
    – Hante Han
    Jan 2 at 7:48
















0














Make sure that you have added Receive permission in your android manifest.



You must also initialize runtime permission in code also it is now mandatory from api 23 and higher



if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECIEVE) != PackageManager.PERMISSION_GRANTED){


if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.RECIEVE)){
Toast.makeText(this, "Need Permission.", Toast.LENGTH_SHORT).show();
}else {
ActivityCompat.requestPermissions(this,
new String{Manifest.permission.RECIEVE}, MY_PERMISSIONS_REQUEST_RECIEVE);
}
}else{ // do noting
}


These are the runtime permissions!






share|improve this answer























  • I have tried to add the following permissions, but there are still many devices that have this problem.
    – Hante Han
    Dec 28 '18 at 8:58










  • <!--FireBase Event --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/> <permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
    – Hante Han
    Dec 28 '18 at 8:59










  • Now I don't know how to deal with it.
    – Hante Han
    Dec 28 '18 at 9:00










  • @HanteHan You've send the code of manifest file
    – Tayyab Mazhar
    Dec 29 '18 at 16:41










  • reference github.com/HanteIsHante/file/issues/62
    – Hante Han
    Jan 2 at 7:48














0












0








0






Make sure that you have added Receive permission in your android manifest.



You must also initialize runtime permission in code also it is now mandatory from api 23 and higher



if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECIEVE) != PackageManager.PERMISSION_GRANTED){


if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.RECIEVE)){
Toast.makeText(this, "Need Permission.", Toast.LENGTH_SHORT).show();
}else {
ActivityCompat.requestPermissions(this,
new String{Manifest.permission.RECIEVE}, MY_PERMISSIONS_REQUEST_RECIEVE);
}
}else{ // do noting
}


These are the runtime permissions!






share|improve this answer














Make sure that you have added Receive permission in your android manifest.



You must also initialize runtime permission in code also it is now mandatory from api 23 and higher



if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECIEVE) != PackageManager.PERMISSION_GRANTED){


if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.RECIEVE)){
Toast.makeText(this, "Need Permission.", Toast.LENGTH_SHORT).show();
}else {
ActivityCompat.requestPermissions(this,
new String{Manifest.permission.RECIEVE}, MY_PERMISSIONS_REQUEST_RECIEVE);
}
}else{ // do noting
}


These are the runtime permissions!







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 29 '18 at 16:48

























answered Dec 28 '18 at 7:41









Tayyab MazharTayyab Mazhar

12




12












  • I have tried to add the following permissions, but there are still many devices that have this problem.
    – Hante Han
    Dec 28 '18 at 8:58










  • <!--FireBase Event --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/> <permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
    – Hante Han
    Dec 28 '18 at 8:59










  • Now I don't know how to deal with it.
    – Hante Han
    Dec 28 '18 at 9:00










  • @HanteHan You've send the code of manifest file
    – Tayyab Mazhar
    Dec 29 '18 at 16:41










  • reference github.com/HanteIsHante/file/issues/62
    – Hante Han
    Jan 2 at 7:48


















  • I have tried to add the following permissions, but there are still many devices that have this problem.
    – Hante Han
    Dec 28 '18 at 8:58










  • <!--FireBase Event --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/> <permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
    – Hante Han
    Dec 28 '18 at 8:59










  • Now I don't know how to deal with it.
    – Hante Han
    Dec 28 '18 at 9:00










  • @HanteHan You've send the code of manifest file
    – Tayyab Mazhar
    Dec 29 '18 at 16:41










  • reference github.com/HanteIsHante/file/issues/62
    – Hante Han
    Jan 2 at 7:48
















I have tried to add the following permissions, but there are still many devices that have this problem.
– Hante Han
Dec 28 '18 at 8:58




I have tried to add the following permissions, but there are still many devices that have this problem.
– Hante Han
Dec 28 '18 at 8:58












<!--FireBase Event --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/> <permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
– Hante Han
Dec 28 '18 at 8:59




<!--FireBase Event --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/> <permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
– Hante Han
Dec 28 '18 at 8:59












Now I don't know how to deal with it.
– Hante Han
Dec 28 '18 at 9:00




Now I don't know how to deal with it.
– Hante Han
Dec 28 '18 at 9:00












@HanteHan You've send the code of manifest file
– Tayyab Mazhar
Dec 29 '18 at 16:41




@HanteHan You've send the code of manifest file
– Tayyab Mazhar
Dec 29 '18 at 16:41












reference github.com/HanteIsHante/file/issues/62
– Hante Han
Jan 2 at 7:48




reference github.com/HanteIsHante/file/issues/62
– Hante Han
Jan 2 at 7:48


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53954114%2ffatal-exception-java-lang-securityexception-without-permission-com-google-andro%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas