Poco icon indicating copy to clipboard operation
Poco copied to clipboard

Cocos2dx-lua集成后未能在AirtestIDE上显示控件树

Open Danieltdd opened this issue 6 years ago • 11 comments

描述问题bug

集成poco之后,在AirtestIDE上不现实控件树

复现步骤

1、集成poco到App 2、打开App(显示服务启动成功:[LUA-print] [poco] server listens on tcp://*:15004) 3、AirtestIDE选择cocos-lua刷新控件树:[LUA-print] [poco] new client accepted 127.0.0.1 nil

预期效果 AirtestIDE显示控件树

相关截图 1、通过添加日志:发现能够正确的接手到dump请求: [LUA-print] [poco] onRequest table: 0xc90cd120 Dump table: 0xc90cd3e0 2、在client返回前打印返回信息,结构如下

I/MockLuaCallProxy: [LUA-print] [poco] client send	{
      id = "52158b5b-7240-486b-a484-67f83ddc39fb",
      jsonrpc = "2.0",
      result = {
        children = { {
            children = { {
                children = { {
                    name = "Image_bg1",
                    payload = {
                      anchorPoint = { 0.5, 0.5 },
                      desc = "ImageView",
                      enabled = true,
                      name = "Image_bg1",
                      pos = { 0.5, 0.5 },
                      rotation = 0,
                      scale = { 1.2000000476837, 1 },
                      size = { 0.27351189540805, 1.2173913043478 },
                      skew = { 0, 0 },
                      tag = 6,
                      touchable = false,
                      type = "ImageView",
                      visible = true,
                      zOrders = {
                        global = 0,
                        local = 0
                      }
                    }
                  }, {
                    name = "Image_bg2",
                    payload = {
                      anchorPoint = { 0.5, 0.5 },
                      desc = "ImageView",
                      enabled = true,
                      name = "Image_bg2",
                      pos = { 0.52661269851982, 0.50220001083443 },
                      rotation = 0,
                      scale = { 1, 1 },
                      size = { 0.20422221523801, 0.68215892053973 },
                      skew = { 0, 0 },
                      tag = 7,
                      touchable = false,
                      type = "ImageView",
                      visible = true,
                      zOrders = {
                        global = 0,
                        local = 0
                      }
                    }
                  }, {
                    children = { {
                        children = { {
                            children = { {
                                children = { {
                                    name = "<Node | Tag = -1",
                                    payload = {
                                      anchorPoint = { 0.5, 0.5 },
                                      desc = "<Node | Tag = -1",
                                      name = "<Node | Tag = -1",
                                      pos = { 0.39606547974494, 0.71983875005856 },
                                      rotation = 0,
                                      scale = { 1, 1 },
                                      size = { 0.041573808102024, 0.086206896551724 },
                                      skew = { 0, 0 },
                                      tag = -1,
                                      type = "ProgressTimer",
                                      visible = true,
                                      zOrders = {
                                        global = 0,
                                        local = 0
                                      }
                                    }
                                  } },
                                name = "progressBar",
                                payload = {
                                  anchorPoint = { 0.5, 0.5 },
                                  desc = "<Sprite | Tag = 37, TextureID = 1>",
                                  name = "progressBar",
                                  pos = { 0.39606547974494, 0.71946393746486 },
                                  rotation = 0,
                                  scale = { 1, 1 },
                                  size = { 0.041573808102024, 0.086206896551724 },
                                  skew = { 0, 0 },
                                  tag = 37,
                                  type = "Sprite",
                                  visible = true,
                                  zOrders = {
                                    global = 0,
                                    local = 0
                                  }
                                }
                              }, {
                                name = "fold01",
                                payload = {
                                  anchorPoint = { 0.5, 0.5 },
                                  desc = "<Sprite | Tag = 39, TextureID = 1>",
                                  name = "fold01",
                                  pos = { 0.39606547974494, 0.71946393746486 
```

**设备:**
 - 型号: 三星S8
 - 系统:Android 8.1


**其他相关环境信息**
mac环境下AirtestIDE使用1.0.0RC版本

Danieltdd avatar Sep 11 '18 10:09 Danieltdd

错误信息如下: poco_data: /Applications/AirtestIDE.app/Contents/MacOS/refresh_error_data.json

Traceback (most recent call last):
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/poco_window.py", line 338, in refreshData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 516, in loadData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 93, in __init__
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 219, in setupModelData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 199, in setupModelData
KeyError: 'name'
Refresh error!

Danieltdd avatar Sep 12 '18 10:09 Danieltdd

另外使用独立的PocoHierarchyView1.0.5版本能够正常显示控件树

Danieltdd avatar Sep 12 '18 10:09 Danieltdd

@Danieltdd 你好,我们马上查证问题,会尽快放出修复版本。

rockywhisper avatar Sep 17 '18 02:09 rockywhisper

@Danieltdd 你好,我们马上查证问题,会尽快放出修复版本。

需要协助,请联系

Danieltdd avatar Sep 19 '18 06:09 Danieltdd

@Danieltdd hi, 可以试一下目前官网最新版本看看还是否存在这个问题,如果问题仍然存在,请reopen这个issue,我们再继续查证。

yimelia avatar Sep 30 '18 07:09 yimelia

KeyError: 'type'
Refresh error!
poco_data: /Applications/AirtestIDE.app/Contents/MacOS/refresh_error_data.json
Traceback (most recent call last):
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/poco_window.py", line 338, in refreshData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 516, in loadData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 93, in __init__
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 219, in setupModelData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 201, in setupModelData
KeyError: 'type'
Refresh error!
poco_data: /Applications/AirtestIDE.app/Contents/MacOS/refresh_error_data.json
Traceback (most recent call last):
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/poco_window.py", line 338, in refreshData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 516, in loadData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 93, in __init__
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 219, in setupModelData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 201, in setupModelData
KeyError: 'type'
Refresh error!
poco_data: /Applications/AirtestIDE.app/Contents/MacOS/refresh_error_data.json
Traceback (most recent call last):
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/poco_window.py", line 338, in refreshData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 516, in loadData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 93, in __init__
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 219, in setupModelData
  File "/Users/wjjn3033/dev/idestable/airtest-ide/app/plugins/poco/gui/tree.py", line 201, in setupModelData
KeyError: 'type'
Refresh error!

Danieltdd avatar Sep 30 '18 10:09 Danieltdd

@Danieltdd hi, 可以试一下目前官网最新版本看看还是否存在这个问题,如果问题仍然存在,请reopen这个issue,我们再继续查证。

还是有错,请看日志

Danieltdd avatar Sep 30 '18 10:09 Danieltdd

@Danieltdd 这个报错是节点缺少了"type“属性, 我们再次加了容错,会在今天放出来版本修复。如有问题可再次反馈

zzldjkzxf avatar Oct 09 '18 03:10 zzldjkzxf

我们继承lua SDK后,有个报错,报错信息如下,报错代码跟上面的一样,但是行号不一样。这个代码源码哪里有呢? [11:10:10][DEBUG]<airtest.utils.nbsp> [minicap_server]b'INFO: (jni/minicap/minicap.cpp:489) Server start' [11:10:10][DEBUG]<airtest.utils.nbsp> [minicap_server]b'INFO: (jni/minicap/minicap.cpp:492) New client connection' [11:10:10][DEBUG]<airtest.core.android.minicap> (1, 24, 3851, 2220, 1080, 800, 389, 0, 2) Traceback (most recent call last): File "app\plugins\poco\poco_window.py", line 352, in refreshData File "app\plugins\poco\gui\tree.py", line 519, in loadData File "app\plugins\poco\gui\tree.py", line 477, in checkDiffData File "app\plugins\poco\gui\tree.py", line 471, in calHashWithTree File "app\plugins\poco\gui\tree.py", line 471, in calHashWithTree File "app\plugins\poco\gui\tree.py", line 471, in calHashWithTree [Previous line repeated 9 more times] File "app\plugins\poco\gui\tree.py", line 468, in calHashWithTree File "app\plugins\poco\gui\tree.py", line 461, in calHashWithPos TypeError: type NoneType doesn't define round method Refresh error! poco_data: D:\AirtestIDE_2020-01-21_py3_win64\AirtestIDE_2020-01-21_py3_win64\refresh_error_data.json

liuss01 avatar May 15 '20 03:05 liuss01

原生的lua SDK

liuss01 avatar May 15 '20 03:05 liuss01

我们继承lua SDK后,有个报错,报错信息如下,报错代码跟上面的一样,但是行号不一样。这个代码源码哪里有呢? [11:10:10][DEBUG]<airtest.utils.nbsp> [minicap_server]b'INFO: (jni/minicap/minicap.cpp:489) Server start' [11:10:10][DEBUG]<airtest.utils.nbsp> [minicap_server]b'INFO: (jni/minicap/minicap.cpp:492) New client connection' [11:10:10][DEBUG]<airtest.core.android.minicap> (1, 24, 3851, 2220, 1080, 800, 389, 0, 2) Traceback (most recent call last): File "app\plugins\poco\poco_window.py", line 352, in refreshData File "app\plugins\poco\gui\tree.py", line 519, in loadData File "app\plugins\poco\gui\tree.py", line 477, in checkDiffData File "app\plugins\poco\gui\tree.py", line 471, in calHashWithTree File "app\plugins\poco\gui\tree.py", line 471, in calHashWithTree File "app\plugins\poco\gui\tree.py", line 471, in calHashWithTree [Previous line repeated 9 more times] File "app\plugins\poco\gui\tree.py", line 468, in calHashWithTree File "app\plugins\poco\gui\tree.py", line 461, in calHashWithPos TypeError: type NoneType doesn't define round method Refresh error! poco_data: D:\AirtestIDE_2020-01-21_py3_win64\AirtestIDE_2020-01-21_py3_win64\refresh_error_data.json

请问你这个问题解决了吗?我也遇到了同样的问题

ghosthaha avatar Mar 24 '21 06:03 ghosthaha