Fatal Exception: java.lang.SecurityException without permission com.google.android.c2dm.permission.RECEIVE
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
add a comment |
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
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
add a comment |
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
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
android sdk android-permissions user-permissions
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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
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
add a comment |
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!
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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!
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
add a comment |
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!
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
add a comment |
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!
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!
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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