Hi,
I’m using the method getAppStringMap() on my tests to assert that a specific localised text is showing as expected. It works fine when testing locally on the Android Emulator, but when I try to run the same test on browserstack I get the error:
"Appium error: An unknown server-side error occurred while processing the command. Original error: strings.json doesn't exist"
This happens even if I specify the path to the strings file, like this:
driver.getAppStringMap("pt", "/res/values/strings.xml")
Can someone please help me to make this method work on browserstack?
Reference: http://appium.io/docs/en/commands/device/app/get-app-strings/
Logs:
[debug] [AndroidDriver] Extracting strings from apk null null /tmp/com.yyy.zzz.pre
[debug] [ADB] Extracting strings for language: default
[debug] [ADB] Device API level: 26
[debug] [ADB] Getting connected devices…
[debug] [ADB] 6 device(s) connected
[debug] [ADB] Running ‘/usr/local/.browserstack/android-sdk/platform-tools/adb’ with args: [“-P”,5037,“-s”,“yyy”,“shell”,“getprop”,“persist.sys.locale”]
[debug] [ADB] Current device property ‘persist.sys.locale’: pt-PT
[debug] [ADB] No strings.xml for language ‘pt’, getting default strings.xml
[debug] [ADB] Getting connected devices…
[debug] [ADB] 6 device(s) connected
[debug] [ADB] Running ‘/usr/local/.browserstack/android-sdk/platform-tools/adb’ with args: [“-P”,5037,“-s”,“yyy”,“shell”,“rm”,“-rf”,“/data/local/tmp/strings.json”](…)
[debug] [JSONWP Proxy] Proxying [POST /wd/hub/session/yyy/appium/app/strings] to [POST http://localhost:8201/wd/hub/session/yyy/appium/app/strings] with body: {“language”:“pt”}
[MJSONWP] Encountered internal error running command: {“jsonwp”:{“sessionId”:“yyy”,“status”:13,“value”:“strings.json doesn’t exist”}} ProxyRequestError: Could not proxy command to remote server. Original error: 500 - {“sessionId”:“yyy”,“status”:13,“value”:“strings.json doesn’t exist”}
at JWProxy.proxy$ (…/…/…/lib/jsonwp-proxy/proxy.js:153:13)
at tryCatch (/usr/local/.browserstack/appium_1.6.5_bstack/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/.browserstack/appium_1.6.5_bstack/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/.browserstack/appium_1.6.5_bstack/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/.browserstack/appium_1.6.5_bstack/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/usr/local/.browserstack/appium_1.6.5_bstack/node_modules/core-js/library/modules/es6.promise.js:108:47)
at /usr/local/.browserstack/appium_1.6.5_bstack/node_modules/core-js/library/modules/es6.promise.js:119:28
at flush (/usr/local/.browserstack/appium_1.6.5_bstack/node_modules/core-js/library/modules/$.microtask.js:19:5)
at nextTickCallbackWith0Args (node.js:453:9)
at process._tickCallback (node.js:382:13)
[HTTP] ← POST /wd/hub/session/yyy/appium/app/strings 500 39 ms - 197