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

device.app_start()函数以及device.app_info()函数在某些应用上会出错 #935

Open
Raven4-621 opened this issue Jan 19, 2024 · 2 comments

Comments

@Raven4-621
Copy link

Raven4-621 commented Jan 19, 2024

  • 手机型号: 荣耀20pro、realme大师探索版等多台realme手机
  • uiautomator2的版本号: 2.16.25
  • Android Debug Bridge version 1.0.41

执行代码: d.app_start('com.zhihu.android')

BaseError Traceback (most recent call last)
Cell In[6], line 1
----> 1 d.app_start('com.zhihu.android')

File E:\Pycharm\Python312\Lib\site-packages\uiautomator2_init_.py:1434, in _AppMixIn.app_start(self, package_name, activity, wait, stop, use_monkey)
1431 return
1433 if not activity:
-> 1434 info = self.app_info(package_name)
1435 activity = info['mainActivity']
1436 if activity.find(".") == -1:

File E:\Pycharm\Python312\Lib\site-packages\uiautomator2_init_.py:1578, in _AppMixIn.app_info(self, package_name)
1576 resp = resp.json()
1577 if not resp.get('success'):
-> 1578 raise BaseError(resp.get('description', 'unknown'))
1579 return resp.get('data')

BaseError: stat /data/app/com.zhihu.android-lE57VtKtaSmJY68K23g31Q==/base.apk
package:/data/app/com.zhihu.android-lE57VtKtaSmJY68K23g31Q==/split_billboard.apk: no such file or directory

执行代码: d.app_info('com.zhihu.android')

BaseError Traceback (most recent call last)
Cell In[7], line 1
----> 1 d.app_info('com.zhihu.android')
File E:\Pycharm\Python312\Lib\site-packages\uiautomator2_init_.py:1578, in _AppMixIn.app_info(self, package_name)
1576 resp = resp.json()
1577 if not resp.get('success'):
-> 1578 raise BaseError(resp.get('description', 'unknown'))
1579 return resp.get('data')

BaseError: stat /data/app/com.zhihu.android-lE57VtKtaSmJY68K23g31Q==/base.apk
package:/data/app/com.zhihu.android-lE57VtKtaSmJY68K23g31Q==/split_billboard.apk: no such file or directory

@Raven4-621
Copy link
Author

这个问题目前普遍出现

@codeskyblue
Copy link
Member

codeskyblue commented May 2, 2024

已修复,但是这个app_info返回的内容越来越少了,我后续再补充吧

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

2 participants