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

flutter_stetho crashed after updating to version 0.3.0 #25

Closed
JunusErgin opened this issue Jul 18, 2019 · 6 comments · Fixed by #26
Closed

flutter_stetho crashed after updating to version 0.3.0 #25

JunusErgin opened this issue Jul 18, 2019 · 6 comments · Fixed by #26

Comments

@JunusErgin
Copy link

Hey, i just updated the package to version 0.3.0.

Unfortunately, it crashes on build with the following exception:

Launching lib\main.dart on WAS LX1A in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

Compiler message:
file:///C:/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_stetho-0.3.0/lib/src/http_client_response.dart:4:7: Error: 'StethoHttpClientResponse' can't implement both 'Stream<List<int>>' and 'Stream<Uint8List>'
 - 'Stream' is from 'dart:async'.
 - 'List' is from 'dart:core'.
 - 'Uint8List' is from 'dart:typed_data'.
class StethoHttpClientResponse extends StreamView<List<int>>
      ^
Compiler failed on C:\Dev\petleo-flutter-app\lib\main.dart

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Dev\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 652

* What went wrong:
Execution failed for task ':app:compileflutterBuildDebugArm64'.
> Process 'command 'C:\Dev\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 12s
Finished with error: Gradle task assembleDebug failed with exit code 1

Channel dev, v1.8.1, (I also tried beta 1.7)
Dart 2.5.0 (build 2.5.0-dev.0.0 b5aeaa6796)

Any ideas how to solve this problem?

Best
Junus

@brianegan
Copy link
Owner

Oh boy -- you're right. Not sure what happened, I tested on Master but for some reason it looks like the engine did not upgrade properly when I switched to the dev / master channel.

Could you please try this version in your pubspec.yaml to see if it fixes the issue?

dependencies:
  flutter_stetho:
    git:
      url: git://github.com/brianegan/flutter_stetho.git
      ref: master-fixes

@JunusErgin
Copy link
Author

Hey Brian,

thanks for the fast response. It seems to work now. :-)

Best,
Junus

@brianegan
Copy link
Owner

Awesome. I'll publish a new version 0.4.0 with that fix. Appreciate the feedback!

@Mooibroek
Copy link

Mooibroek commented Jul 19, 2019

Still getting this error on 0.4.0, seems to break on stable channel now

Compiler message:
file:///Users/nicepants/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_stetho-0.4.0/lib/src/http_client_response.dart:5:7: Error: 'StethoHttpClientResponse' can't implement both 'Stream<Uint8List>' and 'Stream<List<int>>'
 - 'Stream' is from 'dart:async'.
 - 'Uint8List' is from 'dart:typed_data'.
 - 'List' is from 'dart:core'.
class StethoHttpClientResponse extends StreamView<Uint8List>
      ^
file:///Users/nicepants/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_stetho-0.4.0/lib/src/http_client_request.dart:54:42: Error: The argument type 'HttpClientResponse' can't be assigned to the parameter type 'Stream<Uint8List>'.
 - 'HttpClientResponse' is from 'dart:_http'.
 - 'Stream' is from 'dart:async'.
 - 'Uint8List' is from 'dart:typed_data'.
Try changing the type of the parameter, or casting the argument to 'Stream<Uint8List>'.
      createResponseTransformer(id).bind(response),
                                         ^

@Mooibroek
Copy link

Mooibroek commented Jul 19, 2019

Updated:
^0.3.0 works for stable /dart 2.4
^0.4.0 works for dev / dart 2.5

Flutter 1.7.8+hotfix.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b712a172f9 (10 days ago) • 2019-07-09 13:14:38 -0700
Engine • revision 54ad777fd2
Tools • Dart 2.4.0

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.7.8+hotfix.3, on Mac OS X 10.14.5 18F132, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
[✓] iOS tools - develop for iOS devices
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.36.1)
[✓] Connected device (1 available)

@brianegan
Copy link
Owner

brianegan commented Jul 19, 2019

Thanks! I'll fix the Changelog to note that. Boy I sure wish you could declare Flutter versions as part of the dependencies :/

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

Successfully merging a pull request may close this issue.

3 participants