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

[Bug]: Connectivity plus making crashes in android app #3398

Open
8 tasks done
alihassan143 opened this issue Dec 16, 2024 · 4 comments
Open
8 tasks done

[Bug]: Connectivity plus making crashes in android app #3398

alihassan143 opened this issue Dec 16, 2024 · 4 comments
Labels
bug Something isn't working triage

Comments

@alihassan143
Copy link

Platform

Android 12

Plugin

connectivity_plus

Version

6.1.0

Flutter SDK

3.24.5

Steps to reproduce

getting error in android store

Code Sample

No response

Logs

Exception java.lang.OutOfMemoryError:
  at android.os.Parcel.nativeReadString16
  at android.os.Parcel.readString16NoHelper (Parcel.java:2524)
  at android.os.Parcel$ReadWriteHelper.readString16 (Parcel.java:439)
  at android.os.Parcel.readString16 (Parcel.java:2503)
  at android.os.Parcel.readString (Parcel.java:2493)
  at android.net.NetworkInfo$1.createFromParcel (NetworkInfo.java:634)
  at android.net.NetworkInfo$1.createFromParcel (NetworkInfo.java:629)
  at android.os.Parcel.readTypedObject (Parcel.java:3184)
  at android.net.IConnectivityManager$Stub$Proxy.getActiveNetworkInfo (IConnectivityManager.java:1771)
  at android.net.ConnectivityManager.getActiveNetworkInfo (ConnectivityManager.java:1515)
  at com.google.android.datatransport.cct.CctTransportBackend.decorate (CctTransportBackend.java:164)
  at com.google.android.datatransport.runtime.scheduling.DefaultScheduler.lambda$schedule$1$com-google-android-datatransport-runtime-scheduling-DefaultScheduler (DefaultScheduler.java:80)
  at com.google.android.datatransport.runtime.scheduling.DefaultScheduler$$ExternalSyntheticLambda1.run (Unknown Source:8)
  at com.google.android.datatransport.runtime.SafeLoggingExecutor$SafeLoggingRunnable.run (SafeLoggingExecutor.java:47)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:644)
  at java.lang.Thread.run (Thread.java:1012)

Flutter Doctor

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.5, on macOS 15.2 24C101 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc4)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.96.0)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

Checklist before submitting a bug

  • I searched issues in this repository and couldn't find such bug/problem
  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
@alihassan143 alihassan143 added bug Something isn't working triage labels Dec 16, 2024
@miquelbeltran
Copy link
Member

The log you provided shows an out of memory error, which could be caused by any other part of the app. The log doesn't point to any of the plugin code either.

@alihassan143
Copy link
Author

but it showing network info and connectvity adapters

@alihassan143
Copy link
Author

dev.fluttercommunity.plus.connectivity.ConnectivityBroadcastReceiver.onListen

image
image

@miquelbeltran
Copy link
Member

The log you posted and the screenshot stacktraces look different. Still, in both cases, the crash comes from Android's ConnectivityManager. If there's a memory leak that causes the out-of-memory exception, you can use https://square.github.io/leakcanary/ to find it. It could be that the leak is caused by the plugin, let us know if you find out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants