Help using 'arc' for real android device - Error using PAGE command

I have connected appium ruby console to a real device. The command ‘page_class’ command is working fine.

[1] pry(main)> page_class
get /source
9x android.widget.FrameLayout
4x android.widget.LinearLayout
4x android.view.View
3x android.widget.RelativeLayout
3x android.widget.ImageView
1x android.widget.TextView
1x android.widget.ListView
1x android.widget.ViewSwitcher
1x android.webkit.WebView
1x hierarchy

Executing ‘page’ command on specific class name the following error is generated

[2] pry(main)> page 'android.widget.TextView'
get /source
post /appium/app/strings
Selenium::WebDriver::Error::UnknownError: Unable to load json file and update strings.
from /Users/gsypolt/.rvm/gems/ruby-2.1.3/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/response.rb:52:in `assert_ok'

I would appreciate insight why this error is generated. I am new to android development and could be build issue.

Thanks,
Greg

That is very strange. Could you also post the appium server logs?

The APK file located in the same directory where I am executing the ‘arc’ command. Any insight would be great.

info: ← GET /wd/hub/session/9bf86a65-f9ac-44e9-997a-743ef42d5809/source 200 355.853 ms - 40729 {“status”:0,“value”:“<?xml version=\"1.0\" encoding=\"UTF-8\"?><hierarchy rotation="1"><android.widget.FrameLayout index="0" text="" resource-id="" class="android.widget.FrameLayout" package="com.company.local.library.news.apptoday" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1920,1104]" instance="0"><android.view.View index="0" text="" resource-id="android:id/action_bar_overlay_layout" class="android.view.View" package="com.company.local.library.news.apptoday" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1920,1104]" instance="0"><android.widget.FrameLayout index="0" text="" resource-id="android:id/action_bar_container" class="android.widget.FrameLayout" package="com.gannett.local.li…”,“sessionId”:“9bf86a65-f9ac-44e9-997a-743ef42d5809”}
info: → POST /wd/hub/session/9bf86a65-f9ac-44e9-997a-743ef42d5809/appium/app/strings {}
info: [debug] Apk doesn’t exist locally
info: [debug] executing: “/Users/gsypolt/android-sdk/sdk/platform-tools/adb” -s 05b35744 shell “rm -rf /data/local/tmp/strings.json”
info: [debug] Pushing command to appium work queue: [“updateStrings”,{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“updateStrings”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: updateStrings
info: [debug] [BOOTSTRAP] [debug] Loading json…
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“Unable to load json file and update strings.”,“status”:13}
info: [debug] Responding to client with error: {“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command.”,“origValue”:“Unable to load json file and update strings.”},“sessionId”:“9bf86a65-f9ac-44e9-997a-743ef42d5809”}

Unfortunately I’d need the apk to reproduce & fix the problem. The appium server is failing to parse the strings.xml file for some reason on that apk.

Thanks, @bootstraponline! I could send you the APK via email since unable to upload this file extension here.

Ok, my email is listed on github:

Hey Greg, bootstrap:
Turned out I was getting the same error.
For arc, I realized the “app” parameter was necessary in appium.txt
Not sure if this helps

Full appium.txt below.

[caps]
platformName = "Android"
platformVersion = "4.4"
deviceName = "Galaxy S4"
appPackage = "com.blackboard.android.bbstudent"
appActivity = "com.blackboard.android.learn.launch.activity.LaunchActivity"
app = "apps/android-learn-debug.apk"

I resolved the arc issue and believe it was resolved when I rebuilt the apk.

Hey guys, sorry for bumping the thread - is rebuilding the app the only solution? I’m writing cases for an app that’s preinstalled on my device…

Simon,
You shouldn’t have to rebuild the app.
Just make sure your caps follow the same format as I wrote before.
What error do you get?

I fixed the page command problem in v5.

If you don’t want to update, the fix is only one line. Should be easy to apply locally.

Sweet thanks!
The changes make sense.
I’ll try this later on.
Thanks again!