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

fix: calls this.opts for createBaseADB #908

Merged
merged 4 commits into from
Jan 26, 2024
Merged

fix: calls this.opts for createBaseADB #908

merged 4 commits into from
Jan 26, 2024

Conversation

KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented Jan 26, 2024

As

const adb = await createBaseADB(this.opts);
?

appium/appium#19713

Actually, when I saw logs in the ruby_lib_core's test Appium log, it had:

2024-01-25 09:30:47:019 - [ADB] Running '/Users/runner/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
2024-01-25 09:30:47:041 - [ADB] Setting device id to 
2024-01-25 09:30:47:042 - [ADB] Running '/Users/runner/Library/Android/sdk/platform-tools/adb -P 5037 -s  shell getprop ro.build.version.sdk'
2024-01-25 09:30:47:194 - [ADB] Current device property 'ro.build.version.sdk': 29
2024-01-25 09:30:47:195 - [ADB] Getting device platform version
2024-01-25 09:30:47:195 - [ADB] Running '/Users/runner/Library/Android/sdk/platform-tools/adb -P 5037 -s  shell getprop ro.build.version.release'
2024-01-25 09:30:47:337 - [ADB] Current device property 'ro.build.version.release': 10
2024-01-25 09:30:47:337 - [ADB] Device API level: 29

but tests worked.

Testing in appium/ruby_lib_core#520


hm, I used GitHub Codespase, then auto linter was applied...

// @ts-expect-error do not put arbitrary properties on opts
const {udid, emPort} = opts ?? {};
const adb = await createBaseADB(opts);
const {udid, emPort} = this.opts ?? {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.opts are always defined so the ?? part does not do anything

@@ -130,10 +130,10 @@ export async function getDeviceInfoFromCaps() {
* @property {(AndroidDriverOpts & {emPort?: number})?} [opts=null]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs need to be updated

@KazuCocoa
Copy link
Member Author

with this fix:

2024-01-26 07:57:51:128 - [ADB] Using 'adb' from '/Users/runner/Library/Android/sdk/platform-tools/adb'
2024-01-26 07:57:51:128 - [ADB] Running '/Users/runner/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
2024-01-26 07:57:51:152 - [ADB] Setting device id to emulator-5554
2024-01-26 07:57:51:152 - [ADB] Running '/Users/runner/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
2024-01-26 07:57:51:379 - [ADB] Current device property 'ro.build.version.sdk': 29
2024-01-26 07:57:51:380 - [ADB] Getting device platform version
2024-01-26 07:57:51:380 - [ADB] Running '/Users/runner/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
2024-01-26 07:57:51:542 - [ADB] Current device property 'ro.build.version.release': 10
2024-01-26 07:57:51:542 - [ADB] Device API level: 29
2024-01-26 07:57:51:543 - [AndroidUiautomator2Driver@8238 (89bf6a5e)] Relaxing hidden api policy
2024-01-26 07:57:51:543 - [ADB] Running '/Users/runner/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''

@KazuCocoa KazuCocoa merged commit 8ed666a into master Jan 26, 2024
10 checks passed
@KazuCocoa KazuCocoa deleted the fix-createbaseadb branch January 26, 2024 08:16
github-actions bot pushed a commit that referenced this pull request Jan 26, 2024
## [8.1.6](v8.1.5...v8.1.6) (2024-01-26)

### Bug Fixes

* calls this.opts for createBaseADB ([#908](#908)) ([8ed666a](8ed666a))
Copy link

🎉 This PR is included in version 8.1.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants