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

Issues Found When We ran Flutter unit tests #184

Open
manoj1749 opened this issue Mar 4, 2023 · 2 comments
Open

Issues Found When We ran Flutter unit tests #184

manoj1749 opened this issue Mar 4, 2023 · 2 comments

Comments

@manoj1749
Copy link

  • Some tests failed when flutter unit tests for the rutorrent-flutter application.
  • These issues were found due to the modal_bottom_sheet dependency used.
  • We can run flutter test in the local directory of the project to reproduce the issue.

Issues found

00:01 +0: ...Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart     ../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.0/lib/src/material_with_modal_page_route.dart:4:1
: Error: 'ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart'
and 'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
import '../modal_bottom_sheet.dart';
^^^^^^^^^^^^^^^^^^^^^
00:04 +0: ...Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart     ../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.0/lib/src/bottom_sheets/material_bottom_sheet.dar
t:28:13: Error: 'ModalBottomSheetRoute' is imported from both
'package:flutter/src/material/bottom_sheet.dart' and
'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
      .push(ModalBottomSheetRoute<T>(
            ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.0/lib/src/bottom_sheets/material_bottom_sheet.dar
t:50:10: Error: A value of type 'Object?' can't be returned from an async function with return type
'Future<T?>'.
 - 'Object' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
  return result;
         ^
../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.0/lib/src/bottom_sheets/bar_bottom_sheet.dart:99:
13: Error: 'ModalBottomSheetRoute' is imported from both
'package:flutter/src/material/bottom_sheet.dart' and
'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
      .push(ModalBottomSheetRoute<T>(
            ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.0/lib/src/bottom_sheets/bar_bottom_sheet.dart:121
:10: Error: A value of type 'Object?' can't be returned from an async function with return type
'Future<T?>'.
 - 'Object' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
  return result;
         ^
00:06 +0 -1: loading /Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart [E]
  Failed to load "/Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart": Compilation failed for testPath=/Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart

To run this test again: /Users/manoj/flutter/bin/cache/dart-sdk/bin/dart test /Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart -p vm --plain-name 'loading /Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart'
  Exception: the Dart compiler exited unexpectedly.
  package:flutter_tools/src/base/common.dart 10:3  throwToolExit
  package:flutter_tools/src/compile.dart 831:9     DefaultResidentCompiler._compile.<fn>
  dart:async/zone.dart 1406:47                     _rootRunUnary
  dart:async/zone.dart 1307:19                     _CustomZone.runUnary
  
00:11 +1 -1: Some tests failed.                                            
@aryamanshrivastava
Copy link

@manoj1749 can you please assign this issue to me.

@manoj1749
Copy link
Author

@manoj1749 can you please assign this issue to me.

I had already made a pr regarding this

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