title: Can't figure out what's wrong from Flutter Integration Test response
body: <p>I am trying to run/set up an integration test.  I am Googling the response that is returned but I can't figure out what is wrong.</p>
  <p>I have:
  an <code>integration_test</code> folder with <code>app_test.dart</code> file within:</p>
  <pre><code>import 'package:flutter_test/flutter_test.dart';
  import 'package:integration_test/integration_test.dart';
  
  void main() {
    IntegrationTestWidgetsFlutterBinding.ensureInitialized();
  
    testWidgets(&quot;failing test example&quot;, (WidgetTester tester) async {
      expect(2 + 2, equals(5));
    });
  }
  </code></pre>
  <p>a <code>test_driver</code> folder with an <code>integration_test.dart</code> file within:</p>
  <pre><code>
  Future&lt;void&gt; main() =&gt; integrationDriver();
  </code></pre>
  <p>a <code>test</code> folder with a <code>widget_test.dart</code> file within:</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:flutter_test/flutter_test.dart';
  import 'package:integration_test/integration_test.dart';
  
  void main() {
    test(&quot;This is a sample UNIT test&quot;, () {
      print(&quot;This is a UNIT test&quot;);
    });
  
    testWidgets('This is a sample WIDGET test', (WidgetTester tester) async {
      print(&quot;This is from the WIDGET test function 1&quot;);
      await print(&quot;This is from the WIDGET test function 2&quot;);
      print(&quot;This is from the WIDGET test function 3&quot;);
    });
  }
  </code></pre>
  <p>Due to the flavours that I have, this is what I use to run my integration test:</p>
  <p><code>flutter drive \ --driver=test_driver/integration_test.dart \ --target=integration_test/app_test.dart --flavor prod -t lib/main_prod.dart</code></p>
  <p>I get the following response:</p>
  <pre class="lang-dart prettyprint-override"><code>Running &quot;flutter pub get&quot; in medical-app-frontend...                5.8s
  Running Gradle task 'assembleProdDebug'...                         65.6s
  √  Built build\app\outputs\flutter-apk\app-prod-debug.apk.
  Installing build\app\outputs\flutter-apk\app.apk...                13.9s
  D/HostConnection(16237): 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 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
  W/OpenGLRenderer(16237): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
  D/EGL_emulation(16237): eglCreateContext: 0xf6b61bf0: maj 3 min 0 rcv 3
  D/EGL_emulation(16237): eglMakeCurrent: 0xf6b61bf0: ver 3 0 (tinfo 0xf6e9d130)
  D/HostConnection(16237): 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 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/HostConnection(16237): HostConnection::get() New Host Connection established 0xf6d55370, tid 16304
  D/HostConnection(16237): 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 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(16237): eglMakeCurrent: 0xf6b41dd0: ver 3 0 (tinfo 0xf6ebc790)
  D/EGL_emulation(16237): eglCreateContext: 0xf6b62bb0: maj 3 min 0 rcv 3
  D/EGL_emulation(16237): eglMakeCurrent: 0xf6b62bb0: ver 3 0 (tinfo 0xf6ebc790)
  D/EGL_emulation(16237): eglMakeCurrent: 0xf6b41dd0: ver 3 0 (tinfo 0xf6ebc790)
  VMServiceFlutterDriver: Connecting to Flutter application at http://127.0.0.1:64088/wz5l9PDpPCY=/
  D/EGL_emulation(16237): eglMakeCurrent: 0xf6b41dd0: ver 3 0 (tinfo 0xf6ebc790)
  D/EGL_emulation(16237): eglMakeCurrent: 0xf6b61bf0: ver 3 0 (tinfo 0xf6e9d130)
  VMServiceFlutterDriver: Isolate found with number: 1014490864547079
  VMServiceFlutterDriver: Isolate is paused at start.
  VMServiceFlutterDriver: Attempting to resume isolate
  I/Choreographer(16237): Skipped 161 frames!  The application may be doing too much work on its main thread.
  E/FirebaseMessaging(16237): Topic sync or token retrieval failed on hard failure exceptions: java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR. Won't retry the operation.
  W/SoundPool(16237): Use of stream types is deprecated for operations other than volume control
  W/SoundPool(16237): See the documentation of SoundPool() for what to use instead with android.media.AudioAttributes to qualify your playback use case
  W/Glide   (16237): Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated
  AppGlideModule implementation or LibraryGlideModules will be silently ignored
  W/com.skinopathy(16237): Accessing hidden method Ldalvik/system/CloseGuard;-&gt;get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, reflection, allowed)
  W/com.skinopathy(16237): Accessing hidden method Ldalvik/system/CloseGuard;-&gt;open(Ljava/lang/String;)V (greylist,core-platform-api, reflection, allowed)
  W/com.skinopathy(16237): Accessing hidden method Ldalvik/system/CloseGuard;-&gt;warnIfOpen()V (greylist,core-platform-api, reflection, allowed)
  W/Intercom realtime(16237): No realtime endpoints present so we can't connect
  I/OMXClient(16237): IOmx service obtained
  I/OMXClient(16237): IOmx service obtained
  I/OMXClient(16237): IOmx service obtained
  I/OMXClient(16237): IOmx service obtained
  I/flutter (16237): AppRequestState()
  I/flutter (16237): Transition { currentState: AppInitial(), event: AppRequestState(), nextState: AppSignIn() }
  VMServiceFlutterDriver: Connected to Flutter application.
  Unhandled exception:
  FormatException: Unexpected character (at character 1)
  No requestData Extension registered
  ^
  
  #0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1405:5)
  #1      _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1272:9)
  #2      _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:937:22)
  #3      _parseJson (dart:convert-patch/convert_patch.dart:40:10)
  #4      JsonDecoder.convert (dart:convert/json.dart:506:36)
  #5      JsonCodec.decode (dart:convert/json.dart:157:41)
  #6      Response.fromJson (package:integration_test/common.dart:45:52)
  #7      integrationDriver (package:integration_test/integration_test_driver.dart:72:38)
  &lt;asynchronous suspension&gt;
  </code></pre>
  <p><strong>From what I <em>understand</em> it's trying to connect to a local port but I can't figure out why as web is not enabled for this project.</strong></p>
  <p><strong>UPDATE</strong></p>
  <p>This is the error, but it's not descriptive enough to tell me where in the code this is happening.</p>
  <p><a href="https://i.stack.imgur.com/UwDp3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UwDp3.png" alt="enter image description here" /></a></p>
  <p>From what I've seen, it's this line:
  <strong>No requestData Extension registered</strong></p>
  <p>It has to do with the integration drivers not being set up or possibly not working due to being async.  I've looked around, and I haven't come across any solution yet.</p>