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

全量编译成功,增量编译失败,求解决方法 #731

Closed
heluotian opened this issue Mar 21, 2017 · 8 comments
Closed

全量编译成功,增量编译失败,求解决方法 #731

heluotian opened this issue Mar 21, 2017 · 8 comments

Comments

@heluotian
Copy link

heluotian commented Mar 21, 2017

运行条件:
1.手机上无apk
2.没有开代理
3.执行 python freeline.py -f 成功
但是之后编译执行 python freeline.py 就出现 Freeline server in app "package name" not found. Please make sure your application is properly running in your device. 这样的问题。
排除:手机连接无问题;
4.#152 解决方法测试无法解决;
5.重启无法解决。
6. 日志中没有Freeline.increment server running on port xxx

日志
xx>python freeline.py -d
[DEBUG] [dispatcher] command line args: Namespace(all=False, clean=False, cleanBuild=False, debug=True, version=False, wait=False)
[DEBUG] [dispatcher] *** Android Gradle Plugin Version: 1.3.1
[DEBUG] [dispatcher] *** Freeline Gradle Plugin Version: 0.8.6
[DEBUG] [dispatcher] *** Freeline Python Version: v0.8.6

[DEBUG] [xxinc_dex_compile] start to execute dex command...
[DEBUG] [xx_inc_invoker] dex exec: D:\android\sdk\build-tools\24.0.0\dx.bat --dex --multi-dex --output=D:\xx\build\freeline
xx\dex D:\xx\build\freeline\xx\classes
[DEBUG] [xx] xx finish in 4.4s
[DEBUG] [merge_dex_task] merge_dex_task start to run after waiting 4.5s
[DEBUG] [merge_dex_task] just 1 dex need to sync, copy xx\build\freeline\xx\dex\classes.dex to D:\xx\build\freeline\freeline-dexes\merged.dex
[DEBUG] [merge_dex_task] merge_dex_task finish in 0.0s
[DEBUG] [sync_client] wake up Service: D:\android\sdk\platform-tools\adb.exe shell am startservice -n xx/com.antfortune.freeline.FreelineService
[DEBUG] [sync_client] try to connect device 1 times...
[DEBUG] [sync_client] wake up Service: D:\android\sdk\platform-tools\adb.exe shell am startservice -n xx/com.antfortune.freeline.FreelineService -e wakeup marker
...
[DEBUG] [sync_client] try to connect device 10 times...
[DEBUG] [sync_client] Freeline server in app xx not found. Please make sure your application is properly running in your device.
[DEBUG] [connect_device_task] connect_device_task finish in 80.5s
[DEBUG] [gradle_sync_task] gradle_sync_task start to run after waiting 80.5s
[DEBUG] [clean_cache_task] clean_cache_task start to run after waiting 80.5s
[DEBUG] [update_stat_task] update_stat_task start to run after waiting 80.5s
[DEBUG] [task_engine] task engine occurs exception, engine will exit.
[DEBUG] [task_engine] it takes task engine 80.53s to execute tasks.
[ERROR] --------------------------------------------------------
[ERROR] Freeline ERROR
[ERROR] --------------------------------------------------------
Please make sure your application is properly running in your device.
Check follow steps:

  1. Make sure the versions python freeline.py -v, freeline-gradle and freeline-runtime are the same;
  2. Make sure there is no network proxy.
    More about this can see: [问题排查] Freeline "try to connect device/ connect_device_task failed."  #152
    [ERROR] --------------------------------------------------------
    [ERROR] Freeline server in app xx not found. Please make sure your application is properly running in your device.
    [ERROR] --------------------------------------------------------
    [DEBUG] Prepare tasks time: 0.8s
    [DEBUG] Task engine running time: 80.5s
    [DEBUG] Total time: 81.3s
    [DEBUG] --------------------------------------------------------

单独执行

$ adb shell am startservice -n xx/com.antfortune.freeline.FreelineService
-e wakeup marker
Starting service: Intent { cmp=xx/com.antfortune.freeline.FreelineService (has extras) }

$ adb shell am startservice -n xx/com.antfortune.freeline.FreelineService
-e wakeup marker
Starting service: Intent { cmp=xx/com.antfortune.freeline.FreelineService (has extras) }

$ adb forward tcp:41128 tcp:41128
没有值输出

4.$ curl -v 127.0.0.1:41128/checkSync?sync=1&uuid=22

About to connect() to 127.0.0.1 port 41128 (#0)
Trying 127.0.0.1...
Adding handle: conn: 0x2ac2e20
Adding handle: send: 0
Adding handle: recv: 0
Curl_addHandleToPipeline: length: 1
Conn 0 (0x2ac2e20) send_pipe: 1, recv_pipe: 0
Connected to 127.0.0.1 (127.0.0.1) port 41128 (#0)
GET /checkSync?sync=1&uuid=22 HTTP/1.1
User-Agent: curl/7.30.0
Host: 127.0.0.1:41128
Accept: /
Recv failure: Connection was aborted
Closing connection 0
curl: (56) Recv failure: Connection was aborted

@heluotian
Copy link
Author

152链接,没有解决问题;
同时求下微信号,之前看到的微信号,已经过期了,希望可以发个最新的,谢谢

@lomanyong
Copy link
Member

@xingyuetianyu 可以看下android logcat的日志,有可能是代码逻辑挂掉了..

@heluotian
Copy link
Author

android logcat的日志
try to connect device 1 times... 开始时出现以下日志
E/HAL: load: id=gralloc != hmi->id=gralloc
I/Freeline: freeline start initial process...
I/Freeline: freeline init application
I/Freeline: start to inject dex...
I/Freeline: start to inject resources...
I/Freeline: dynamicInfoSp: {}
I/Freeline: resMap: {}
I/Freeline: start to load hackload.dex...
I/Freeline.hackDex: /data/user/0/xx/cache/hack/hackload.dex dex length: 848
I/Freeline.hackDex: /data/user/0/xx/cache/hack/opt opt length: 4096
I/Freeline.hackDex: after opt, dex len:848; opt len:4096
I/Freeline: load hackload,dex size:848
I/Freeline: start to inject native lib...
I/Freeline.hackNative: native lib inject process start...
W/System: ClassLoader referenced unknown path:
I/Freeline.hackNative: inject native lib success [Ldalvik.system.DexPathList$Element;@a6d6207
I/MultiDex: VM with version 2.1.0 has multidex support
I/MultiDex: install
I/MultiDex: VM has multidex support, MultiDex support library is disabled.
I/HwCust: Constructor found for class android.app.HwCustAlarmManagerImpl
I/Freeline.Service: onStartCommand Received start id 1, intent: Intent { cmp=xx/com.antfortune.freeline.FreelineService }
I/System: core_booster, getBoosterConfig = false
I/Process: Sending signal. PID: 8531 SIG: 9
E/HAL: load: id=gralloc != hmi->id=gralloc

@tommyfeng
Copy link

同求,遇到一样的问题,可以全量编译,无法增量编译。要如何解决???

@lomanyong
Copy link
Member

@xingyuetianyu logcat 的日志似乎不对= =,看着是重启了的日志,不是sync的时候crash的日志..

@TChengZ
Copy link

TChengZ commented Apr 23, 2017

遇到相同的问题,现在有解决方案了么?

@HakuLess
Copy link

Log为
:freeline E/Freeline: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.AssetManager android.content.ContextWrapper.getAssets()' on a null object reference
at com.antfortune.freeline.FreelineCore.getApkBuildFlag(FreelineCore.java:155)
at com.antfortune.freeline.router.schema.CheckSyncSchema.handle(CheckSyncSchema.java:28)
at com.antfortune.freeline.router.Router.dispatch(Router.java:48)
at com.antfortune.freeline.server.LongLinkServer.handle(LongLinkServer.java:55)
at com.antfortune.freeline.server.EmbedHttpServer.run(EmbedHttpServer.java:95)
at java.lang.Thread.run(Thread.java:818)

@HakuLess
Copy link

可能是在Application中Freeline.init 删除后产生了些异常,原先有这句,后来看到说可以不用加 我就删了,之后发生这个问题,后来+回来就正常了

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