Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The app does not start #278

Closed
choppergrip opened this issue Jul 4, 2013 · 6 comments
Closed

The app does not start #278

choppergrip opened this issue Jul 4, 2013 · 6 comments

Comments

@choppergrip
Copy link

  1. I start calabash-android console
  2. Enter:
    ENV["ADB_DEVICE_ARG"] = "4df1b1021e2b6f4f"
    path1 = File.expand_path("rotate.apk")
    @@App1 = Calabash::Android::Operations::Device.new(
    self, ENV["ADB_DEVICE_ARG"], "45678", path1, test_server_path(path1), 7102)
  3. @@App1.start_test_server_in_background

Actual result:
nil But the app does not start

Expected result:
I did the same with other applications and it works

You can find application and server here:
https://www.dropbox.com/sh/fngqd4itf18fa38/P-3dCc5sYM

@jonasmaturana
Copy link
Contributor

What do you see in logcat?
On Jul 4, 2013 4:38 PM, "alkor133" [email protected] wrote:

  1. I start calabash-android console
  2. Enter: ENV["ADB_DEVICE_ARG"] = "4df1b1021e2b6f4f" path1 =
    File.expand_path("rotate.apk") @@App1 https://github.com/app1 =
    Calabash::Android::Operations::Device.new( self, ENV["ADB_DEVICE_ARG"],
    "45678", path1, test_server_path(path1), 7102)
  3. @@App1 https://github.com/app1.start_test_server_in_background

Actual result:
nil But the app does not start

Expected result:
I did the same with other applications and it works

You can find application and server here:
https://www.dropbox.com/sh/fngqd4itf18fa38/P-3dCc5sYM


Reply to this email directly or view it on GitHubhttps://github.com//issues/278
.

@choppergrip
Copy link
Author

07-05 12:44:55.660: D/AndroidRuntime(408): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
07-05 12:44:55.660: D/AndroidRuntime(408): CheckJNI is OFF
07-05 12:44:55.660: D/AndroidRuntime(408): setted country_code = Poland
07-05 12:44:55.660: D/AndroidRuntime(408): setted countryiso_code = PL
07-05 12:44:55.660: D/AndroidRuntime(408): setted sales_code = TPL
07-05 12:44:55.660: D/AndroidRuntime(408): readGMSProperty: start
07-05 12:44:55.660: D/AndroidRuntime(408): readGMSProperty: already setted!!
07-05 12:44:55.665: D/AndroidRuntime(408): readGMSProperty: end
07-05 12:44:55.670: D/dalvikvm(408): Trying to load lib libjavacore.so 0x0
07-05 12:44:55.675: D/dalvikvm(408): Added shared lib libjavacore.so 0x0
07-05 12:44:55.680: D/dalvikvm(408): Trying to load lib libnativehelper.so 0x0
07-05 12:44:55.680: D/dalvikvm(408): Added shared lib libnativehelper.so 0x0
07-05 12:44:55.845: D/dalvikvm(408): Note: class Landroid/app/ActivityManagerNative; has 152 unimplemented (abstract) methods
07-05 12:44:55.885: D/AndroidRuntime(408): Calling main entry com.android.commands.am.Am
07-05 12:44:55.935: D/AndroidRuntime(408): Shutting down VM
07-05 12:44:55.940: D/dalvikvm(408): GC_CONCURRENT freed 103K, 87% free 561K/4096K, paused 0ms+1ms, total 3ms
07-05 12:44:55.940: D/jdwp(408): Got wake-up signal, bailing out of select
07-05 12:44:55.940: D/dalvikvm(408): Debugger has detached; object registry had 1 entries
07-05 12:44:55.940: I/AndroidRuntime(408): NOTE: attach of thread 'Binder_3' failed
07-05 12:44:55.955: E/Trace(446): error opening trace file: No such file or directory (2)
07-05 12:44:55.980: I/System.out(446): Calabash did not load Mono. This is only a problem if you are trying to test a Mono application
07-05 12:44:55.995: D/AndroidRuntime(446): Shutting down VM
07-05 12:44:55.995: W/dalvikvm(446): threadid=1: thread exiting with uncaught exception (group=0x410e22a0)
07-05 12:44:55.995: E/AndroidRuntime(446): FATAL EXCEPTION: main
07-05 12:44:55.995: E/AndroidRuntime(446): java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo{net.loadinghome.rotatescreenorientationtrial.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner}: java.lang.RuntimeException: java.net.SocketException: socket failed: EACCES (Permission denied)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4222)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.app.ActivityThread.access$1300(ActivityThread.java:140)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1287)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.os.Handler.dispatchMessage(Handler.java:99)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.os.Looper.loop(Looper.java:137)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.app.ActivityThread.main(ActivityThread.java:4898)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.lang.reflect.Method.invokeNative(Native Method)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.lang.reflect.Method.invoke(Method.java:511)
07-05 12:44:55.995: E/AndroidRuntime(446): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
07-05 12:44:55.995: E/AndroidRuntime(446): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
07-05 12:44:55.995: E/AndroidRuntime(446): at dalvik.system.NativeStart.main(Native Method)
07-05 12:44:55.995: E/AndroidRuntime(446): Caused by: java.lang.RuntimeException: java.net.SocketException: socket failed: EACCES (Permission denied)
07-05 12:44:55.995: E/AndroidRuntime(446): at sh.calaba.instrumentationbackend.actions.NanoHTTPD.(NanoHTTPD.java:243)
07-05 12:44:55.995: E/AndroidRuntime(446): at sh.calaba.instrumentationbackend.actions.HttpServer.(HttpServer.java:61)
07-05 12:44:55.995: E/AndroidRuntime(446): at sh.calaba.instrumentationbackend.actions.HttpServer.instantiate(HttpServer.java:49)
07-05 12:44:55.995: E/AndroidRuntime(446): at sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner.onCreate(CalabashInstrumentationTestRunner.java:24)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4219)
07-05 12:44:55.995: E/AndroidRuntime(446): ... 10 more
07-05 12:44:55.995: E/AndroidRuntime(446): Caused by: java.net.SocketException: socket failed: EACCES (Permission denied)
07-05 12:44:55.995: E/AndroidRuntime(446): at libcore.io.IoBridge.socket(IoBridge.java:583)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.net.PlainSocketImpl.create(PlainSocketImpl.java:201)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.net.PlainServerSocketImpl.create(PlainServerSocketImpl.java:38)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.net.ServerSocket.(ServerSocket.java:98)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.net.ServerSocket.(ServerSocket.java:69)
07-05 12:44:55.995: E/AndroidRuntime(446): at sh.calaba.instrumentationbackend.actions.NanoHTTPD.(NanoHTTPD.java:226)
07-05 12:44:55.995: E/AndroidRuntime(446): ... 14 more
07-05 12:44:55.995: E/AndroidRuntime(446): Caused by: libcore.io.ErrnoException: socket failed: EACCES (Permission denied)
07-05 12:44:55.995: E/AndroidRuntime(446): at libcore.io.Posix.socket(Native Method)
07-05 12:44:55.995: E/AndroidRuntime(446): at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:181)
07-05 12:44:55.995: E/AndroidRuntime(446): at libcore.io.IoBridge.socket(IoBridge.java:568)
07-05 12:44:55.995: E/AndroidRuntime(446): ... 19 more
07-05 12:44:56.000: W/ActivityManager(2275): Error in app net.loadinghome.rotatescreenorientationtrial running instrumentation ComponentInfo{net.loadinghome.rotatescreenorientationtrial.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner}:
07-05 12:44:56.000: W/ActivityManager(2275): libcore.io.ErrnoException
07-05 12:44:56.000: W/ActivityManager(2275): libcore.io.ErrnoException: socket failed: EACCES (Permission denied)
07-05 12:44:56.000: I/ActivityManager(2275): Killing proc 446:net.loadinghome.rotatescreenorientationtrial/u0a240: force stop
07-05 12:44:56.065: D/dalvikvm(2275): GC_CONCURRENT freed 2052K, 16% free 34653K/41159K, paused 3ms+10ms, total 130ms
07-05 12:44:56.065: V/SecCamera-JNI-Cpp(2275): release camera
07-05 12:44:56.180: I/System.out(31479): URI: /ping
07-05 12:44:56.190: I/System.out(31479): URI: /ping
07-05 12:44:56.210: I/System.out(31479): URI: /ready
07-05 12:44:56.225: I/System.out(31479): URI: /
07-05 12:44:56.225: I/System.out(31479): header: {content-type=application/json;charset=utf-8, connection=close, user-agent=Ruby, host=127.0.0.1:45678, content-length=36, accept=/}
07-05 12:44:56.225: I/System.out(31479): params: {json={"command":"version","arguments":[]}
07-05 12:44:56.225: I/System.out(31479): }
07-05 12:44:56.225: I/System.out(31479): files: {}
07-05 12:44:56.225: I/System.out(31479): command: {"command":"version","arguments":[]}
07-05 12:44:56.225: I/InstrumentationBackend(31479): Got command:'Command:'Line:null,version', arguments:'[]'

@jonasmaturana
Copy link
Contributor

Does your app has the permission to access the internet?

  • Jonas

On Jul 5, 2013, at 11:49 AM, alkor133 [email protected] wrote:

07-05 12:44:55.660: D/AndroidRuntime(408): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
07-05 12:44:55.660: D/AndroidRuntime(408): CheckJNI is OFF
07-05 12:44:55.660: D/AndroidRuntime(408): setted country_code = Poland
07-05 12:44:55.660: D/AndroidRuntime(408): setted countryiso_code = PL
07-05 12:44:55.660: D/AndroidRuntime(408): setted sales_code = TPL
07-05 12:44:55.660: D/AndroidRuntime(408): readGMSProperty: start
07-05 12:44:55.660: D/AndroidRuntime(408): readGMSProperty: already setted!!
07-05 12:44:55.665: D/AndroidRuntime(408): readGMSProperty: end
07-05 12:44:55.670: D/dalvikvm(408): Trying to load lib libjavacore.so 0x0
07-05 12:44:55.675: D/dalvikvm(408): Added shared lib libjavacore.so 0x0
07-05 12:44:55.680: D/dalvikvm(408): Trying to load lib libnativehelper.so 0x0
07-05 12:44:55.680: D/dalvikvm(408): Added shared lib libnativehelper.so 0x0
07-05 12:44:55.845: D/dalvikvm(408): Note: class Landroid/app/ActivityManagerNative; has 152 unimplemented (abstract) methods
07-05 12:44:55.885: D/AndroidRuntime(408): Calling main entry com.android.commands.am.Am
07-05 12:44:55.935: D/AndroidRuntime(408): Shutting down VM
07-05 12:44:55.940: D/dalvikvm(408): GC_CONCURRENT freed 103K, 87% free 561K/4096K, paused 0ms+1ms, total 3ms
07-05 12:44:55.940: D/jdwp(408): Got wake-up signal, bailing out of select
07-05 12:44:55.940: D/dalvikvm(408): Debugger has detached; object registry had 1 entries
07-05 12:44:55.940: I/AndroidRuntime(408): NOTE: attach of thread 'Binder_3' failed
07-05 12:44:55.955: E/Trace(446): error opening trace file: No such file or directory (2)
07-05 12:44:55.980: I/System.out(446): Calabash did not load Mono. This is only a problem if you are trying to test a Mono application
07-05 12:44:55.995: D/AndroidRuntime(446): Shutting down VM
07-05 12:44:55.995: W/dalvikvm(446): threadid=1: thread exiting with uncaught exception (group=0x410e22a0)
07-05 12:44:55.995: E/AndroidRuntime(446): FATAL EXCEPTION: main
07-05 12:44:55.995: E/AndroidRuntime(446): java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo{net.loadinghome.rotatescreenorientationtrial.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner}: java.lang.RuntimeException: java.net.SocketException: socket failed: EACCES (Permission denied)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4222)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.app.ActivityThread.access$1300(ActivityThread.java:140)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1287)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.os.Handler.dispatchMessage(Handler.java:99)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.os.Looper.loop(Looper.java:137)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.app.ActivityThread.main(ActivityThread.java:4898)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.lang.reflect.Method.invokeNative(Native Method)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.lang.reflect.Method.invoke(Method.java:511)
07-05 12:44:55.995: E/AndroidRuntime(446): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
07-05 12:44:55.995: E/AndroidRuntime(446): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
07-05 12:44:55.995: E/AndroidRuntime(446): at dalvik.system.NativeStart.main(Native Method)
07-05 12:44:55.995: E/AndroidRuntime(446): Caused by: java.lang.RuntimeException: java.net.SocketException: socket failed: EACCES (Permission denied)
07-05 12:44:55.995: E/AndroidRuntime(446): at sh.calaba.instrumentationbackend.actions.NanoHTTPD.(NanoHTTPD.java:243)
07-05 12:44:55.995: E/AndroidRuntime(446): at sh.calaba.instrumentationbackend.actions.HttpServer.(HttpServer.java:61)
07-05 12:44:55.995: E/AndroidRuntime(446): at sh.calaba.instrumentationbackend.actions.HttpServer.instantiate(HttpServer.java:49)
07-05 12:44:55.995: E/AndroidRuntime(446): at sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner.onCreate(CalabashInstrumentationTestRunner.java:24)
07-05 12:44:55.995: E/AndroidRuntime(446): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4219)
07-05 12:44:55.995: E/AndroidRuntime(446): ... 10 more
07-05 12:44:55.995: E/AndroidRuntime(446): Caused by: java.net.SocketException: socket failed: EACCES (Permission denied)
07-05 12:44:55.995: E/AndroidRuntime(446): at libcore.io.IoBridge.socket(IoBridge.java:583)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.net.PlainSocketImpl.create(PlainSocketImpl.java:201)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.net.PlainServerSocketImpl.create(PlainServerSocketImpl.java:38)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.net.ServerSocket.(ServerSocket.java:98)
07-05 12:44:55.995: E/AndroidRuntime(446): at java.net.ServerSocket.(ServerSocket.java:69)
07-05 12:44:55.995: E/AndroidRuntime(446): at sh.calaba.instrumentationbackend.actions.NanoHTTPD.(NanoHTTPD.java:226)
07-05 12:44:55.995: E/AndroidRuntime(446): ... 14 more
07-05 12:44:55.995: E/AndroidRuntime(446): Caused by: libcore.io.ErrnoException: socket failed: EACCES (Permission denied)
07-05 12:44:55.995: E/AndroidRuntime(446): at libcore.io.Posix.socket(Native Method)
07-05 12:44:55.995: E/AndroidRuntime(446): at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:181)
07-05 12:44:55.995: E/AndroidRuntime(446): at libcore.io.IoBridge.socket(IoBridge.java:568)
07-05 12:44:55.995: E/AndroidRuntime(446): ... 19 more
07-05 12:44:56.000: W/ActivityManager(2275): Error in app net.loadinghome.rotatescreenorientationtrial running instrumentation ComponentInfo{net.loadinghome.rotatescreenorientationtrial.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner}:
07-05 12:44:56.000: W/ActivityManager(2275): libcore.io.ErrnoException
07-05 12:44:56.000: W/ActivityManager(2275): libcore.io.ErrnoException: socket failed: EACCES (Permission denied)
07-05 12:44:56.000: I/ActivityManager(2275): Killing proc 446:net.loadinghome.rotatescreenorientationtrial/u0a240: force stop
07-05 12:44:56.065: D/dalvikvm(2275): GC_CONCURRENT freed 2052K, 16% free 34653K/41159K, paused 3ms+10ms, total 130ms
07-05 12:44:56.065: V/SecCamera-JNI-Cpp(2275): release camera
07-05 12:44:56.180: I/System.out(31479): URI: /ping
07-05 12:44:56.190: I/System.out(31479): URI: /ping
07-05 12:44:56.210: I/System.out(31479): URI: /ready
07-05 12:44:56.225: I/System.out(31479): URI: /
07-05 12:44:56.225: I/System.out(31479): header: {content-type=application/json;charset=utf-8, connection=close, user-agent=Ruby, host=127.0.0.1:45678, content-length=36, accept=/}
07-05 12:44:56.225: I/System.out(31479): params: {json={"command":"version","arguments":[]}
07-05 12:44:56.225: I/System.out(31479): }
07-05 12:44:56.225: I/System.out(31479): files: {}
07-05 12:44:56.225: I/System.out(31479): command: {"command":"version","arguments":[]}
07-05 12:44:56.225: I/InstrumentationBackend(31479): Got command:'Command:'Line:null,version', arguments:'[]'


Reply to this email directly or view it on GitHub.

@choppergrip
Copy link
Author

My application does not require access to the Internet, why the issue has been closed?

@jonasmaturana
Copy link
Contributor

The test server spins up a http server to receive requests from the Ruby client and for that we need permissions to open a socket.
Calabash-android only lets you test apps that has the internet permission set.

@ambidexterious
Copy link

jonas,

how and where do i add those internet permissions. i am using win7 host with android sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants