Skip to content

[in_app_purchase] fix Android driver test failure #29462

@collinjackson

Description

@collinjackson

We now have CI for plugins driver tests and it's complaining that in_app_purchase driver tests are failing on Android. They're failing for me locally as well.

Here's an example of a failing run on Cirrus: https://github.com/flutter/plugins/runs/79224543

Here are the logs I get when running locally.

00:00 +0: Store connection tests (setUpAll)
[info ] FlutterDriver: Connecting to Flutter application at http://127.0.0.1:49918/
[trace] FlutterDriver: Isolate found with number: 1044961320
[trace] FlutterDriver: Isolate is paused at start.
[trace] FlutterDriver: Attempting to resume isolate
[trace] FlutterDriver: Waiting for service extension
[info ] FlutterDriver: Connected to Flutter application.
00:00 +0: Store connection tests can connect
[warning] FlutterDriver: waitFor message is taking a long time to complete...
00:30 +0 -1: Store connection tests can connect [E]
  TimeoutException after 0:00:30.000000: Test timed out after 30 seconds.
  package:test_api/src/backend/invoker.dart 332:28              Invoker._handleError.<fn>
  dart:async/zone.dart 1120:38                                  _rootRun
  dart:async/zone.dart 1021:19                                  _CustomZone.run
  package:test_api/src/backend/invoker.dart 330:10              Invoker._handleError
  package:test_api/src/backend/invoker.dart 283:9               Invoker.heartbeat.<fn>.<fn>
  dart:async/zone.dart 1124:13                                  _rootRun
  dart:async/zone.dart 1021:19                                  _CustomZone.run
  package:test_api/src/backend/invoker.dart 281:38              Invoker.heartbeat.<fn>
  package:stack_trace/src/stack_zone_specification.dart 209:15  StackZoneSpecification._run
  package:stack_trace/src/stack_zone_specification.dart 119:48  StackZoneSpecification._registerCallback.<fn>
  dart:async/zone.dart 1124:13                                  _rootRun
  dart:async/zone.dart 1021:19                                  _CustomZone.run
  dart:async/zone.dart 947:23                                   _CustomZone.bindCallback.<fn>
  dart:async/runtime/lib/timer_patch.dart 21:15                 Timer._createTimer.<fn>
  dart:isolate/runtime/lib/timer_impl.dart 382:19               _Timer._runTimers
  dart:isolate/runtime/lib/timer_impl.dart 416:5                _Timer._handleMessage
  dart:isolate/runtime/lib/isolate_patch.dart 171:12            _RawReceivePortImpl._handleMessage
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1045:19                                  _CustomZone.registerCallback
  dart:async/zone.dart 946:22                                   _CustomZone.bindCallback
  dart:async/zone.dart 1191:21                                  _rootCreateTimer
  dart:async/zone.dart 1088:19                                  _CustomZone.createTimer
  package:test_api/src/backend/invoker.dart 280:34              Invoker.heartbeat
  package:test_api/src/backend/invoker.dart 243:5               Invoker.waitForOutstandingCallbacks
  package:test_api/src/backend/declarer.dart 166:33             Declarer.test.<fn>.<fn>
  dart:async/zone.dart 1124:13                                  _rootRun
  dart:async/zone.dart 1021:19                                  _CustomZone.run
  dart:async/zone.dart 1516:10                                  _runZoned
  dart:async/zone.dart 1463:12                                  runZoned
  package:test_api/src/backend/declarer.dart 165:13             Declarer.test.<fn>
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1045:19                                  _CustomZone.registerCallback
  dart:async/zone.dart 962:22                                   _CustomZone.bindCallbackGuarded
  dart:async/timer.dart 52:45                                   new Timer
  dart:async/timer.dart 87:9                                    Timer.run
  dart:async/future.dart 174:11                                 new Future
  package:test_api/src/backend/invoker.dart 399:21              Invoker._onRun.<fn>.<fn>.<fn>

00:30 +0 -1: Store connection tests (tearDownAll)
00:30 +0 -1: Store connection tests can connect [E]
  DriverError: Failed to fulfill WaitFor due to remote error
  Original error: Bad state: The client closed with pending request "ext.flutter.driver".
  Original stack trace:
  #0      new Client.withoutJson.<anonymous closure> (package:json_rpc_2/src/client.dart:70:24)
  #1      StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
  #2      StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
  #3      _rootRun (dart:async/zone.dart:1120:38)
  #4      _CustomZone.run (dart:async/zone.dart:1021:19)
  #5      _FutureListener.handleWhenComplete (dart:async/future_impl.dart:150:18)
  #6      Future._propagateToListeners.handleWhenCompleteCallback (dart:async/future_impl.dart:609:39)
  #7      Future._propagateToListeners (dart:async/future_impl.dart:665:37)
  #8      Future._propagateToListeners (dart:async/future_impl.dart:566:9)
  #9      Future._completeWithValue (dart:async/future_impl.dart:483:5)
  #10     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:513:7)
  #11     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
  #12     StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
  #13     _rootRun (dart:async/zone.dart:1124:13)
  #14     _CustomZone.run (dart:async/zone.dart:1021:19)
  #15     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
  #16     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
  #17     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
  #18     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
  #19     _Timer._runTimers (dart:isolate/runtime/lib/timer_impl.dart:391:30)
  #20     _Timer._handleMessage (dart:isolate/runtime/lib/timer_impl.dart:416:5)
  #21     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/lib/isolate_patch.dart:171:12)


  package:flutter_driver/src/driver/driver.dart 408:7   FlutterDriver._sendCommand
  ===== asynchronous gap ===========================
  dart:async/future_impl.dart 22:43                     _Completer.completeError
  dart:async/runtime/lib/async_patch.dart 40:18         _AsyncAwaitCompleter.completeError
  package:flutter_driver/src/driver/driver.dart         FlutterDriver._sendCommand
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1062:19                          _CustomZone.registerBinaryCallback
  dart:async/runtime/lib/async_patch.dart 86:23         _asyncErrorWrapperHelper
  package:flutter_driver/src/driver/driver.dart         FlutterDriver._sendCommand
  package:flutter_driver/src/driver/driver.dart 446:11  FlutterDriver.waitFor
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1053:19                          _CustomZone.registerUnaryCallback
  dart:async/runtime/lib/async_patch.dart 77:23         _asyncThenWrapperHelper
  package:test_api/src/backend/declarer.dart            Declarer.test.<fn>.<fn>.<fn>
  package:test_api/src/backend/invoker.dart 250:15      Invoker.waitForOutstandingCallbacks.<fn>
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1045:19                          _CustomZone.registerCallback
  dart:async/zone.dart 962:22                           _CustomZone.bindCallbackGuarded
  dart:async/timer.dart 52:45                           new Timer
  dart:async/timer.dart 87:9                            Timer.run
  dart:async/future.dart 174:11                         new Future
  package:test_api/src/backend/invoker.dart 399:21      Invoker._onRun.<fn>.<fn>.<fn>

00:30 +0 -1: Some tests failed.

Unhandled exception:
Dummy exception to set exit code.
#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:1112:29)
#1      _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#2      _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#3      _Timer._runTimers (dart:isolate/runtime/lib/timer_impl.dart:391:30)
#4      _Timer._handleMessage (dart:isolate/runtime/lib/timer_impl.dart:416:5)
#5      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/lib/isolate_patch.dart:171:12)
Stopping application instance.
Driver tests failed: 255

Metadata

Metadata

Assignees

No one assigned

    Labels

    p: in_app_purchasePlugin for in-app purchasepackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyt: flutter driver"flutter driver", flutter_drive, or a driver test

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions