HMS-Core / hms-flutter-plugin

This repo contains all of Flutter HMS plugins.
https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1
Apache License 2.0
282 stars 138 forks source link

Huawei Background Exception on Samsung and Huawei devices #305

Open yelmuratoff opened 1 year ago

yelmuratoff commented 1 year ago

Description I know that this error was earlier two years ago, it says that later in the new versions it will be fixed, but apparently it has not been fixed correctly yet, since it is already July 2023 and the error is still there. We are having the following exception which is being thrown in almost every Samsung devices. The exception is in background and doesn't crash or exit from the app. we got nearly 50k exception events in one to two weeks.

Expected behavior we expect the app not to throw a background exception.

Current behavior it throws a background exception on almost every Samsung and some Huawei devices.

Logs The exception:

Снимок экрана 2023-07-18 в 15 55 32

The affected devices: Samsung

Environment

Platform: Flutter Kit: Push Kit Version: v 6.10.0+300 Android Studio version: last (2023 July) Platform version: last (2023 July) OS Version: Android 13/12

ghost commented 1 year ago

We have the same exact error, happen on huawei phone, it seem like the context get garbage collected after some time because it is WeakReference