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

unhandled exception - command failed #229

Open
LSambo02 opened this issue May 7, 2021 · 7 comments
Open

unhandled exception - command failed #229

LSambo02 opened this issue May 7, 2021 · 7 comments

Comments

@LSambo02
Copy link

LSambo02 commented May 7, 2021

Process stops while installing application on the target device (Nexus 6P)

Running Gradle task 'assembleDebug'...                            239.2s
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app.apk...                 3.5s
../../Library/Android/sdk/flutter/packages/flutter_test/lib/src/_goldens_io.dart:9:8: Error: Not found: 'dart:ui'
import 'dart:ui';
       ^
../../Library/Android/sdk/flutter/packages/flutter_test/lib/src/accessibility.dart:8:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui;
       ^
../../Library/Android/sdk/flutter/packages/flutter_test/lib/src/animation_sheet.dart:6:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui;
       ^
../../Library/Android/sdk/flutter/packages/flutter_test/lib/src/binding.dart:7:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui;
       ^
../../Library/Android/sdk/flutter/packages/flutter_test/lib/src/frame_timing_summarizer.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui';
       ^
../../Library/Android/sdk/flutter/packages/flutter_test/lib/src/image.dart:7:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui;
       ^
../../Library/Android/sdk/flutter/packages/flutter_test/lib/src/matchers.dart:7:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui;
       ^
../../Library/Android/sdk/flutter/packages/flutter_test/lib/src/matchers.dart:8:8: Error: Not found: 'dart:ui'
import 'dart:ui';
       ^
../../Library/Android/sdk/flutter/packages/flutter_test/lib/src/test_pointer.dart:10:1: Error: Not found: 'dart:ui'
export 'dart:ui' show Offset;
^
../../Library/Android/sdk/flutter/packages/flutter_test/lib/src/window.dart:6:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui hide window;
       ^
Unhandled exception:
command failed: exitcode=1, cmd='flutter -d emulator-5554 drive lib/main.dart', workingDirectory=., mode=normal
#0      streamCmd (package:screenshots/src/utils.dart:405:7)
<asynchronous suspension>
#1      Screenshots.runProcessTests (package:screenshots/src/run.dart:403:7)
<asynchronous suspension>
#2      Screenshots.runTestsOnAll (package:screenshots/src/run.dart:353:11)
<asynchronous suspension>
#3      Screenshots.run (package:screenshots/src/run.dart:127:5)
<asynchronous suspension>
#4      AppContext.run.<anonymous closure> (package:tool_base/src/base/context.dart:154:19)
<asynchronous suspension>
#5      AppContext.run (package:tool_base/src/base/context.dart:153:12)
<asynchronous suspension>
#6      runInContext (package:screenshots/src/context_runner.dart:16:10)
<asynchronous suspension>
#7      main (file:///Users/igorlsambo/.pub-cache/hosted/pub.dartlang.org/screenshots-2.1.1/bin/main.dart:122:19)
<asynchronous suspension> 
@hansbak
Copy link

hansbak commented May 13, 2021

If I remember well, the dart test should only have the following import statements:

import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart';
import 'package:screenshots/screenshots.dart';

NOT more because they are causing the UI errors....

@LSambo02
Copy link
Author

My test is like this and using the screenshots as a executable

import 'package:flutter_test/flutter_test.dart';
import 'package:my_app/main.dart' as app;

void main() {
  testWidgets('simple test', (WidgetTester tester) async {
    // Build our app and trigger a frame.
    await tester.pumpWidget(app.MyApp());
  });
}

What would it be the flutter_driver.dart for?

@hansbak
Copy link

hansbak commented May 13, 2021

i use the integration tests as described in: https://flutter.dev/docs/testing/integration-tests

@LSambo02
Copy link
Author

Thanks, I'll be reading and test it out

@hansbak
Copy link

hansbak commented May 13, 2021

Please do, also use the flutter channel beta.....i could not get this working with the channel stable.

@LSambo02
Copy link
Author

Noted

@hansbak
Copy link

hansbak commented May 13, 2021

now i remember more, use also this fork: https://github.com/felixgabler/screenshots ....

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

No branches or pull requests

2 participants