ThexXTURBOXx / catcher_2

Flutter error catching & handling plugin. Handles and reports exceptions in your app!
https://pub.dev/packages/catcher_2
Apache License 2.0
23 stars 26 forks source link

Error: The argument type 'Duration' can't be assigned to the parameter type 'int?'. - 'Duration' is from 'dart:core'. #7

Closed hs029 closed 1 year ago

hs029 commented 1 year ago

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

Add catcher_2 into pubspec.yaml

catcher_2: ^1.0.0-alpha.1

Compile my project then got error.

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Running Gradle task 'assembleDebug'...
../../../.pub-cache/hosted/pub.flutter-io.cn/catcher_2-1.0.0-alpha.1/lib/handlers/http_handler.dart:67:22: Error: The argument type 'Duration' can't be assigned to the parameter type 'int?'.
 - 'Duration' is from 'dart:core'.
        sendTimeout: requestTimeout,
                     ^
../../../.pub-cache/hosted/pub.flutter-io.cn/catcher_2-1.0.0-alpha.1/lib/handlers/http_handler.dart:68:25: Error: The argument type 'Duration' can't be assigned to the parameter type 'int?'.
 - 'Duration' is from 'dart:core'.
        receiveTimeout: responseTimeout,
                        ^
Target kernel_snapshot failed: Exception

Device (please complete the following information!)

Additional context

n/a

Checklist

ThexXTURBOXx commented 1 year ago

The migration guide from the README contains a note about the migration to dio which had an effect on the HttpHandler. If you have defined your own, please migrate accordingly. Otherwise, try a flutter clean and flutter pub upgrade first

ThexXTURBOXx commented 1 year ago

Not reproducible

mohanadshaban commented 6 months ago

Same here with new catcher impleemnation with discord_handler i'm not even using HttpHandler and have the same eeror

ThexXTURBOXx commented 6 months ago

@mohanadshaban Try a flutter clean and flutter pub upgrade first. If it still does not work, please open a new issue and provide as much information as you can there. I cannot fix an issue without having proper information.

mohanadshaban commented 6 months ago

@ThexXTURBOXx Thanks for quick reply...

I Fixed it ! I was using old dio 4 verison override and it was incompatible...