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

[native_dio_adapter] Exception fetching LoggerImpl class #1116

Open
JCKodel opened this issue Jan 14, 2024 · 0 comments
Open

[native_dio_adapter] Exception fetching LoggerImpl class #1116

JCKodel opened this issue Jan 14, 2024 · 0 comments
Assignees
Labels
package:cronet_http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@JCKodel
Copy link

JCKodel commented Jan 14, 2024

This code:

final engine = CronetEngine.build(
  cacheMode: CacheMode.memory,
  cacheMaxSize: 2 * 1024 * 1024,
  userAgent: 'Book Agent',
);

final httpClient = CronetClient.fromCronetEngine(engine);

final response = httpClient
    .get(
      Uri.https('google.com'),
    )
    .then((response) => print(response.statusCode));

Issues this error:

D/EGL_emulation( 6658): app_time_stats: avg=2570.07ms min=2570.07ms max=2570.07ms count=1
E/hy      ( 6658): Exception fetching LoggerImpl class
E/hy      ( 6658): java.lang.ClassNotFoundException: Didn't find class "com.google.net.cronet.telemetry.CronetLoggerImpl" on path: DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/0000002d/CronetDynamite.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/0000002d/CronetDynamite.apk!/lib/x86_64, /data/user_de/0/com.google.android.gms/app_chimera/m/0000002d/CronetDynamite.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
E/hy      ( 6658): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
E/hy      ( 6658): 	at dalvik.system.DelegateLastClassLoader.loadClass(DelegateLastClassLoader.java:199)
E/hy      ( 6658): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/hy      ( 6658): 	at org.chromium.net.impl.CronetUrlRequestContext.<init>(:com.google.android.gms.dynamite_cronetdynamite@234914041@23.49.14 (190800-0):90)
E/hy      ( 6658): 	at org.chromium.net.impl.NativeCronetEngineBuilderImpl.build(:com.google.android.gms.dynamite_cronetdynamite@234914041@23.49.14 (190800-0):14)
E/hy      ( 6658): 	at org.chromium.net.CronetEngine$Builder.build(CronetEngine.java:313)
D/EGL_emulation( 6658): app_time_stats: avg=2094.41ms min=2094.41ms max=2094.41ms count=1
I/flutter ( 6658): 200

But the result is successfully retrieved (copy from cfug/dio#2096)

Cronet_http version: ^1.0.0

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.7, on Microsoft Windows [Version 10.0.22631.3007], locale pt-BR)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.3)
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.85.1)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!
@JCKodel JCKodel added package:cronet_http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:cronet_http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants