- [Android O] IllegalStateException: Not allowed to start service Intent #729
- Comments
- cre8ivejp commented Aug 29, 2017 •
- Model
- Error log
- natario1 commented Sep 1, 2017
- flovilmart commented Sep 1, 2017
- natario1 commented Sep 1, 2017
- flovilmart commented Sep 1, 2017
- natario1 commented Sep 1, 2017
- flovilmart commented Sep 1, 2017
- cre8ivejp commented Sep 2, 2017
- rogerhu commented Sep 2, 2017
- cre8ivejp commented Sep 2, 2017
- milosonator commented Sep 9, 2017
- cre8ivejp commented Sep 9, 2017
- milosonator commented Sep 9, 2017
- Jawnnypoo commented Sep 9, 2017
- milosonator commented Sep 9, 2017
- flovilmart commented Sep 9, 2017
- natario1 commented Sep 10, 2017
- flovilmart commented Sep 10, 2017
- natario1 commented Sep 16, 2017
- johnnyzen commented Sep 16, 2017
- johnnyzen commented Sep 16, 2017
- natario1 commented Sep 16, 2017
- johnnyzen commented Sep 16, 2017 •
- natario1 commented Sep 16, 2017 •
- johnnyzen commented Sep 16, 2017
- johnnyzen commented Sep 16, 2017 •
- jbekas commented Sep 20, 2017
- natario1 commented Sep 20, 2017
- FcoCGN commented Nov 20, 2017
- Как решить проблему с виртуализацией HAXM Intel Android Studio?
- [Android O] IllegalStateException: Not allowed to start service Intent #729
- Comments
- cre8ivejp commented Aug 29, 2017 •
- Model
- Error log
- natario1 commented Sep 1, 2017
- flovilmart commented Sep 1, 2017
- natario1 commented Sep 1, 2017
- flovilmart commented Sep 1, 2017
- natario1 commented Sep 1, 2017
- flovilmart commented Sep 1, 2017
- cre8ivejp commented Sep 2, 2017
- rogerhu commented Sep 2, 2017
- cre8ivejp commented Sep 2, 2017
- milosonator commented Sep 9, 2017
- cre8ivejp commented Sep 9, 2017
- milosonator commented Sep 9, 2017
- Jawnnypoo commented Sep 9, 2017
- milosonator commented Sep 9, 2017
- flovilmart commented Sep 9, 2017
- natario1 commented Sep 10, 2017
- flovilmart commented Sep 10, 2017
- natario1 commented Sep 16, 2017
- johnnyzen commented Sep 16, 2017
- johnnyzen commented Sep 16, 2017
- natario1 commented Sep 16, 2017
- johnnyzen commented Sep 16, 2017 •
- natario1 commented Sep 16, 2017 •
- johnnyzen commented Sep 16, 2017
- johnnyzen commented Sep 16, 2017 •
- jbekas commented Sep 20, 2017
- natario1 commented Sep 20, 2017
- FcoCGN commented Nov 20, 2017
[Android O] IllegalStateException: Not allowed to start service Intent #729
Comments
cre8ivejp commented Aug 29, 2017 •
From Android O, background tasks must call Context.startForegroundService instead of Context.startService ,but in this case you could just extend the PushService to JobIntentService to solve this.
Could you take a look at this issue please?
Model
Error log
The text was updated successfully, but these errors were encountered:
natario1 commented Sep 1, 2017
flovilmart commented Sep 1, 2017
@natario1 any easy win to release a fix?
natario1 commented Sep 1, 2017
@flovilmart I am taking a look right now!
flovilmart commented Sep 1, 2017
natario1 commented Sep 1, 2017
@flovilmart what’s your take on ripping out PPNS?
I understand it might be supported by someone out there, but it looks really a thing of the past and is a burden here, over code complexity and maintainance.
For example, from wiki :
In the Android SDK, the client sends a ping message to the server every 15 minutes using a coalesced timer that wakes the device from sleep if necessary.
If this was kind of bad practice before, now it is impossible with newer versions, it won’t work. Not even sure anyone wants that. The platform way to wake up the device upon network requests is using FCM messages, which is where we are heading. Removing PPNS would help a lot, even in fixing this issue.. I’d be glad to do it.
flovilmart commented Sep 1, 2017
I recall @jeacott1 was using it, but I’m not sure where it stands, the reference server implementation is available in GO, but Hasn’t seen maintenance for a while. Let’s open a PR with ripping it out, let it sink a bit and see where we go from there. Android O compat is more important than PPNS if I had to choose
cre8ivejp commented Sep 2, 2017
I also agree about the PPNS.
Since my project only uses GCM I forked the project I made modifications for it to work.
Thank god I could release my app in time.
I was thinking to send a PR, but I was too busy with release this week and also I didn’t know what to do with PPNS.
rogerhu commented Sep 2, 2017
Let’s pull it and someone who wants to support it can offer a PR to make it work on newer devices..
cre8ivejp commented Sep 2, 2017
I was in a hurry so I only did the minimal changes to make it work.
You can take a look here:
cre8ivejp#1
milosonator commented Sep 9, 2017
I get a ton of reported app crashes on android O, only to lead me here. I’m not very deep into the parse code, but is there any way to work around this issue?
cre8ivejp commented Sep 9, 2017
For now there is no workaround for this.
If you can’t wait for an approached solution and
if you don’t use PPNS, you can check my PR as reference and adjust it to your needs or just use it.
I’m using it on my app for a week and so far so good.
milosonator commented Sep 9, 2017
Thanks for your answer @cre8ivejp. Unfortunatly PPNS is important to my use case. Currently I’m investigating the issue in more detail, perhaps disabling PPNS on just Android O until I can get a better solution in place or there is a patch for parse android.
Jawnnypoo commented Sep 9, 2017
For now, you can target/compile with API 25 instead
milosonator commented Sep 9, 2017
@Jawnnypoo even if I already rolled out a version targeting API 26?
flovilmart commented Sep 9, 2017
@milosonator, we’re gonna probably move forward and rip PPNS out for the sake of a fast delivery of the fix. If you wanna skip those version until you can provide a stable solution for PPNS, we’re more than happy to welcome your solution.
natario1 commented Sep 10, 2017
Should be fixed in #735 . If anyone with an Oreo device by hand, a set-up server etc. could test that branch (not only absence of crashes but also push delivery), it would be appreciated.
flovilmart commented Sep 10, 2017
@mmimeault do we have some in the office yet?
natario1 commented Sep 16, 2017
Since we merged #735 you should be able to try 1.16.2-SNAPSHOT . Would be cool to have confirmation that it’s fixed before releasing
johnnyzen commented Sep 16, 2017
johnnyzen commented Sep 16, 2017
still getting the same crash on parse-android-1.16.2-20170910.070003-1
java.lang.RuntimeException: Unable to start receiver com.parse.GcmBroadcastReceiver: java.lang.IllegalStateException: Not allowed to start service Intent
natario1 commented Sep 16, 2017
That does not seem to be the latest snapshot. Did you download that by hand or used compile ‘com.parse:parse-android:1.16.2-SNAPSHOT’ ? You should try the latest, see https://oss.jfrog.org/artifactory/oss-snapshot-local/com/parse/parse-android/1.16.2-SNAPSHOT/ .
johnnyzen commented Sep 16, 2017 •
hey @natario1 I downloaded the AAR, your right, it wasnt the latest.
So I tried parse-android-1.16.2-20170916.045736-2.aar
And getting a crash on starting the app:
Unable to start receiver com.parse.GcmBroadcastReceiver: java.lang.IllegalArgumentException: Scheduled service ComponentInfo
Device: Nexus 5x Android 6.0 -> sorry meant 8.0
natario1 commented Sep 16, 2017 •
Thanks @johnnyzen I have pushed a quick fix in #739 for that.
If you can / wish you can test out my branch. But if you are testing with a pre-Oreo device I don’t see how you could end up there honestly. You should not even see the original Oreo crash at all, right? Maybe you meant Android 8.0
johnnyzen commented Sep 16, 2017
Thanks @natario1 sorry I meant 8.0. its been a long day.
Thanks for quick fix, will test now 🙂
johnnyzen commented Sep 16, 2017 •
Everything is working with your #739 fix. No crashes, push received ok when app closed, and also when app open.
Tested on Nexus 5x Android 8.0
Important! Just to let everyone know, if the app your building is targeting api 26, make sure your using channel ID’s, otherwise the push wont show on device (it wont crash, but you will get an error saying no channel exists)
see: https://developer.android.com/guide/topics/ui/notifiers/notifications.html#CreateChannel
jbekas commented Sep 20, 2017
I just wanted to chime in and say that the 20170916.180926-3 snapshot version is working for me as well. Thanks for the fix!
natario1 commented Sep 20, 2017
This has been released @jbekas
FcoCGN commented Nov 20, 2017
I have received the same error since I upgraded to version 1.16.3 but on devices with versions less than Oreo:
Источник
Как решить проблему с виртуализацией HAXM Intel Android Studio?
Суть проблемы после установки Android Studio не устанавливается модуль виртуализации HAXM Intel
Ошибка
Схема решения 1
Параметры
Виртуализация вкл
VMX — NO
VT-X — NO
Hyper-V — не отключен
EPT — NO
Схема решения 2
Виртуализация- откл
VMX — NO
VT-X — YES
Hyper-V — отключен
EPT — YES
Находил инструкции в которых описано:
1) Hyper-V должен быть отключен
2)Виртуализация (Intel Virtual) включена (устанавливается через BIOS)
3) Процессор Intel должен поддерживать технологии
Все требования успешно сочетаются по инструкции —
на ПРАКТИКЕ все работает по отдельности и естественно эмулятор не хочет запускаться
Выводы
Схема 1
Виртуализация включена через Bios
В таком случае процессором не поддерживаются нужные режимы
Схема 2
Виртуализация отключена через Bios
Процессор поддерживает нужные режимы
В обоих случаях поддержка Hyper-V отключена
Еще находил путь решения изменить Boot List Option с Legacy на UEFI
Структура разделов была ранее MBR поменял на GPT
Итог — не помогло
Вопрос как совместить необходимые требования?
Чтобы работала и виртуализация и требования к процессору.
Источник
[Android O] IllegalStateException: Not allowed to start service Intent #729
Comments
cre8ivejp commented Aug 29, 2017 •
From Android O, background tasks must call Context.startForegroundService instead of Context.startService ,but in this case you could just extend the PushService to JobIntentService to solve this.
Could you take a look at this issue please?
Model
Error log
The text was updated successfully, but these errors were encountered:
natario1 commented Sep 1, 2017
flovilmart commented Sep 1, 2017
@natario1 any easy win to release a fix?
natario1 commented Sep 1, 2017
@flovilmart I am taking a look right now!
flovilmart commented Sep 1, 2017
natario1 commented Sep 1, 2017
@flovilmart what’s your take on ripping out PPNS?
I understand it might be supported by someone out there, but it looks really a thing of the past and is a burden here, over code complexity and maintainance.
For example, from wiki :
In the Android SDK, the client sends a ping message to the server every 15 minutes using a coalesced timer that wakes the device from sleep if necessary.
If this was kind of bad practice before, now it is impossible with newer versions, it won’t work. Not even sure anyone wants that. The platform way to wake up the device upon network requests is using FCM messages, which is where we are heading. Removing PPNS would help a lot, even in fixing this issue.. I’d be glad to do it.
flovilmart commented Sep 1, 2017
I recall @jeacott1 was using it, but I’m not sure where it stands, the reference server implementation is available in GO, but Hasn’t seen maintenance for a while. Let’s open a PR with ripping it out, let it sink a bit and see where we go from there. Android O compat is more important than PPNS if I had to choose
cre8ivejp commented Sep 2, 2017
I also agree about the PPNS.
Since my project only uses GCM I forked the project I made modifications for it to work.
Thank god I could release my app in time.
I was thinking to send a PR, but I was too busy with release this week and also I didn’t know what to do with PPNS.
rogerhu commented Sep 2, 2017
Let’s pull it and someone who wants to support it can offer a PR to make it work on newer devices..
cre8ivejp commented Sep 2, 2017
I was in a hurry so I only did the minimal changes to make it work.
You can take a look here:
cre8ivejp#1
milosonator commented Sep 9, 2017
I get a ton of reported app crashes on android O, only to lead me here. I’m not very deep into the parse code, but is there any way to work around this issue?
cre8ivejp commented Sep 9, 2017
For now there is no workaround for this.
If you can’t wait for an approached solution and
if you don’t use PPNS, you can check my PR as reference and adjust it to your needs or just use it.
I’m using it on my app for a week and so far so good.
milosonator commented Sep 9, 2017
Thanks for your answer @cre8ivejp. Unfortunatly PPNS is important to my use case. Currently I’m investigating the issue in more detail, perhaps disabling PPNS on just Android O until I can get a better solution in place or there is a patch for parse android.
Jawnnypoo commented Sep 9, 2017
For now, you can target/compile with API 25 instead
milosonator commented Sep 9, 2017
@Jawnnypoo even if I already rolled out a version targeting API 26?
flovilmart commented Sep 9, 2017
@milosonator, we’re gonna probably move forward and rip PPNS out for the sake of a fast delivery of the fix. If you wanna skip those version until you can provide a stable solution for PPNS, we’re more than happy to welcome your solution.
natario1 commented Sep 10, 2017
Should be fixed in #735 . If anyone with an Oreo device by hand, a set-up server etc. could test that branch (not only absence of crashes but also push delivery), it would be appreciated.
flovilmart commented Sep 10, 2017
@mmimeault do we have some in the office yet?
natario1 commented Sep 16, 2017
Since we merged #735 you should be able to try 1.16.2-SNAPSHOT . Would be cool to have confirmation that it’s fixed before releasing
johnnyzen commented Sep 16, 2017
johnnyzen commented Sep 16, 2017
still getting the same crash on parse-android-1.16.2-20170910.070003-1
java.lang.RuntimeException: Unable to start receiver com.parse.GcmBroadcastReceiver: java.lang.IllegalStateException: Not allowed to start service Intent
natario1 commented Sep 16, 2017
That does not seem to be the latest snapshot. Did you download that by hand or used compile ‘com.parse:parse-android:1.16.2-SNAPSHOT’ ? You should try the latest, see https://oss.jfrog.org/artifactory/oss-snapshot-local/com/parse/parse-android/1.16.2-SNAPSHOT/ .
johnnyzen commented Sep 16, 2017 •
hey @natario1 I downloaded the AAR, your right, it wasnt the latest.
So I tried parse-android-1.16.2-20170916.045736-2.aar
And getting a crash on starting the app:
Unable to start receiver com.parse.GcmBroadcastReceiver: java.lang.IllegalArgumentException: Scheduled service ComponentInfo
Device: Nexus 5x Android 6.0 -> sorry meant 8.0
natario1 commented Sep 16, 2017 •
Thanks @johnnyzen I have pushed a quick fix in #739 for that.
If you can / wish you can test out my branch. But if you are testing with a pre-Oreo device I don’t see how you could end up there honestly. You should not even see the original Oreo crash at all, right? Maybe you meant Android 8.0
johnnyzen commented Sep 16, 2017
Thanks @natario1 sorry I meant 8.0. its been a long day.
Thanks for quick fix, will test now 🙂
johnnyzen commented Sep 16, 2017 •
Everything is working with your #739 fix. No crashes, push received ok when app closed, and also when app open.
Tested on Nexus 5x Android 8.0
Important! Just to let everyone know, if the app your building is targeting api 26, make sure your using channel ID’s, otherwise the push wont show on device (it wont crash, but you will get an error saying no channel exists)
see: https://developer.android.com/guide/topics/ui/notifiers/notifications.html#CreateChannel
jbekas commented Sep 20, 2017
I just wanted to chime in and say that the 20170916.180926-3 snapshot version is working for me as well. Thanks for the fix!
natario1 commented Sep 20, 2017
This has been released @jbekas
FcoCGN commented Nov 20, 2017
I have received the same error since I upgraded to version 1.16.3 but on devices with versions less than Oreo:
Источник