landryshuai / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

Test run failed: Instrumentation run failed due to 'Process crashed.' #596

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I have a worklite based android app
2.write testcase with the webelement id or xpath
3.while executing its opening the target application but it's closing beofre 
performing the action with the the following console out put

[2014-04-02 12:54:18 - RealTest] Test run failed: Instrumentation run failed 
due to 'Process crashed.'

What is the expected output? What do you see instead?

It should click on a webelement

What version of the product are you using? On what operating system?

Robotium 5.1

Please provide any additional information below.

solo.waitForActivity("MainActivity", 2000);
        // Sleep for 49933 milliseconds
        solo.sleep(49933);
        // Click on dojox_mobile_ToolBarButton_5
        solo.clickOnWebElement(By.id("dojox_mobile_ToolBarButton_5"));
        // Sleep for 5524 milliseconds
        solo.sleep(5524);
        // Clear text in mblListItemLabel
        solo.clearTextInWebElement(By.className("mblListItemLabel"));
        // Enter text in mblListItemLabel
        solo.enterTextInWebElement(By.className("mblListItemLabel"), "Home");
        // Sleep for 3899 milliseconds
        solo.sleep(3899);
        // Click on inputHolder
        solo.clickOnWebElement(By.className("inputHolder"));

Above is the script but its opening the mainActivity and crashing without 
executing the actions.

Original issue reported on code.google.com by jabershabeek on 2 Apr 2014 at 7:41

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. Can you please paste the log of the crash (adb 
logcat)?

Original comment by renasr...@gmail.com on 3 Apr 2014 at 5:47

GoogleCodeExporter commented 9 years ago
below is the logcat info while executing the script

I/ActivityManager(  354): START {act=android.intent.action.MAIN flg=0x10000000 
cmp=com.Waitrose_Real/.Waitrose_Real} from pid 2673

D/memalloc(  145): /dev/pmem: Allocated buffer base:0x42775000 size:2949120 
offset:11399168 fd:38

D/memalloc(  354): /dev/pmem: Mapped buffer base:0x6327b000 size:14348288 
offset:11399168 fd:336

I/Adreno200-EGLSUB(  145): <CreateImage:893>: Android Image

I/Adreno200-EGLSUB(  145): <GetImageAttributes:1102>: RGBA_8888

D/OpenGLRenderer(  826): Flushing caches (mode 1)

D/OpenGLRenderer(  826): Flushing caches (mode 0)

D/memalloc(  826): /dev/pmem: Unmapping buffer base:0x5cb44000 size:37400576 
offset:33632256

D/memalloc(  826): /dev/pmem: Unmapping buffer base:0x5f0fd000 size:41168896 
offset:37400576

D/memalloc(  826): /dev/pmem: Unmapping buffer base:0x61e82000 size:3768320 
offset:0

D/memalloc(  145): /dev/pmem: Freeing buffer base:0x44b20000 size:3768320 
offset:37400576 fd:72

D/memalloc(  145): /dev/pmem: Freeing buffer base:0x42775000 size:3768320 
offset:0 fd:32

I/CordovaLog( 2673): Changing log level to DEBUG(3)

I/CordovaLog( 2673): Found preference for exit-on-suspend=false

D/CordovaLog( 2673): Found preference for exit-on-suspend=false

D/JsMessageQueue( 2673): Set native->JS mode to 2

D/DroidGap( 2673): DroidGap.init()

D/memalloc(  145): /dev/pmem: Freeing buffer base:0x44788000 size:3768320 
offset:33632256 fd:69

D/DroidGap( 2673): This will be deprecated December 2012

D/DroidGap( 2673): Resuming the App

D/SoftKeyboardDetect( 2673): Ignore this event

V/PhoneStatusBar(  535): setLightsOn(true)

W/webcore ( 2673): java.lang.Throwable: EventHub.removeMessages(int what = 107) 
is not supported before the WebViewCore is set up.

W/webcore ( 2673):  at 
android.webkit.WebViewCore$EventHub.removeMessages(WebViewCore.java:1691)

W/webcore ( 2673):  at 
android.webkit.WebViewCore$EventHub.access$7900(WebViewCore.java:926)

W/webcore ( 2673):  at 
android.webkit.WebViewCore.removeMessages(WebViewCore.java:1803)

W/webcore ( 2673):  at 
android.webkit.WebView.sendOurVisibleRect(WebView.java:2924)

W/webcore ( 2673):  at 
android.webkit.ZoomManager.setZoomScale(ZoomManager.java:593)

W/webcore ( 2673):  at 
android.webkit.ZoomManager.access$1700(ZoomManager.java:49)

W/webcore ( 2673):  at 
android.webkit.ZoomManager$PostScale.run(ZoomManager.java:984)

W/webcore ( 2673):  at android.os.Handler.handleCallback(Handler.java:605)

W/webcore ( 2673):  at android.os.Handler.dispatchMessage(Handler.java:92)

W/webcore ( 2673):  at android.os.Looper.loop(Looper.java:137)

W/webcore ( 2673):  at android.app.ActivityThread.main(ActivityThread.java:4441)

W/webcore ( 2673):  at java.lang.reflect.Method.invokeNative(Native Method)

W/webcore ( 2673):  at java.lang.reflect.Method.invoke(Method.java:511)

W/webcore ( 2673):  at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)

W/webcore ( 2673):  at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)

W/webcore ( 2673):  at dalvik.system.NativeStart.main(Native Method)

D/SoftKeyboardDetect( 2673): Ignore this event

D/memalloc(  145): /dev/pmem: Allocated buffer base:0x42775000 size:2949120 
offset:22609920 fd:34

D/memalloc( 2673): /dev/pmem: Mapped buffer base:0x5cf8a000 size:25559040 
offset:22609920 fd:82

D/com.worklight.androidgap.WLDroidGap( 2673): 
WLDroidGap$PrepackagedAssetsManager.copyPrepackagedAssetsToLocalCopyIfNeeded in 
WLDroidGap.java:432 :: New installation/upgrade detected, copying resources and 
saving new checksum

I/Adreno200-EGLSUB(  145): <CreateImage:893>: Android Image

I/Adreno200-EGLSUB(  145): <GetImageAttributes:1102>: RGBA_8888

I/ActivityManager(  354): Displayed com.Waitrose_Real/.Waitrose_Real: +375ms 
(total +1m33s416ms)

D/dalvikvm( 2673): GC_CONCURRENT freed 759K, 6% free 13692K/14563K, paused 
3ms+2ms

D/memalloc(  354): /dev/pmem: Unmapping buffer base:0x6327b000 size:14348288 
offset:11399168

D/memalloc(  145): /dev/pmem: Freeing buffer base:0x43254000 size:2949120 
offset:11399168 fd:38

W/NFC-LLC (  773): LLC length mis-match

D/com.worklight.androidgap.WLDroidGap( 2673): WLDroidGap.doPrepareAssetsWork in 
WLDroidGap.java:672 :: no need to check web resource integrity

D/CordovaWebView( 2673): >>> loadUrl(file:///android_asset/www/skinLoader.html)

D/PluginManager( 2673): init()

D/CordovaWebView( 2673): >>> loadUrlNow()

D/DroidGap( 2673): 
onMessage(onPageStarted,file:///android_asset/www/skinLoader.html)

V/chromium( 2673): 
external/chromium/net/host_resolver_helper/host_resolver_helper.cc:66: 
[0403/121831:INFO:host_resolver_helper.cc(66)] DNSPreResolver::Init got 
hostprovider:0x5cdaa220

V/chromium( 2673): external/chromium/net/base/host_resolver_impl.cc:1515: 
[0403/121831:INFO:host_resolver_impl.cc(1515)] HostResolverImpl::SetPreresolver 
preresolver:0x019fb4e0

D/        ( 2673): external/chromium/net/socket/tcp_fin_aggregation_factory.cc: 
libtcpfinaggr.so successfully loaded

D/        ( 2673): 
external/chromium/net/socket/tcp_fin_aggregation_factory.cc,: TCP Fin 
Aggregation initializing method was found in libtcpfinaggr.so

D/TCPFinAggregation( 2673): system property net.tcp.fin.aggregation was set

D/TCPFinAggregation( 2673): system property net.tcp.fin.aggregation.wait was 
set, value: 20

D/TCPFinAggregation( 2673): system property net.tcp.fin.aggregation.close was 
set, value: 300

D/TCPFinAggregation( 2673): Failed to get network status! received ret: -2

V/WebRequest( 2673): WebRequest::WebRequest, setPriority = 1

D/chromium( 2673): Unknown chromium error: -6

D/Cordova ( 2673): onPageFinished(file:///android_asset/www/skinLoader.html)

D/DroidGap( 2673): onMessage(onNativeReady,null)

D/DroidGap( 2673): 
onMessage(onPageFinished,file:///android_asset/www/skinLoader.html)

I/SqliteDatabaseCpp( 2673): sqlite returned: error code = 14, msg = cannot open 
file at line 27703 of [8609a15dfa], 
db=/data/data/com.Waitrose_Real/databases/webview.db

I/SqliteDatabaseCpp( 2673): sqlite returned: error code = 14, msg = os_unix.c: 
open() at line 27703 - "" errno=2 path=/CachedGeoposition.db, 
db=/data/data/com.Waitrose_Real/databases/webview.db

D/CordovaNetworkManager( 2673): Connection Type: wifi

D/DroidGap( 2673): onMessage(networkconnection,wifi)

D/CordovaNetworkManager( 2673): Connection Type: wifi

D/DroidGap( 2673): onMessage(spinner,stop)

D/memalloc(  145): /dev/pmem: Allocated buffer base:0x42775000 size:2949120 
offset:11399168 fd:37

D/memalloc( 2673): /dev/pmem: Mapped buffer base:0x5fd6c000 size:14348288 
offset:11399168 fd:96

I/Adreno200-EGLSUB(  145): <CreateImage:893>: Android Image

I/Adreno200-EGLSUB(  145): <GetImageAttributes:1102>: RGBA_8888

W/WLDroidGap( 2673): "default" skin will be used, because skin named default 
was not found. Add a skin or change android/js/skinLoader.js to return existing 
skin.

D/CordovaWebView( 2673): >>> 
loadUrl(file:///android_asset/www/default/Waitrose_Real.html)

D/CordovaWebView( 2673): >>> loadUrlNow()

D/DroidGap( 2673): 
onMessage(onPageStarted,file:///android_asset/www/default/Waitrose_Real.html)

V/chromium( 2673): 
external/chromium/net/disk_cache/hostres_plugin_bridge.cc:52: 
[0403/121832:INFO:hostres_plugin_bridge.cc(52)] StatHubCreateHostResPlugin 
initializing...

V/chromium( 2673): 
external/chromium/net/disk_cache/hostres_plugin_bridge.cc:57: 
[0403/121832:INFO:hostres_plugin_bridge.cc(57)] StatHubCreateHostResPlugin lib 
loaded

V/chromium( 2673): 
external/chromium/net/disk_cache/hostres_plugin_bridge.cc:63: 
[0403/121832:INFO:hostres_plugin_bridge.cc(63)] StatHubCreateHostResPlugin 
plugin connected

V/chromium( 2673): external/chromium/net/http/http_cache.cc:1170: 
[0403/121832:INFO:http_cache.cc(1170)] HttpCache::OnBackendCreated HostStat 
created

V/chromium( 2673): external/chromium/net/disk_cache/stat_hub.cc:161: 
[0403/121832:INFO:stat_hub.cc(161)] StatHub::Init - Disabled

V/chromium( 2673): external/chromium/net/disk_cache/stat_hub.cc:161: 
[0403/121832:INFO:stat_hub.cc(161)] StatHub::Init - Disabled

D/memalloc(  145): /dev/pmem: Allocated buffer base:0x42775000 size:2949120 
offset:25559040 fd:40

D/memalloc( 2673): /dev/pmem: Mapped buffer base:0x60b1b000 size:28508160 
offset:25559040 fd:105

I/Adreno200-EGLSUB(  145): <CreateImage:893>: Android Image

I/Adreno200-EGLSUB(  145): <GetImageAttributes:1102>: RGBA_8888

D/dalvikvm( 2673): GC_CONCURRENT freed 559K, 5% free 14984K/15651K, paused 
3ms+6ms

W/NFC-LLC (  773): LLC length mis-match

D/Cordova ( 2673): 
onPageFinished(file:///android_asset/www/default/Waitrose_Real.html)

D/DroidGap( 2673): onMessage(onNativeReady,null)

D/DroidGap( 2673): 
onMessage(onPageFinished,file:///android_asset/www/default/Waitrose_Real.html)

D/fast-dormancy(  154): [FDM]: ps_attach_state=2

D/fast-dormancy(  154): [FDM]: Modem Status Mutex Locked.

D/fast-dormancy(  154): [FDM]: Modem Status Mutex Unlocked.

D/fast-dormancy(  154): [FDM]: reg_state=2 param_mask=6

D/fast-dormancy(  154): [FDM]: Modem Status Mutex Locked.

D/fast-dormancy(  154): [FDM]: Modem Status Mutex Unlocked.

D/fast-dormancy(  154): [FDM]: reg_state=2 param_mask=6

D/fast-dormancy(  154): [FDM]: mcc=404 mnc=84

D/fast-dormancy(  154): [FDM]: Modem Status Mutex Locked.

D/fast-dormancy(  154): [FDM]: Modem Status Mutex Unlocked.

D/CordovaNetworkManager( 2673): Connection Type: wifi

D/CordovaNetworkManager( 2673): Connection Type: wifi

D/DroidGap( 2673): onMessage(networkconnection,wifi)

D/DroidGap( 2673): onMessage(spinner,stop)

D/DroidGap( 2673): onMessage(spinner,stop)

D/TextLayoutCache( 2673): Using debug level: 0 - Debug Enabled: 0

D/memalloc(  145): /dev/pmem: Allocated buffer base:0x42775000 size:327680 
offset:14348288 fd:46

D/memalloc( 2673): /dev/pmem: Mapped buffer base:0x6264b000 size:14675968 
offset:14348288 fd:111

I/Adreno200-EGLSUB(  145): <CreateImage:893>: Android Image

I/Adreno200-EGLSUB(  145): <GetImageAttributes:1102>: RGBA_8888

D/memalloc(  145): /dev/pmem: Allocated buffer base:0x42775000 size:327680 
offset:14675968 fd:32

D/memalloc( 2673): /dev/pmem: Mapped buffer base:0x6344a000 size:15003648 
offset:14675968 fd:117

I/Adreno200-EGLSUB(  145): <CreateImage:893>: Android Image

I/Adreno200-EGLSUB(  145): <GetImageAttributes:1102>: RGBA_8888

D/memalloc(  145): /dev/pmem: Allocated buffer base:0x42775000 size:327680 
offset:28508160 fd:62

D/memalloc( 2673): /dev/pmem: Mapped buffer base:0x64299000 size:28835840 
offset:28508160 fd:120

I/Adreno200-EGLSUB(  145): <CreateImage:893>: Android Image

I/Adreno200-EGLSUB(  145): <GetImageAttributes:1102>: RGBA_8888

In eclipse console i am getting the following out put:

[2014-04-03 12:18:25 - Sample_RealTest] ------------------------------
[2014-04-03 12:18:25 - Sample_RealTest] Android Launch!
[2014-04-03 12:18:25 - Sample_RealTest] adb is running normally.
[2014-04-03 12:18:25 - Sample_RealTest] Performing 
android.test.InstrumentationTestRunner JUnit launch
[2014-04-03 12:18:26 - Sample_RealTest] Automatic Target Mode: using device 
'CB5A1KVE75'
[2014-04-03 12:18:26 - Sample_RealTest] Application already deployed. No need 
to reinstall.
[2014-04-03 12:18:26 - Sample_RealTest] Launching instrumentation 
android.test.InstrumentationTestRunner on CB5A1KVE75
[2014-04-03 12:18:27 - Sample_RealTest] Sending test information to Eclipse
[2014-04-03 12:19:37 - Sample_RealTest] Test run failed: Instrumentation run 
failed due to 'Process crashed.'
[2014-04-03 12:19:37 - Sample_RealTest] Test run finished

And the eclipse JUnit Failure Trace is:

Test failed to run to completion. Reason: 'Instrumentation run failed due to 
'Process crashed.''. Check device logcat for details

Original comment by jabershabeek on 3 Apr 2014 at 7:01

GoogleCodeExporter commented 9 years ago
This seems to be an application issue. Nothing in Robotium code triggeres this:

android.webkit.WebViewCore$EventHub.removeMessages(WebViewCore.java:1691)

Original comment by renasr...@gmail.com on 3 Apr 2014 at 11:54

GoogleCodeExporter commented 9 years ago
I don't think it's an application issue, Because when we open it manually it 
working as expected, but when we opening through instrumentation only it's 
crashing,

and one more think is if i use solo.getCurrentViews() it's getting all views 
but it's crashing if i perform any web element related actions.

Original comment by jabershabeek on 3 Apr 2014 at 12:13

GoogleCodeExporter commented 9 years ago
No Robotium class is present in the stack trace. What you could try is to use 
Robotium with Config.useJavascriptToClickWebElements.

http://robotium.googlecode.com/svn/doc/index.html

Original comment by renasr...@gmail.com on 3 Apr 2014 at 12:18

GoogleCodeExporter commented 9 years ago
Tried it but still the same is happening,

But it's executing all the lines but clicking or any other action is not 
performed on the target application, one thing i noted is each line of the 
script is getting executed but actions are not performed on the target 
application.

Original comment by jabershabeek on 3 Apr 2014 at 12:53

GoogleCodeExporter commented 9 years ago
Have you done this?

Why do text and button clicks get wrong?

If this problem happens on one of the supported versions then try to add
this tag to the test project's AndroidManifest.xml

<uses-sdk android:targetSdkVersion="YOUR_VERSION" />

Where YOUR_VERSION is 6 for Android 2.0, 7 for Android 2.1 and 8 for
Android 2.2.

If that does not solve the problem then try to add this tag to the
AndroidManifest.xml of the application you want to test:

<supports-screens android:anyDensity="true"/>

Original comment by renasr...@gmail.com on 3 Apr 2014 at 12:55

GoogleCodeExporter commented 9 years ago
Tried this also no success. Repeating the same crash.

Original comment by jabershabeek on 4 Apr 2014 at 7:13

GoogleCodeExporter commented 9 years ago
i have this crash too.  Also, this crash can be one time. 

Original comment by leonid.veremchuk on 29 Apr 2014 at 12:13