Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service had an error: "Error: Not found; no service started #407

Closed
SanDiegoXu opened this issue Aug 23, 2016 · 19 comments
Closed

Service had an error: "Error: Not found; no service started #407

SanDiegoXu opened this issue Aug 23, 2016 · 19 comments

Comments

@SanDiegoXu
Copy link

Issue:

image

just like mentioned above,when I connected to my Huawei Phone, the issue comes.
It says : FTL/device 6054 [582af7670d26] Setup had an error Error: Service had an error: "Error: Not found; no service started."

My doubt

Why? I have tested on 5 phones, just this phone has this problem。
At the same time, I find no STFService.apk installed on it.

@sorccu
Copy link
Member

sorccu commented Aug 23, 2016

Which model is it? Can you just run adb devices -l and paste the model, product and name here?

Also, I've seen this once before. Turns out that there was some sort of an antivirus app running on the device, and for some reason it didn't like STFService, so it prevented the service from being started. Uninstalling the antivirus apps made it work again. It was one of CMSecurity.apk or DrBooster.apk.

@SanDiegoXu
Copy link
Author

this is the modle of this phone, made by Huawei:

List of devices attached 
582af7670d26           
device
  usb:14100000 
  product:C8817D 
  model:C8817D 
  device:hwC8817D

I guess the reason is antivirus apps,I have installed many antivirus apps on my phone.

Thank you for your reply!
@sorccu

@sorccu
Copy link
Member

sorccu commented Aug 23, 2016

Here's how you can check. Do not have STF running while you do this.

In one shell, run:

adb logcat -s 'ActivityManager:*'

Now, in another shell, attempt to start the service manually:

adb shell am startservice --user 0 -a jp.co.cyberagent.stf.ACTION_START -n jp.co.cyberagent.stf/.Service

Watch the log and perhaps you'll see something like this:

W/ActivityManager(  854):  App Op not allow to start app jp.co.cyberagent.stf/10123

If you see that or something like that, it's one of the antivirus programs getting in the way.

And this is how the offending applications were removed:

adb uninstall com.trendmicro.dr.booster
adb uninstall com.cleanmaster.security

For good measure, perhaps uninstall STFService once too:

adb uninstall jp.co.cyberagent.stf

Now if you unplug the device once and plug it back in, STF should be able to reinstall the service and launch it.

@SanDiegoXu
Copy link
Author

I have checked my running apps through “Settings”,then stop some antivirus apps manually。

So, I still use "rethinkdb" and "stf local" commands. At last, I find I can manipulate my phone through web browser remotely.

At the same time , I uploaded STFService.apk to some antivirus-checking site, the result is "Safe".
But I doubt why antivirus apps prevent to install STF.apk, or prevent this apk to start ?

@sorccu
Copy link
Member

sorccu commented Aug 24, 2016

Not sure, possibly because the app doesn't have a launcher activity it looks suspicious. Or perhaps because of the private APIs.

@xiaweixing
Copy link

I encountered the same issue, uninstalled a few antivirus apps(e.g. 360), but it is not working. Could you please help take a look? Thx!

adb devices -l shows:
LE67A06180224872 device usb:1-8.3.2 product:Le2_CN1 model:Le_X620 device:le_x6
logcat shows:
08-30 19:27:56.047 D/AndroidRuntime(14924): Calling main entry jp.co.cyberagent.stf.Agent 08-30 19:27:56.160 I/ADB_SERVICES( 7475): service_to_fd shell:am startservice --user 0 -a 'jp.co.cyberagent.stf.ACTION_START' -n 'jp.co.cyberagent.stf/.Service' 08-30 19:27:56.709 W/ActivityManager( 1156): don't allow to start ServiceInfo{f4d3cd jp.co.cyberagent.stf.Service}

@sorccu
Copy link
Member

sorccu commented Aug 30, 2016

Thanks for the useful log. Based on the somewhat poor english in the log output it seems like there's still some kind of an antivirus or blocker running. Would be very interesting to know which app it ends up being. You can try something like adb shell pm list packages -3 to show all 3rd party packages in the system.

@sorccu
Copy link
Member

sorccu commented Aug 30, 2016

I want to see it myself and hopefully fix it. I've ordered that phone from Aliexpress. Will probably arrive by the end of the month.

@xiaweixing
Copy link

test@ubuntu:~$ adb -s LE67A06180224872 shell pm list package -3
package:jp.co.cyberagent.stf
package:io.appium.settings
package:com.letv.bbs
package:com.futurestar.mkmyle
package:com.wochacha
package:com.snda.wifilocating
package:com.linksure.wifimaster
package:com.snda.wifisocial
package:com.baidu.BaiduMap
package:com.example.test
package:io.appium.android.ime
package:com.lantern.test
package:com.sina.weibo
package:lbs.cmri.cmcc.com
package:org.dsjzj.mytracks
package:io.appium.unlock
package:cn.wps.moffice_eng
test@ubuntu:~$ 

I am thinking, is it possible that some ROMs themselves have some kind of restrictions?

@sorccu
Copy link
Member

sorccu commented Aug 31, 2016

Well it's possible it's a system package as well. Perhaps try to take out
the -3 flag and see if there's anything there?

It'll be at least a month before I can do anything about this myself.

On Wednesday, 31 August 2016, xiaweixing notifications@github.com wrote:

test@ubuntu:$ adb -s LE67A06180224872 shell pm list package -3
package:jp.co.cyberagent.stf
package:io.appium.settings
package:com.letv.bbs
package:com.futurestar.mkmyle
package:com.wochacha
package:com.snda.wifilocating
package:com.linksure.wifimaster
package:com.snda.wifisocial
package:com.baidu.BaiduMap
package:com.example.test
package:io.appium.android.ime
package:com.lantern.test
package:com.sina.weibo
package:lbs.cmri.cmcc.com
package:org.dsjzj.mytracks
package:io.appium.unlock
package:cn.wps.moffice_eng
test@ubuntu:
$

I am thinking, is it possible that some ROMs themselves have some kind of
restrictions?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#407 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAB-_cqcxJpHUySdMk-otT3O8lBHM-W4ks5qlOH5gaJpZM4JqgwC
.

@xiaweixing
Copy link

test@ubuntu:~$ adb -s LE67A06180224872 shell pm list package
package:com.mediatek.gba
package:com.mediatek.ims
package:com.mediatek.ppl
package:jp.co.cyberagent.stf
package:com.huaqin.runtime
package:com.uei.quicksetsdk.letv
package:com.letv.android.quicksearchbox
package:com.android.providers.telephony
package:io.appium.settings
package:com.goodix.fingerprint
package:com.letv.android.agent
package:com.letv.android.theme
package:com.letv.android.zxing
package:com.android.providers.calendar
package:com.android.providers.media
package:com.softsim.control
package:com.mediatek.fwk.plugin
package:com.letv.android.account
package:com.android.wallpapercropper
package:com.mediatek.schpwronoff
package:com.letv.android.wallpaper
package:com.letv.leui.schpwronoff
package:com.redteamobile.virtual.softsim
package:com.dolby.daxappUI
package:com.letv.android.wallpaperonline
package:com.android.documentsui
package:com.letv.leui.sdk.data
package:com.letv.android.letvlive
package:com.letv.android.letvsafe
package:com.android.externalstorage
package:com.lesports.glivesports
package:com.mediatek.ygps
package:com.android.htmlviewer
package:com.letv.android.themesettings
package:com.android.mms.service
package:com.android.providers.downloads
package:com.fw.upgrade
package:com.letv.android.note
package:com.mediatek.engineermode
package:com.letv.bbs
package:com.mediatek.omacp
package:com.letv.letvshop
package:com.android.browser
package:com.android.providers.applications
package:com.le.share.x6pro
package:com.letv.android.usagestats
package:com.letv.android.personalized
package:com.baidu.input_letv
package:com.android.defcontainer
package:com.letv.app.appstore
package:com.android.providers.downloads.ui
package:com.android.pacprocessor
package:com.stv.stvpush
package:com.android.vendors.bridge.softsim
package:com.letv.android.freeflow
package:com.android.certinstaller
package:com.android.carrierconfig
package:android
package:com.mediatek.connectivity
package:com.android.contacts
package:com.android.camera2
package:com.letv.android.remotecontrol
package:com.android.mms
package:com.android.stk
package:com.android.launcher3
package:com.android.backupconfirm
package:se.dirac.acs
package:com.mediatek.bluetooth.dtt
package:com.letv.android.backup
package:com.android.statementservice
package:com.mediatek.voiceextension
package:com.letv.android.client
package:com.letv.android.setupwizard
package:com.mediatek.floatmenu
package:com.android.wallpaper.holospiral
package:com.futurestar.mkmyle
package:com.android.calendar
package:com.android.phasebeam
package:com.mediatek.providers.drm
package:com.letv.android.remotedevice
package:com.letv.android.backupclient
package:com.android.providers.settings
package:com.mediatek.miravision.ui
package:com.android.sharedstoragebackup
package:com.mediatek.batterywarning
package:com.android.printspooler
package:com.android.dreams.basic
package:com.letv.android.recorder
package:com.android.webview
package:com.android.inputdevices
package:com.mediatek
package:com.android.providers.calllogbackup
package:com.example
package:com.android.musicfx
package:com.android.VRAdmin
package:com.letv.bugpostbox
package:com.android.cellbroadcastreceiver
package:com.google.android.webview
package:com.android.onetimeinitializer
package:com.lvr.wizzard
package:com.mediatek.nlpservice
package:com.android.server.telecom
package:com.android.keychain
package:com.letv.android.compass
package:com.android.dialer
package:com.android.gallery3d
package:com.letv.domain
package:com.google.android.gms
package:com.google.android.gsf
package:com.mediatek.hetcomm
package:com.android.packageinstaller
package:com.wochacha
package:com.svox.pico
package:com.dsi.ant.server
package:com.android.proxyhandler
package:com.android.inputmethod.latin
package:com.snda.wifilocating
package:com.letv.agnes
package:com.mediatek.esntrack
package:com.letv.android.supermanager
package:com.letv.games
package:com.letv.android.powercontroller
package:com.linksure.wifimaster
package:com.android.managedprovisioning
package:com.snda.wifisocial
package:com.mediatek.calendarimporter
package:com.mediatek.atci.service
package:com.hq.lcdtest
package:com.letv.android.DebugUtils
package:com.mediatek.thermalmanager
package:com.letv.lesophoneclient
package:com.baidu.BaiduMap
package:com.android.noisefield
package:com.google.android.gsf.login
package:com.example.test
package:com.letv.android.bugreporter
package:com.mtk.telephony
package:com.letv.android.accountinfo
package:com.mediatek.voicecommand
package:com.letv.wallet
package:com.android.wallpaper.livepicker
package:com.alipay.authinfo.provider
package:com.dolby
package:com.baidu.map.location
package:com.letv.android.filemanager
package:io.appium.android.ime
package:com.hq.tptest
package:com.letv.android.themestore
package:com.android.settings
package:com.letv.android.ecoProvider
package:com.le.share.x6
package:com.fw.upgrade.sysoper
package:com.android.calculator2
package:com.huaqin.factoryservice
package:com.mediatek.lbs.em2.ui
package:com.letv.android.emojistore
package:com.letv.android.cloudservice
package:com.lantern.test
package:com.android.wallpaper
package:com.letv.bsp.crashhandler
package:com.android.vpndialogs
package:com.mediatek.systemupdate.sysoper
package:com.android.email
package:com.sina.weibo
package:com.android.music
package:com.android.phone
package:com.android.shell
package:lbs.cmri.cmcc.com
package:com.android.providers.userdictionary
package:se.dirac.examples.effectservice
package:com.android.location.fused
package:org.dsjzj.mytracks
package:com.android.deskclock
package:com.android.systemui
package:com.android.exchange
package:com.android.bluetoothmidiservice
package:sina.mobile.tianqitongletv
package:com.mediatek.systemupdate
package:com.hq.cameratest
package:com.letv.android.videoplayer
package:com.mediatek.mtklogger
package:com.mediatek.sensorhub.ui
package:com.letv.android.ota
package:io.appium.unlock
package:com.android.bluetooth
package:com.sohu.inputmethod.sogou.leshi
package:com.android.providers.contacts
package:com.android.captiveportallogin
package:com.hqfactory.factory
package:cn.wps.moffice_eng
package:com.mediatek.dataprotection
package:com.letv.android.LetvShareProvider
package:com.letv.android.phonecontrol
package:com.letv.android.euitransfer
test@ubuntu:~$ 

@sorccu
Copy link
Member

sorccu commented Sep 2, 2016

I've just updated STFService.apk for an unrelated reason - I'm curious if you're seeing any change with this issue? Can you update your STF and try again? Use master or the :latest docker tag.

@xiaweixing
Copy link

Hi Sorccu,

I've pulled the latest stf:

test@ubuntu:~$ docker images
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
openstf/stf          latest              a5e85e901417        4 days ago          751.8 MB
rethinkdb            2.3.5               e30940c8232c        7 days ago          183.9 MB
rethinkdb            latest              e30940c8232c        7 days ago          183.9 MB
nginx                latest              4efb2fcdb1ab        2 weeks ago         183.4 MB
sorccu/adb           latest              d6e99adff7e2        5 weeks ago         25.88 MB
openstf/ambassador   latest              b1f0eb8297cf        12 months ago       6.46 MB
test@ubuntu:~$ 
test@ubuntu:~$ docker pull openstf/stf:latest
latest: Pulling from openstf/stf

Digest: sha256:7fc0ae8484a5c18498a3f973259487aac4f899c658a0c536eebcd948f5abbfea
Status: Image is up to date for openstf/stf:latest
test@ubuntu:~$ 

But still 2 devices showing errors in provider log:

LE67A06180224872       device usb:1-8.3.2 product:Le2_CN1 model:Le_X620 device:le_x6
c806b880               device usb:1-8.4.1 product:k9 model:ZUK_Z1 device:k9

for LE67A06180224872, errors are same as before.

for c806b880, errors as below:

INF/device:plugins:touch 14966 [c806b880] Touch origin is top left
INF/device:plugins:touch 14966 [c806b880] Requesting touch consumer to start
INF/device:plugins:touch 14966 [c806b880] Launching screen service
INF/device:plugins:touch 14966 [c806b880] Connecting to minitouch service
INF/device:plugins:touch 14966 [c806b880] minitouch says: "/system/bin/sh: /data/local/tmp/minitouch: can't execute: Permission denied"
WRN/device:plugins:touch 14966 [c806b880] Shell keeping minitouch running ended unexpectedly
INF/device:plugins:touch 14966 [c806b880] Disconnecting from minitouch service
INF/device:plugins:touch 14966 [c806b880] Stopping minitouch service
INF/device:plugins:touch 14966 [c806b880] Launching screen service
INF/device:plugins:touch 14966 [c806b880] Connecting to minitouch service
INF/device:plugins:touch 14966 [c806b880] minitouch says: "/system/bin/sh: /data/local/tmp/minitouch: can't execute: Permission denied"
WRN/device:plugins:touch 14966 [c806b880] Shell keeping minitouch running ended unexpectedly
INF/device:plugins:touch 14966 [c806b880] Disconnecting from minitouch service
INF/device:plugins:touch 14966 [c806b880] Stopping minitouch service
INF/device:plugins:touch 14966 [c806b880] Launching screen service
INF/device:plugins:touch 14966 [c806b880] Connecting to minitouch service
INF/device:plugins:touch 14966 [c806b880] minitouch says: "/system/bin/sh: /data/local/tmp/minitouch: can't execute: Permission denied"
INF/device:support:push 14990 [LE67A06180224872] Sending output to "tcp://10.241.54.16:7270"
INF/device 14990 [LE67A06180224872] Preparing device
WRN/device:plugins:touch 14966 [c806b880] Shell keeping minitouch running ended unexpectedly
INF/device:plugins:touch 14966 [c806b880] Disconnecting from minitouch service
INF/device:plugins:touch 14966 [c806b880] Stopping minitouch service
INF/device:plugins:touch 14966 [c806b880] Launching screen service
INF/device:plugins:touch 14966 [c806b880] Connecting to minitouch service
INF/device:plugins:touch 14966 [c806b880] minitouch says: "/system/bin/sh: /data/local/tmp/minitouch: can't execute: Permission denied"
WRN/device:plugins:touch 14966 [c806b880] Shell keeping minitouch running ended unexpectedly
INF/device:plugins:touch 14966 [c806b880] Disconnecting from minitouch service
WRN/device:plugins:touch 14966 [c806b880] Will not apply desired state due to too many failures
INF/device:plugins:touch 14966 [c806b880] Stopping minitouch service
FTL/device 14966 [c806b880] Setup had an error Error: Failed more than 3 times in 10000ms
    at TouchConsumer._failLimitExceeded (/app/lib/units/device/plugins/touch/index.js:230:26)
    at FailCounter.emit (/app/node_modules/eventemitter3/index.js:117:35)
    at FailCounter.inc (/app/lib/util/failcounter.js:29:10)
    at TouchConsumer._outputEnded (/app/lib/units/device/plugins/touch/index.js:223:24)
    at RiskyStream.emit (/app/node_modules/eventemitter3/index.js:115:35)
    at RiskyStream.<anonymous> (/app/lib/util/riskystream.js:14:12)
    at emitNone (events.js:91:20)
    at Socket.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:973:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
From previous event:
    at startConsumer (/app/lib/units/device/plugins/touch/index.js:511:14)
    at /app/lib/units/device/plugins/touch/index.js:526:12
    at SerialSyrup.ParallelSyrup.invoke (/app/node_modules/stf-syrup/lib/parallel.js:54:24)
    at /app/node_modules/stf-syrup/lib/serial.js:43:33
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
FTL/util:lifecycle 14966 [c806b880] Shutting down due to fatal error
INF/provider 1 [*] Cleaning up device worker "c806b880"
ERR/provider 1 [*] Device worker "c806b880" died with code 1

@test01wrk
Copy link

@xiaweixing I have the same phone(le_x6) and the same problem. I sovled it by pushing STFService.apk to /system/priv-app/STFService/STFService.apk, the service will automatically start after a reboot, and everything works fine now.

@xiaweixing
Copy link

@test01wrk Thanks a lot for the info!! But how and where can I download the latest STFService.apk? I couldn't figure it out yet :(

@sorccu
Copy link
Member

sorccu commented Sep 18, 2016

I have now received the Le_X620 and I can confirm that it has that issue. However I seem to have found the cause.

At least for Le_X620, it does NOT have anything to do with an antivirus. It seems that trying to launch a service while the app is not running already counts as an "Auto Launch" and the system prevents that by default. I tried with a brand new application with an empty service and got the same result.

What you have to do is:

  1. Add the device to STF and let it install the service application. It's OK if it starts failing.
  2. Go to Settings on the device.
  3. Look for Permissions under Personal.
  4. Choose "You have allowed X apps to auto launch".
  5. Toggle STFService ON.
  6. You're done, the device now works with STF.

Here's a gif of how to do it:

le_x620

@xiaweixing
Copy link

xiaweixing commented Sep 19, 2016

Great!! It worked like a charm!! Thank you so much!!

@xiaweixing
Copy link

@sorccu I posted another device issue earlier together with le_x620, but it is still not resolved. Is it possible for you to test it? Or any ideas how to troubleshoot? Thx!

c806b880               device usb:1-8.4.1 product:k9 model:ZUK_Z1 device:k9

errors as below:

INF/device:plugins:touch 14966 [c806b880] Touch origin is top left
INF/device:plugins:touch 14966 [c806b880] Requesting touch consumer to start
INF/device:plugins:touch 14966 [c806b880] Launching screen service
INF/device:plugins:touch 14966 [c806b880] Connecting to minitouch service
INF/device:plugins:touch 14966 [c806b880] minitouch says: "/system/bin/sh: /data/local/tmp/minitouch: can't execute: Permission denied"
WRN/device:plugins:touch 14966 [c806b880] Shell keeping minitouch running ended unexpectedly
INF/device:plugins:touch 14966 [c806b880] Disconnecting from minitouch service
INF/device:plugins:touch 14966 [c806b880] Stopping minitouch service
INF/device:plugins:touch 14966 [c806b880] Launching screen service
INF/device:plugins:touch 14966 [c806b880] Connecting to minitouch service
INF/device:plugins:touch 14966 [c806b880] minitouch says: "/system/bin/sh: /data/local/tmp/minitouch: can't execute: Permission denied"
WRN/device:plugins:touch 14966 [c806b880] Shell keeping minitouch running ended unexpectedly
INF/device:plugins:touch 14966 [c806b880] Disconnecting from minitouch service
INF/device:plugins:touch 14966 [c806b880] Stopping minitouch service
INF/device:plugins:touch 14966 [c806b880] Launching screen service
INF/device:plugins:touch 14966 [c806b880] Connecting to minitouch service
INF/device:plugins:touch 14966 [c806b880] minitouch says: "/system/bin/sh: /data/local/tmp/minitouch: can't execute: Permission denied"
INF/device:support:push 14990 [LE67A06180224872] Sending output to "tcp://10.241.54.16:7270"
INF/device 14990 [LE67A06180224872] Preparing device
WRN/device:plugins:touch 14966 [c806b880] Shell keeping minitouch running ended unexpectedly
INF/device:plugins:touch 14966 [c806b880] Disconnecting from minitouch service
INF/device:plugins:touch 14966 [c806b880] Stopping minitouch service
INF/device:plugins:touch 14966 [c806b880] Launching screen service
INF/device:plugins:touch 14966 [c806b880] Connecting to minitouch service
INF/device:plugins:touch 14966 [c806b880] minitouch says: "/system/bin/sh: /data/local/tmp/minitouch: can't execute: Permission denied"
WRN/device:plugins:touch 14966 [c806b880] Shell keeping minitouch running ended unexpectedly
INF/device:plugins:touch 14966 [c806b880] Disconnecting from minitouch service
WRN/device:plugins:touch 14966 [c806b880] Will not apply desired state due to too many failures
INF/device:plugins:touch 14966 [c806b880] Stopping minitouch service
FTL/device 14966 [c806b880] Setup had an error Error: Failed more than 3 times in 10000ms
    at TouchConsumer._failLimitExceeded (/app/lib/units/device/plugins/touch/index.js:230:26)
    at FailCounter.emit (/app/node_modules/eventemitter3/index.js:117:35)
    at FailCounter.inc (/app/lib/util/failcounter.js:29:10)
    at TouchConsumer._outputEnded (/app/lib/units/device/plugins/touch/index.js:223:24)
    at RiskyStream.emit (/app/node_modules/eventemitter3/index.js:115:35)
    at RiskyStream.<anonymous> (/app/lib/util/riskystream.js:14:12)
    at emitNone (events.js:91:20)
    at Socket.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:973:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
From previous event:
    at startConsumer (/app/lib/units/device/plugins/touch/index.js:511:14)
    at /app/lib/units/device/plugins/touch/index.js:526:12
    at SerialSyrup.ParallelSyrup.invoke (/app/node_modules/stf-syrup/lib/parallel.js:54:24)
    at /app/node_modules/stf-syrup/lib/serial.js:43:33
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
FTL/util:lifecycle 14966 [c806b880] Shutting down due to fatal error
INF/provider 1 [*] Cleaning up device worker "c806b880"
ERR/provider 1 [*] Device worker "c806b880" died with code 1

@sorccu
Copy link
Member

sorccu commented Sep 29, 2016

One issue per device please. Closing this one, created a new one for ZUK Z1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants