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

Test timed out after 30 seconds error #8

Closed
blackmenthor opened this issue Oct 11, 2018 · 4 comments
Closed

Test timed out after 30 seconds error #8

blackmenthor opened this issue Oct 11, 2018 · 4 comments
Assignees

Comments

@blackmenthor
Copy link

blackmenthor commented Oct 11, 2018

Hi,

I've encountered some error when doing so much screenshots (after every taps or after every text entered), has anybody encountered the same problem??

But the problem actually didn't show up on every test. Maybe it just shows up after 2 or 3 test and it's so weird.

`await driver.tap(flutter_driver.find.byValueKey("Login"));

  await ozzie.takeScreenshot('click login');

  await driver.tap(flutter_driver.find.text("A"));

  await ozzie.takeScreenshot('click A');

  await driver.tap(flutter_driver.find.text("B"));

  await ozzie.takeScreenshot('click B');

  await driver.tap(flutter_driver.find.text("C"));

  await ozzie.takeScreenshot('click C);

  await driver.tap(flutter_driver.find.text("D"));

  await ozzie.takeScreenshot('click D');`

the test goes normal for a b c and sometimes stops on D and got an exception

@jorgecoca jorgecoca added the needs more information Used to request more information to the reporter label Oct 11, 2018
@jorgecoca jorgecoca self-assigned this Oct 11, 2018
@jorgecoca
Copy link
Contributor

@blackmenthor would you please share the entire test file with me, and the stack trace, so I can have more information about the real problem? Thanks!

@blackmenthor
Copy link
Author

await driver.tap(flutter_driver.find.text("A"), timeout: Duration(seconds: 5)); await ozzie.takeScreenshot('A'); await driver.tap(flutter_driver.find.text("B"), timeout: Duration(seconds: 10)); await ozzie.takeScreenshot('B'); await driver.tap(flutter_driver.find.byValueKey("C")); await driver.enterText( "C"); await ozzie.takeScreenshot('C'); await driver.tap( flutter_driver.find.byValueKey("D")); await driver.enterText("D"); await ozzie.takeScreenshot('D'); await driver.tap(flutter_driver.find.byValueKey("E")); await ozzie.takeScreenshot('E'); await driver.tap(flutter_driver.find.text("F")); await ozzie.takeScreenshot('F'); await driver.tap(flutter_driver.find.text("G")); await ozzie.takeScreenshot('G'); await driver.tap(flutter_driver.find.text("H")); await ozzie.takeScreenshot('H'); await driver.tap(flutter_driver.find.text("I")); await ozzie.takeScreenshot('I'); await driver.tap(flutter_driver.find.byValueKey("J")); await driver.enterText( "J"); await ozzie.takeScreenshot('J'); await driver.tap(flutter_driver.find.byValueKey("K")); await driver.enterText( "K"); await ozzie.takeScreenshot('K'); await driver.tap(flutter_driver.find.byValueKey("L")); await driver.enterText( "L"); await ozzie.takeScreenshot('L'); await driver.waitFor(flutter_driver.find.byValueKey("M")); await ozzie.takeScreenshot('M'); await driver.tap(flutter_driver.find.byValueKey("N"), timeout: Duration(seconds: 10)); await driver.waitFor(flutter_driver.find.text("N"), timeout: Duration(seconds: 5)); await ozzie.takeScreenshot('N');

and for the stacktrace is

[info ] FlutterDriver: Connecting to Flutter application at http://127.0.0.1:50333/
[trace] FlutterDriver: Isolate found with number: 473664506
[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:01 +0: Change Password Check change password success
Ozzie has deleted the "Change Password" folder
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:23.808257-A.png
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:26.414503-B.png
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:30.718286-C.png
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:32.896670-D.png
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:35.093917-E.png
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:37.300755-F.png
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:39.686432-G.png
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:41.879377-H.png
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:44.050269-I.png
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:46.218562-J.png
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:48.382156-K.png
Ozzie took screenshot: ozzie/Change Password/2018-10-12T10:31:50.556842-L.png
00:31 +0 -1: Change Password Check change password success [E]
TimeoutException after 0:00:30.000000: Test timed out after 30 seconds.
package:test/src/backend/invoker.dart 332:26 Invoker._handleError.
dart:async/zone.dart 1120:38 _rootRun
dart:async/zone.dart 1021:19 _CustomZone.run
package:test/src/backend/invoker.dart 330:10 Invoker._handleError
package:test/src/backend/invoker.dart 283:9 Invoker.heartbeat..
dart:async/zone.dart 1124:13 _rootRun
dart:async/zone.dart 1021:19 _CustomZone.run
package:test/src/backend/invoker.dart 281:38 Invoker.heartbeat.
package:stack_trace/src/stack_zone_specification.dart 209:15 StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 119:48 StackZoneSpecification._registerCallback.
dart:async/zone.dart 1124:13 _rootRun
dart:async/zone.dart 1021:19 _CustomZone.run
dart:async/zone.dart 947:23 _CustomZone.bindCallback.
dart:async/runtime/libtimer_patch.dart 21:15 Timer._createTimer.
dart:isolate/runtime/libtimer_impl.dart 382:19 _Timer._runTimers
dart:isolate/runtime/libtimer_impl.dart 416:5 _Timer._handleMessage
dart:isolate/runtime/libisolate_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/src/backend/invoker.dart 280:34 Invoker.heartbeat
package:test/src/backend/invoker.dart 242:5 Invoker.waitForOutstandingCallbacks
package:test/src/backend/declarer.dart 166:33 Declarer.test..
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/src/backend/declarer.dart 165:13 Declarer.test.
===== 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/src/backend/invoker.dart 402:15 Invoker._onRun...

00:31 +0 -1: Change Password (tearDownAll)
00:31 +0 -1: Some tests failed.

Unhandled exception:
Dummy exception to set exit code.
#0 _rootHandleUncaughtError. (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/libtimer_impl.dart:391:30)
#4 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#5 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
Stopping application instance.
Driver tests failed: 255

like that, then the code will stops at taking screenshot M or N and i'm assuming that happens because when i took too much screen shot at one test.

@jorgecoca
Copy link
Contributor

The problem is not in Ozzie, it is on the Flutter test package: from your stacktrace, you can see that package:test/src/backend/invoker.dart throws that exception.

You can see that in code here: https://github.com/dart-lang/test/blob/7555efe8cab11fea89a22685c6c2198c81a58c2b/lib/src/backend/invoker.dart#L286

I believe each test case has a time out of 30 seconds.

If you think this is a constraint, I recommend opening an issue either for test package, or for the flutter_driver package.

I am closing this issue since it is unrelated to Ozzie.

@jorgecoca jorgecoca removed the needs more information Used to request more information to the reporter label Oct 12, 2018
@stevenspiel
Copy link

Invoker.current.heartbeat() seems to reset that 30s timer if you need it.

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

No branches or pull requests

3 participants