-
Notifications
You must be signed in to change notification settings - Fork 249
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
Datastore configuration issue #5116
Comments
@Sushil787 sorry that you are facing this issue, Can you please share your amplifyconfiguration.dart with any sensitive info removed? Also what version of Amplify CLI do you use? |
@NikaHsn This is the amplifyConfiguration.dart |
thank @Sushil787. we will look into this and get back to you with any updates. |
@Sushil787, I used the below is the ConfigurationError I got when using the
|
Hi @NikaHsn , I have a similar error:
IOS doesn't have this error, works fine. This error only appears on ANDROID (emulator PHONE API 34). this error happened when use with this packages : amplify_analytics_pinpoint: 2.2.0 but using previous versions, this error don't appears: amplify_analytics_pinpoint: 2.1.0 ============================================ [✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale es-CO) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.2) [✓] VS Code (version 1.91.0) [✓] Connected device (4 available) [✓] Network resources Kind Regards |
|
@NikaHsn i also recently tested for IOS and it's working fine but for android it's not working !! |
I'm not very experienced but could it be a problem with the latest version of Amplify cli? |
Hi @Sushil787, @jamontesg, @Williamjr23, I was able to reproduce the issue and am working to determine the root cause now. |
Hi @Sushil787, @jamontesg, @Williamjr23, the fix for this has been released. Please upgrade your |
in 2.4.2 same error |
the same issue. in android, after I pressed the 'return' button on the phone and re-launch it, this will happend. before I run Amplify.configure(amplifyconfig), I check print("before config amplify: ${Amplify.isConfigured}"); this is false, but when the Amplify.configure is running , I can see the printed out: E/amplify:flutter:datastore( 6620): Amplify has already been configured. |
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'Map<dynamic, dynamic>' in type cast |
Description
DatasStore configuration issue :
AWS Amplify with flutter :
I'm facing an issue while configuring Amplify DataStore in my Flutter app. The error I'm encountering is:
It seems like there might be an issue with the DataStore configuration or possibly with the plugins. Has anyone else faced a similar issue? Any insights or solutions would be greatly appreciated!
API,AUTH is configuring with no issue .
PS: I have followed as documentation and did researched too .
code snippets are provided in snapshot .
Unhandled Exception: type 'Null' is not a subtype of type 'Map<dynamic, dynamic>' in type cast this is from package amplify core and datastore as exception is expecting map of exception value but got null.
if (e.code == 'AmplifyException') {
throw AmplifyException.fromMap(
Map<String, String>.from(e.details as Map),
);
But, with no exception message !!
}
here is my generated model provider :
/*
*/
// NOTE: This file is generated and may not follow lint rules defined in your app
// Generated files can be excluded from analysis in analysis_options.yaml
// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis
// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, override_on_non_overriding_member, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously
package used:
Categories
Steps to Reproduce
Screenshots
Platforms
Flutter Version
3.19.6
Amplify Flutter Version
2.2.0
Deployment Method
Amplify CLI
Schema
The text was updated successfully, but these errors were encountered: