Closed LoveSoni closed 8 months ago
The test script is not shipped as part of 1.0.0-beta.1
. We will publish a new release tomorrow and it should work fine Meanwhile you can start running the test and the mocking should work as expected.
oh ok, i was trying to run my test with the following desired capabilities
capabilities.setCapability("appium:platformName", "android"); capabilities.setCapability("appium:app","/.//test_app_mitm_proxy.apk"); capabilities.setCapability("appium:forceAppLaunch", true); capabilities.setCapability("appium:automationName","uiautomator2"); capabilities.setCapability("appium:intercept", true);
but getting following error on appium server Encountered internal error running command: Error: ENOENT: no such file or directory, lstat '/Users/{username}/node_modules/appium-interceptor/certificate'
@LoveSoni I have published latest version beta.4
Can you try with that version and let us know.
@LoveSoni Please share full server logs.
The command name should be interceptor: addMock
. There is whitespace after interceptor:
keyword.
Thanks @sudharsan-selvaraj, but now when i'm running the script, getting following certificate error on appium server And then the internet stopped working on android device
}
HTTPS_CLIENT_ERROR
[Error: 800B8E5DF87F0000:error:0A000416:SSL routines:ssl3_read_bytes:ssl/tls alert certificate unknown:ssl/record/rec_layer_s3.c:861:SSL alert number 46
] {
library: 'SSL routines',
reason: 'ssl/tls alert certificate unknown',
code: 'ERR_SSL_SSL/TLS_ALERT_CERTIFICATE_UNKNOWN'
}
I could be a certificate issue. Trying uninstalling the previous certificate and follow the steps from https://github.com/AppiumTestDistribution/appium-interceptor-plugin/blob/master/docs/certificate-installation.md and give another try.
Thanks @sudharsan-selvaraj, it is working now
Prerequisites: Appium Version: 2.4.1 Npm Version: 10.2.4 Apple Macbook Intel(i9) Steps to Reproduce a) Install appium inspector plugin
appium plugin install --source=npm appium-interceptor
b) Now download ca certificate from here and install it on device
Note: Make sure certificate is trusted c) Now test the connection with following command
appium plugin run appium-interceptor test-connection
d) Observe that test connection script is getting failed