title: google_maps_flutter causes app to crash when running from CLI but not when building and installing the apk
body: <p>the moment I try to display the map widget the app crashes, the weird thing is; it doesn't happen when I build the apk and install it, it only happens when running from cli either on emulator or physical device.
  I think it is cause by the graphics library of the underlying os, I'm running Fedora 34 &amp; 35 beta (yes, it happened on different machines), I think it uses OpenGL.</p>
  
     here is the console output before the crash:
  <pre><code>Launching lib/main.dart on sdk gphone x86 64 in debug mode...
  ✓ Built build/app/outputs/flutter-apk/app-staging-debug.apk.
  Connecting to VM Service at ws://127.0.0.1:33625/LBUXUrUqFds=/ws
  I/zzbz    ( 6935): Making Creator dynamically
  I/DynamiteModule( 6935): Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:203115000
  I/DynamiteModule( 6935): Selected remote version of com.google.android.gms.maps_dynamite, version &gt;= 203115000
  V/DynamiteModule( 6935): Dynamite loader version &gt;= 2, using loadModule2NoCrashUtils
  W/Gralloc4( 6935): allocator 3.x is not supported
  I/Google Maps Android API( 6935): Google Play services client version: 12451000
  I/Google Maps Android API( 6935): Google Play services package version: 213917050
  I/Google Maps Android API( 6935): Google Play services maps renderer version(legacy): 203115000
  I/TetheringManager( 6935): registerTetheringEventCallback:com.example.app
  E/GoogleMapController( 6935): Cannot enable MyLocation layer as location permissions are not granted
  I/bf      ( 6935): Successfully registered with Phenotype.
  D/HostConnection( 6935): HostConnection::get() New Host Connection established 0x71664f913150, tid 7092
  D/HostConnection( 6935): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0
  D/EGL_emulation( 6935): eglCreateContext: 0x71663f989470: maj 1 min 0 rcv 1
  E/oodbeeper_stor( 6935): [SurfaceTexture-0-6935-0] attachToContext: invalid current EGLDisplay
  D/EGL_emulation( 6935): eglMakeCurrent: 0x71663f989470: ver 1 0 (tinfo 0x7165df978080) (first time)
  D/EGL_emulation( 6935): eglMakeCurrent: 0x71663f989470: ver 1 0 (tinfo 0x7165df978080) (first time)
  E/flutter ( 6935): [ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(43)] java.lang.RuntimeException: Error during attachToGLContext (see logcat for details)
  E/flutter ( 6935):  at android.graphics.SurfaceTexture.attachToGLContext(SurfaceTexture.java:295)
  E/flutter ( 6935):
  F/flutter ( 6935): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1062)] Check failed: CheckException(env).
  F/libc    ( 6935): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 7035 (1.raster), pid 6935 (oodbeeper_store)
  *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
  Build fingerprint: 'google/sdk_gphone_x86_64/generic_x86_64_arm64:11/RSR1.201211.001/7027799:user/release-keys'
  Revision: '0'
  ABI: 'x86_64'
  Timestamp: 2021-11-02 14:39:44+0100
  pid: 6935, tid: 7035, name: 1.raster  &gt;&gt;&gt; com.example.app &lt;&lt;&lt;
  uid: 10161
  signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
  Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1062)] Check failed: CheckException(env).
  '
      rax 0000000000000000  rbx 0000000000001b17  rcx 000071685366b2a8  rdx 0000000000000006
      r8  0000716563e82d50  r9  0000716563e82d50  r10 0000716563e82d00  r11 0000000000000246
      r12 0000000000000000  r13 000071660f91a6d8  r14 0000716563e82cf8  r15 0000000000001b7b
      rdi 0000000000001b17  rsi 0000000000001b7b
      rbp 0000000000000007  rsp 0000716563e82ce8  rip 000071685366b2a8
  backtrace:
        #00 pc 000000000005a2a8  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+24) (BuildId: 3707c39fc397eeaa328142d90b50a973)
        #01 pc 000000000005d212  /apex/com.android.runtime/lib64/bionic/libc.so (abort+194) (BuildId: 3707c39fc397eeaa328142d90b50a973)
        #02 pc 0000000001313f62  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #03 pc 00000000013057fa  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #04 pc 00000000012fcb08  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #05 pc 00000000012fc919  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #06 pc 000000000130ca2a  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #07 pc 000000000130a4aa  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #08 pc 000000000130cd00  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #09 pc 000000000130a4aa  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #10 pc 000000000130be9f  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #11 pc 000000000130a4aa  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #12 pc 000000000130cd00  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #13 pc 000000000130a4aa  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #14 pc 000000000130cd00  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #15 pc 000000000130a4aa  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #16 pc 000000000130cd00  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #17 pc 000000000130a4aa  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #18 pc 000000000130aedd  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #19 pc 000000000130874f  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #20 pc 0000000001348ca5  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #21 pc 000000000134965d  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #22 pc 000000000134a149  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #23 pc 000000000134908b  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #24 pc 0000000001348e14  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #25 pc 00000000013536af  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #26 pc 00000000013147ed  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #27 pc 000000000131937e  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #28 pc 000000000001a915  /system/lib64/libutils.so (android::Looper::pollInner(int)+1013) (BuildId: 658bede56204d492a28682a718f6f501)
        #29 pc 000000000001a4be  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+126) (BuildId: 658bede56204d492a28682a718f6f501)
        #30 pc 0000000000014e3f  /system/lib64/libandroid.so (ALooper_pollOnce+95) (BuildId: 172712252424beba249e1b3214d20ea0)
        #31 pc 000000000131931f  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #32 pc 0000000001314746  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #33 pc 0000000001317313  /data/app/~~puLf4QG7R3biVcr-Rh2RrQ==/com.example.app-pCBoXg3MvOp0IB3J5_LYgQ==/lib/x86_64/libflutter.so (BuildId: 9cdb69edfb7740985659f2ccced15abe01d74f0a)
        #34 pc 00000000000c7d2a  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+58) (BuildId: 3707c39fc397eeaa328142d90b50a973)
        #35 pc 000000000005f0c7  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+55) (BuildId: 3707c39fc397eeaa328142d90b50a973)
  Lost connection to device.
  Exited (sigterm)
  
  </code></pre>