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

进行截图时异常 #4

Open
DHpie opened this issue Apr 14, 2022 · 0 comments
Open

进行截图时异常 #4

DHpie opened this issue Apr 14, 2022 · 0 comments

Comments

@DHpie
Copy link

DHpie commented Apr 14, 2022

描述问题bug:
我使用 b64img, fmt = poco.snapshot(width=screen_size[1])进行截图时, 出现 hrpc.exceptions.RpcRemoteException 异常, 异常信息如下:

File "/usr/local/python3/lib/python3.7/site-packages/flybirds/core/plugin/plugins/default/screen.py", line 31, in screen_shot
   b64img, fmt = poco.snapshot(width=screen_size[1])
 File "/usr/local/python3/lib/python3.7/site-packages/poco/pocofw.py", line 433, in snapshot
   return self.agent.screen.getScreen(width)
 File "/usr/local/python3/lib/python3.7/site-packages/poco/drivers/android/uiautomation.py", line 75, in getScreen
   b64img = self.screen.getScreen(width)
 File "/usr/local/python3/lib/python3.7/site-packages/hrpc-1.0.9-py3.7.egg/hrpc/object_proxy.py", line 92, in __call__
   return self._client__.evaluate(self.__call_no_evaluate__(remote_obj_cache, *args))
 File "/usr/local/python3/lib/python3.7/site-packages/hrpc-1.0.9-py3.7.egg/hrpc/client.py", line 81, in evaluate
   raise RpcRemoteException(resp)
hrpc.exceptions.RpcRemoteException: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getHeight()' on a null object reference

|--   Remote Traceback   --|

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getHeight()' on a null object reference
   at com.netease.open.pocoservice.Screen.getScreen(Screen.java:40)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.netease.open.hrpc.backend.RpcServer.onRequest(RpcServer.java:171)
   at com.netease.open.hrpc.backend.RpcServer.serve(RpcServer.java:57)
   at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:840)
   at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:189)
   at java.lang.Thread.run(Thread.java:920)


|--   Remote Traceback end   --|

python 版本: python3.7

pocoui版本: 1.0.85

hrpc 版本: 1.0.9

设备:

  • 型号: [谷歌原生模拟器]
  • 系统: [ANDROID26(8.0)]
@DHpie DHpie changed the title pocoservice 进行截图时失败 进行截图时异常 Apr 14, 2022
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

1 participant