jhomlala / catcher

Flutter error catching & handling plugin. Handles and reports exceptions in your app!
Apache License 2.0
784 stars 175 forks source link

[BUG] Type 'User' not found and can't get 0.7.0 since it's incompatible with flutter_quill #238

Closed Cierra-Runis closed 1 year ago

Cierra-Runis commented 1 year ago

Describe the bug Can't build apk after using catcher.

/D:/flutter/.pub-cache/hosted/pub.dartlang.org/catcher-0.5.0/lib/handlers/sentry_handler.dart:12:3: Error: Type 'User' not found.
  User? userContext;
  ^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/catcher-0.5.0/lib/handlers/sentry_handler.dart:12:3: Error: 'User' isn't a type.
  User? userContext;
  ^^^^

/D:/flutter/.pub-cache/hosted/pub.dartlang.org/catcher-0.5.0/lib/handlers/sentry_handler.dart:93:22: Error: Couldn't find constructor 'Message'.
      message: const Message("Error handled by Catcher"),
                     ^^^^^^^
3

FAILURE: Build failed with an exception.

* Where:
Script 'D:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'D:\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 11s
Exception: Gradle task assembleDebug failed with exit code 1
Because catcher >=0.7.0 depends on device_info_plus ^7.0.0 and flutter_quill >=6.1.8 depends on device_info_plus ^8.0.0, catcher >=0.7.0 is incompatible with flutter_quill >=6.1.8.
So, because mercurius depends on both flutter_quill ^6.2.1 and catcher ^0.7.0, version solving failed.
pub get failed (1; So, because mercurius depends on both flutter_quill ^6.2.1 and catcher ^0.7.0, version solving failed.)

To Reproduce

Just try the example, and try to use 0.7.0 version of catcher.

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.9, on Active code page: 65001

Microsoft Windows [版本 10.0.22621.1105], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.3)
[√] Android Studio (version 2021.3)
[√] VS Code (version 1.74.3)
[√] Connected device (4 available)
[√] HTTP Host Availability

• No issues found!

Catcher version

Smartphone (please complete the following information):

MichalOneNav commented 1 year ago

Same here ! Can you update device_info_plus dependency ?

calcitem commented 1 year ago

It's a pity that the author has rarely updated recently, and this project may be abandoned, so the fastest way to solve the problem is to fork it yourself and maintain it.

Cierra-Runis commented 1 year ago

Same here ! Can you update device_info_plus dependency ?

I didn't add device_info_plus package at my pubspec.yaml file, it's these two package (catcher and flutter_quill) depending two versions of device_info_plus.

Here what is needed is that catcher's author updating his package.

ThexXTURBOXx commented 1 year ago

Please look through PRs first before posting issues. #234 solves this.