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

ParseErrorLogger isn't a type after update #700

Closed
ValeriusGC opened this issue Aug 13, 2024 · 7 comments
Closed

ParseErrorLogger isn't a type after update #700

ValeriusGC opened this issue Aug 13, 2024 · 7 comments

Comments

@ValeriusGC
Copy link

Here is an errors
image

pubspec.yaml
retrofit: ^4.2.0
build_runner: ^2.4.12
retrofit_generator: ^8.2.0

pubspec.lock:
image

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.5 23F79 darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] Connected device (4 available)
    ! Error: Browsing on the local area network for iPhone (Frostyland). Ensure the device is unlocked and attached with a cable or associated with
      the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!

@ValeriusGC
Copy link
Author

ValeriusGC commented Aug 13, 2024

Trouble was on my side!
import 'package:retrofit/http.dart';
instead
import 'package:retrofit/retrofit.dart';

@khaled-0
Copy link

khaled-0 commented Aug 14, 2024

Well, it doesn't work even with new import.
This is definitely a newly introduced bug/ undocumented change.
I'm rolling back to older version till this gets fixed

EDIT:
I'm currently on master branch and the error is gone, however it seems the retrofit package tag 4.2 has 4.1 in pubspec. Is that a mistake?

EDIT 2: After switching to master branch and switching back, it seems something caused the error to vanish, I believe it's caused by the incorrect version number in retrofit's pubspec

@Vera-Spoettl
Copy link

Vera-Spoettl commented Aug 16, 2024

@khaled-0 might be a silly question, but how did you switch between branches to get this solved?

@khaled-0
Copy link

@khaled-0 might be a silly question, but how did you switch between branches to get this solved?

dependency_overrides:
  retrofit:
    git:
      url: https://github.com/trevorwang/retrofit.dart
      path: retrofit

The normal dependency has ^4.2.0
Run flutter pub get
Observe pubspec.lock changes
Remove the dependency overrides and run pub get again
Boom, everything's fixed

@rddewan
Copy link

rddewan commented Aug 21, 2024

this seems to be a bug in the new version @khaled-0 thanks your step worked

@TJMusiitwa
Copy link

@trevorwang this is still an error that would be great to get solved without having to jump through the hoops and solutions mentioned above.
I am still on version 4.1.0 in my pubspecs and this issue came up even then.

@trevorwang
Copy link
Owner

@TJMusiitwa @rddewan @khaled-0

upgrade to retrofit 4.2.0 with generator 8.2.0, and use import 'package:retrofit/retrofit.dart'; to import that class

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

6 participants