Closed 04tushar closed 3 years ago
Can you provide any more info?
This is the only piece of code calling getPackageName()
and context
is being null checked to prevent this.
https://github.com/britannio/in_app_review/blob/master/in_app_review/android/src/main/java/dev/britannio/in_app_review/InAppReviewPlugin.java#L200-L209
Below is the code we integrated into our app:
final InAppReview _inAppReview = InAppReview.instance; String _appStoreId = ''; String _microsoftStoreId = ''; bool _isAvailable;
@override void initState() { super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
_inAppReview
.isAvailable()
.then(
(bool isAvailable) => setState(
() => _isAvailable = isAvailable && !Platform.isAndroid,
),
)
.catchError((_) => setState(() => _isAvailable = false));
});
}
void _setAppStoreId(String id) => _appStoreId = id;
void _setMicrosoftStoreId(String id) => _microsoftStoreId = id;
Future
Future
Did Crashlytics provide any more info like a stacktrace? Do you understand what the code you copied is doing? Are you making a Windows app with Flutter?
Without further information, I'm not sure how I can help or if there's even anything that I need to do. Is there only one event in Crashlytics or are there many. Do they follow a pattern?
Please find below stacktrace :
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
at android.content.ComponentName.
We are build android app with flutter.
Thanks for the stacktrace! I've found a potential cause for this and I'll release a fix shortly.
I've just released in_app_review: 2.0.1-dev
ok
Getting below error while upgrading version of the plugin:
Because in_app_review >=2.0.1 depends on in_app_review_platform_interface ^2.0.2 which depends on plugin_platform_interface ^2.0.0, in_app_r eview >=2.0.1 requires plugin_platform_interface ^2.0.0. And because speech_to_text_platform_interface 1.4.2 depends on plugin_platform_interface ^1.0.1 and no versions of speech_to_text_platform_i nterface match >1.4.2 <2.0.0, in_app_review >=2.0.1 is incompatible with speech_to_text_platform_interface ^1.4.2. And because speech_to_text 3.1.0 depends on speech_to_text_platform_interface ^1.4.2 and no versions of speech_to_text match >3.1.0 <4.0.0, in_app_review >=2.0.1 is incompatible with speech_to_text ^3.1.0. So, because stage_flutter depends on both speech_to_text ^3.1.0 and in_app_review ^2.0.1, version solving failed.
@04tushar https://github.com/csdcorp/speech_to_text/issues/179 this is the issue.
We are getting the above logs in Firebase Crashlytics as fatal issue.