My Ionic application crashes on start on an android emulator

Hello,

I’m trying to emulate my ionic app on an android emulator. Here’s what I did:

  1. I built my app with ionic build android
  2. I ran it on the emulator with ionic emulate android and then installing the apk through adb install

My app shows up on the emulator, but when I launch it, it crashes on start with an error message says “Unfortunately, xxxx has stopped working.”

I ran adb logcat. Following is the result:

--------- beginning of crash
07-15 17:58:22.650 2145 2214 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 2214 (GpuThread)
07-15 17:58:22.765 950 950 I SELinux : SELinux: Loaded file_contexts contexts from /file_contexts.
07-15 17:58:22.765 950 950 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-15 17:58:22.765 950 950 F DEBUG : Build fingerprint: ‘Android/sdk_phone_x86/generic_x86:6.0/MASTER/2780065:userdebug/test-keys’
07-15 17:58:22.765 950 950 F DEBUG : Revision: ‘0’
07-15 17:58:22.765 950 950 F DEBUG : ABI: ‘x86’
07-15 17:58:22.765 950 950 F DEBUG : pid: 2145, tid: 2214, name: GpuThread >>> com.ionicframework.kayo561504 <<<
07-15 17:58:22.765 950 950 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
07-15 17:58:22.769 950 950 F DEBUG : Abort message: '[FATAL:gl_surface_android.cc(58)] Check failed: kGLImplementationNone != GetGLImplementation() (0 vs. 0)
07-15 17:58:22.769 950 950 F DEBUG : ’
07-15 17:58:22.769 950 950 F DEBUG : eax 00000000 ebx 00000861 ecx 000008a6 edx 00000006
07-15 17:58:22.769 950 950 F DEBUG : esi a18bf980 edi 00000000
07-15 17:58:22.769 950 950 F DEBUG : xcs 00000073 xds 0000007b xes 0000007b xfs 000000b7 xss 0000007b
07-15 17:58:22.769 950 950 F DEBUG : eip b732d596 ebp 000008a6 esp a18bec40 flags 00200202
07-15 17:58:22.770 1924 2107 I GlobalDismissManager: no sender configured
07-15 17:58:22.770 1924 2107 D AlertService: Beginning updateAlertNotification
07-15 17:58:22.778 1924 2107 D AlertService: No fired or scheduled alerts
07-15 17:58:22.786 1924 2107 D AlertService: Scheduling next alarm with AlarmScheduler. sEventReminderReceived: null
07-15 17:58:22.790 1924 2107 D AlarmScheduler: No events found starting within 1 week.
07-15 17:58:22.795 950 950 F DEBUG :
07-15 17:58:22.795 950 950 F DEBUG : backtrace:
07-15 17:58:22.795 950 950 F DEBUG : #00 pc 00084596 /system/lib/libc.so (tgkill+22)
07-15 17:58:22.795 950 950 F DEBUG : #01 pc 000815e8 /system/lib/libc.so (pthread_kill+70)
07-15 17:58:22.795 950 950 F DEBUG : #02 pc 00027205 /system/lib/libc.so (raise+36)
07-15 17:58:22.795 950 950 F DEBUG : #03 pc 000209e4 /system/lib/libc.so (abort+80)
07-15 17:58:22.795 950 950 F DEBUG : #04 pc 0037328a /system/app/webview/webview.apk (offset 0x7ea000)
07-15 17:58:22.795 950 950 F DEBUG : #05 pc 000009a3 /data/misc/shared_relro/libwebviewchromium32.relro
07-15 17:58:22.903 1286 2223 W ActivityManager: Force finishing activity com.ionicframework.kayo561504/.MainActivity
07-15 17:58:22.905 942 1011 D PermissionCache: checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (82 us)
07-15 17:58:22.906 942 942 D gralloc : Registering a buffer in the process that created it. This may cause memory ordering problems.
07-15 17:58:22.906 942 942 E libEGL : called unimplemented OpenGL ES API
07-15 17:58:22.906 942 942 E SurfaceFlinger: glCheckFramebufferStatusOES error 941833840
07-15 17:58:22.906 942 942 E SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
07-15 17:58:22.911 950 950 F DEBUG :
07-15 17:58:22.911 950 950 F DEBUG : Tombstone written to: /data/tombstones/tombstone_03
07-15 17:58:22.911 950 950 E DEBUG : AM write failed: Broken pipe
07-15 17:58:22.913 1286 1322 W InputDispatcher: channel ‘cb1d010 com.ionicframework.kayo561504/com.ionicframework.kayo561504.MainActivity (server)’ ~ Consumer closed input channel or an error occurred. events=0x9
07-15 17:58:22.913 1286 1322 E InputDispatcher: channel ‘cb1d010 com.ionicframework.kayo561504/com.ionicframework.kayo561504.MainActivity (server)’ ~ Channel is unrecoverably broken and will be disposed!
07-15 17:58:22.915 1286 1303 I BootReceiver: Copying /data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)
07-15 17:58:22.922 1286 1734 I WindowState: WIN DEATH: Window{cb1d010 u0 com.ionicframework.kayo561504/com.ionicframework.kayo561504.MainActivity}
07-15 17:58:22.923 1286 1734 W InputDispatcher: Attempted to unregister already unregistered input channel ‘cb1d010 com.ionicframework.kayo561504/com.ionicframework.kayo561504.MainActivity (server)’
07-15 17:58:22.930 1286 2223 W ActivityManager: Exception thrown during pause
07-15 17:58:22.930 1286 2223 W ActivityManager: android.os.DeadObjectException
07-15 17:58:22.930 1286 2223 W ActivityManager: at android.os.BinderProxy.transactNative(Native Method)
07-15 17:58:22.930 1286 2223 W ActivityManager: at android.os.BinderProxy.transact(Binder.java:503)
07-15 17:58:22.930 1286 2223 W ActivityManager: at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:727) 07-15 17:58:22.930 1286 2223 W ActivityManager: at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:867)
07-15 17:58:22.930 1286 2223 W ActivityManager: at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2907)
07-15 17:58:22.930 1286 2223 W ActivityManager: at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:2763)

07-15 17:58:22.930 1286 2223 W ActivityManager: at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:2755)
07-15 17:58:22.930 1286 2223 W ActivityManager: at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:11971)
07-15 17:58:22.930 1286 2223 W ActivityManager: at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:11867)
07-15 17:58:22.930 1286 2223 W ActivityManager: at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:12556)
07-15 17:58:22.930 1286 2223 W ActivityManager: at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:12063)
07-15 17:58:22.930 1286 2223 W ActivityManager: at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
07-15 17:58:22.935 1286 1298 I ActivityManager: Process com.ionicframework.kayo561504 (pid 2145) has died
07-15 17:58:22.936 956 956 I Zygote : Process 2145 exited due to signal (6)
07-15 17:58:23.506 1286 1305 W WindowAnimator: Failed to dispatch window animation state change.
07-15 17:58:23.506 1286 1305 W WindowAnimator: android.os.DeadObjectException
07-15 17:58:23.506 1286 1305 W WindowAnimator: at android.os.BinderProxy.transactNative(Native Method)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at android.os.BinderProxy.transact(Binder.java:503)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:534)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:286)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:678)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at com.android.server.wm.WindowAnimator.-wrap0(WindowAnimator.java)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:123)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at android.view.Choreographer.doCallbacks(Choreographer.java:670)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at android.view.Choreographer.doFrame(Choreographer.java:603)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at android.os.Handler.handleCallback(Handler.java:739)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at android.os.Handler.dispatchMessage(Handler.java:95)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at android.os.Looper.loop(Looper.java:148)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at android.os.HandlerThread.run(HandlerThread.java:61)
07-15 17:58:23.506 1286 1305 W WindowAnimator: at com.android.server.ServiceThread.run(ServiceThread.java:46)
07-15 17:58:31.035 1286 1300 I ActivityManager: Waited long enough for: ServiceRecord{dcf6f u0 com.android.calendar/.alerts.InitAlarmsService}
07-15 17:58:46.065 1924 2022 D InitAlarmsService: Clearing and rescheduling alarms.
07-15 17:59:13.229 1286 1395 I MediaFocusControl: AudioFocus abandonAudioFocus() from android.media.AudioManager@e9d200acom.android.music.MediaPlaybackService$3@a65e07b
07-15 18:00:57.754 1286 1305 W AppOps : Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0
07-15 18:00:57.756 1286 1298 W InputMethodManagerService: Got RemoteException sending setActive(false) notification to pid 2145 uid 10054
07-15 18:00:57.758 1531 1531 I Choreographer: Skipped 73 frames! The application may be doing too much work on its main thread.
07-15 18:02:26.823 959 959 I perfprofd: profile collection skipped (running in emulator)

Thanks in advance!