Open zilvinas-t opened 2 years ago
@zilvinas-t thank you for the report. Could you maybe check again and have a look at the adb logcat
? I wonder which file or folder cannot be created here given that the path is not visible in the error message. Did you also try to use a different storage option?
Hello, thank you for fast response. I attached a logcat.txt with logs catpured right after the error. Could elaborate more on storage option here? It says that it should not be used with versions later than 0.30.0. And if it should, I don't quite get how should I be doing it. Maybe there's an example?
So there is not really something visible in the adb logcat. Could you maybe check where $EXTERNAL_STORAGE
actually points to for your device? Run this command via adb shell echo $EXTERNAL_STORAGE
.
Also I can see that you run your script through a WebDriver Proxy. Could you try to get rid of this extra layer and communicate with geckodriver directly? Our docs have some details in how run use eg. curl
as client. Maybe there is a problem with that layer.
Regarding the storage option you can use it when you can start geckodriver directly like what I mentioned in the last paragraph. Just use the --android-storage
option and test different values if maybe some other work.
Hello again. I've tried few things that you mentioned. appium:androidStorage
returned 1656316695297 mozdevice INFO Device is unrooted
when trying to launch with app
or internal
. By default the $EXTERNAL_STORAGE
is sdcard
.
Then I tried launching this url http://localhost:4444/session
via Postman
and it opened Firefox browser on my mac instead of opening it on Android emulator.
Capabilities that I put in the request body looked like this:
{
"path": "/wd/hub",
"port": 4723,
"capabilities": {
"platformName": "mac",
"browserName": "firefox",
"appium:automationName": "Gecko",
"appium:deviceName": "Pixel 4 API 30",
"moz:firefoxOptions": {
"androidPackage": "org.mozilla.firefox"
}
}
}
The response looked like this:
{
"value": {
"sessionId": "6bd0ed98-e21b-427d-8b3f-0a1ab934d304",
"capabilities": {
"acceptInsecureCerts": false,
"browserName": "firefox",
"browserVersion": "101.0.1",
"moz:accessibilityChecks": false,
"moz:buildID": "20220608170832",
"moz:geckodriverVersion": "0.31.0",
"moz:headless": false,
"moz:processID": 19933,
"moz:profile": "/var/folders/qq/frdqfwcd23b1jfwsl9r78tlw0000gn/T/rust_mozprofile5wUZki",
"moz:shutdownTimeout": 60000,
"moz:useNonSpecCompliantPointerOrigin": false,
"moz:webdriverClick": true,
"pageLoadStrategy": "normal",
"platformName": "mac",
"platformVersion": "21.5.0",
"proxy": {},
"setWindowRect": true,
"strictFileInteractability": false,
"timeouts": {
"implicit": 0,
"pageLoad": 300000,
"script": 30000
},
"unhandledPromptBehavior": "dismiss and notify"
}
}
}
I also got these logs when the request was executed and browser was opened:
1656326026824 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "--marionette" "-foreground" "-no-remote" "-profile" "/var/folders/qq/frdqfwcd23b1jfwsl9r78tlw0000gn/T/rust_mozprofile5wUZki"
2022-06-27 13:33:47.873 plugin-container[19935:263839] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-06-27 13:33:47.874 plugin-container[19935:263839] nil host used in call to allowsAnyHTTPSCertificateForHost:
1656326027890 Marionette INFO Marionette enabled
2022-06-27 13:33:47.918 plugin-container[19935:263839] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-06-27 13:33:47.918 plugin-container[19935:263839] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-06-27 13:33:47.919 plugin-container[19935:263844] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-06-27 13:33:47.919 plugin-container[19935:263844] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-06-27 13:33:49.092 firefox-bin[19933:263761] Warning: Expected min height of view: (<NSButton: 0x125368c00>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2022-06-27 13:33:49.093 firefox-bin[19933:263761] Warning: Expected min height of view: (<NSButton: 0x1254e5400>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2022-06-27 13:33:49.093 firefox-bin[19933:263761] Warning: Expected min height of view: (<NSButton: 0x1254e0c00>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2022-06-27 13:33:49.094 firefox-bin[19933:263761] Warning: Expected min height of view: (<NSButton: 0x1254e2c00>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2022-06-27 13:33:49.095 firefox-bin[19933:263761] Warning: Expected min height of view: (<NSButton: 0x1254e5800>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2022-06-27 13:33:49.096 firefox-bin[19933:263761] Warning: Expected min height of view: (<NSPopoverTouchBarItemButton: 0x1254e4400>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2022-06-27 13:33:49.097 firefox-bin[19933:263761] Warning: Expected min height of view: (<NSPopoverTouchBarItemButton: 0x11cbc6000>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /var/folders/qq/frdqfwcd23b1jfwsl9r78tlw0000gn/T/rust_mozprofile5wUZki/search.json.mozlz4", (void 0)))
console.error: BackgroundUpdate:
_reasonsToNotScheduleUpdates: Failed to check for Maintenance Service Registry Key: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIUpdateProcessor.getServiceRegKeyExists]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: resource://gre/modules/BackgroundUpdate.jsm :: _reasonsToNotScheduleUpdates :: line 241" data: no]
1656326030832 Marionette INFO Listening on port 63743
Read port: 63743
The things I want to do is to open a sequence of websites on Firefox browser on Android emulator (or real device) and execute an automation script on each of one. I originally use NodeJS
for it. Maybe there's something I'm missing or doing wrong?
Yes, you miss firstMatch
or alwaysMatch
within the capabilities
dict as given by the capability negotiation documentation.
Tried executing the request on these capabilites:
{
"capabilities": {
"alwaysMatch": {
"browserName": "firefox",
"platformName": "mac",
"moz:firefoxOptions": {
"androidPackage": "org.mozilla.firefox"
},
"appium:automationName": "Gecko",
"appium:deviceName": "Pixel 4 API 30"
},
"firstMatch": [{}]
}
}
Got an error response:
{
"value": {
"error": "unknown error",
"message": "adb error: couldn't create file: Permission denied",
"stacktrace": ""
}
}
The geckodriver service prompted a log message: 1656398997577 mozdevice INFO Device is unrooted
Tried adding appium:androidStorage
with internal
, app
and sdcard
values and in all cases the error and the log was the same.
Hello, maybe there's an update regarding the issue? :)
Hello again, any updates? @whimboo
@zilvinas-t sorry for the delay. As it looks like the right platform is selected now and geckodriver interacts with the Android device. Would you mind attaching the adb logcat
and the full trace log of geckodriver?
Hello, thanks for your response.adblogcat.txt is here and talking about stacktrace, it just produces 1657719692270 mozdevice INFO Device is unrooted
every time I execute the request in Postman.
@zilvinas-t I ran into the same issue and the way I solve it is after running adb connect
System
Testcase
Hello. I'm trying to launch an automated test on firefox with these capabilities:
Stacktrace
Getting this error:
Original error: adb error: secure_mkdirs failed: Permission denied
Or sometimes this error occurs as well:Original error: adb error: couldn't create file: Permission denied
Stacktrace:
Trace-level log