Error after used pub upgrade and the error show RC2Parameters that never heard.

This issue has been tracked since 2023-03-17.

After I used pub upgrade I got this error and I don't know why. Although I comment on the crypto package(I see the crypto is a path in the error) this error still appears.

Launching lib\main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dev/basic_utils-5.5.1/lib/src/library/crypto/rc2_engine.dart:4:1: Error: 'RC2Parameters' is imported from both 'package:basic_utils/src/library/crypto/rc2_parameters.dart' and 'package:pointycastle/api.dart'.
import 'package:pointycastle/export.dart';
^^^^^^^^^^^^^
Failed to compile the application.

I tried to ctrl+shift+f to find package:basic_utils/src/library/crypto/rc2_parameters.dart and RC2Parameters but this is not found.

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.7.5, on Microsoft Windows [Version 10.0.19045.2728], locale th-TH)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.5)
[√] Android Studio (version 2022.1)
[√] IntelliJ IDEA Community Edition (version 2022.2)
[√] VS Code (version 1.76.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

• No issues found!
IkramBOULAKSAKIS wrote this answer on 2023-03-17

Just got the same issue !!

stuartmorgan wrote this answer on 2023-03-17

This error is coming from the basic_utils package; you'll need to report it to the developers of that package. It looks like they'll need to update it for a conflict in its dependencies.

mc100p wrote this answer on 2023-03-18

What worked for me is is that

Screenshot 2023-03-17 at 4 04 05 PM

for the import - import 'package:basic_utils/src/library/crypto/rc2_parameters.dart'

I added as crypto so It wouldn't be ambiguous.

stuartmorgan wrote this answer on 2023-03-18

Editing files in your pub cache is not recommended, as the cache is subject to being cleared or rebuilt.

swisscheesy wrote this answer on 2023-03-18

No current workaround besides editing pub cache?

SittiphanSittisak wrote this answer on 2023-03-18

I am not using the basic_utils package why do I face this error?
Or this package was required in some package that I am using?

SittiphanSittisak wrote this answer on 2023-03-18

I tried to find the package that makes this error, and the result is the mongo_dart package. When I import this package I will receive this error and the app can work when I don't import this package.

The packages I am using are:

  cupertino_icons: ^1.0.2
  flutter_lints: ^2.0.0
  collection:
  intl: ^0.17.0
  image: ^4.0.15
  universal_html: ^2.0.8
  google_fonts: ^3.0.1
  get: ^4.6.5
  mongo_dart: ^0.9.1
  url_strategy: ^0.2.0
  flutter_easyloading: ^3.0.5
  font_awesome_flutter: ^10.3.0
  shared_preferences: ^2.0.17
  syncfusion_flutter_datagrid: ^20.4.52
  dart_jsonwebtoken: ^2.6.1

I tried to import all these packages and an error will happen when importing the mongo_dart.

chasanpro wrote this answer on 2023-03-18

same happening with me while using the mongo_dart
the package is having the conflict issues it seems

chasanpro wrote this answer on 2023-03-18

image

I tried this and the build was successful
simplyKarthic wrote this answer on 2023-03-18

please remove ^ in the basic_utils: ^5.3.0 and do basic_utils: 5.3.0 this is currently working

stuartmorgan wrote this answer on 2023-03-18

Please post any further discussion in Ephenodrom/Dart-Basic-Utils#84 rather than in this closed issue.

I am not using the basic_utils package why do I face this error?
Or this package was required in some package that I am using?

Yes, anyone with this error has a dependency on basic_utils, either direct or transitive.

marcellocamara wrote this answer on 2023-03-19

I'm with the same problem, can't compile and using only this dependencies:

dart_frog: ^0.3.4
mongo_dart: ^0.9.1

Look this issue: mongo-dart/mongo_dart#327

MazenCoder wrote this answer on 2023-03-19

You can override the package
dependency_overrides: basic_utils: "5.3.0"

More Details About Repo
Owner Name flutter
Repo Name flutter
Full Name flutter/flutter
Language Dart
Created Date 2015-03-06
Updated Date 2023-03-30
Star Count 151602
Watcher Count 3555
Fork Count 25000
Issue Count 11498

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date