Aws PinpointAnalytics sdk failed to initialize
Description
when trying to add pinpointAnalytics to my app I get an error saying Cannot initialize Pinpoint SDK java.lang.NullPointerException: The credentialsProvider provided must not be null.
I am using the developer preview of Amplify flutter package
Categories
- [X] Analytics
- [ ] API (REST)
- [ ] API (GraphQL)
- [ ] Auth
- [ ] Authenticator
- [ ] DataStore
- [ ] Storage
Steps to Reproduce
- initialize pinpoint analytics in a flutter app
Screenshots


Platforms
- [X] iOS
- [X] Android
- [ ] Web
- [ ] macOS
- [ ] Windows
- [ ] Linux
Android Device/Emulator API Level
API 32+
Environment
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.22621.382], locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.16)
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.70.2)
[✓] Connected device (4 available)
[✓] HTTP Host Availability
• No issues found!
Dependencies
Dart SDK 2.17.5
Flutter SDK 3.0.3
socale 1.0.0+1
dependencies:
- amplify_analytics_pinpoint 1.0.0-next.0 [amplify_analytics_pinpoint_android amplify_analytics_pinpoint_ios amplify_core aws_common flutter meta]
- amplify_api 1.0.0-next.0+1 [amplify_api_android amplify_api_ios amplify_core amplify_flutter aws_common collection flutter meta plugin_platform_interface]
- amplify_auth_cognito 1.0.0-next.0+4 [amplify_auth_cognito_android amplify_auth_cognito_dart amplify_auth_cognito_ios amplify_core amplify_flutter amplify_secure_storage async flutter flutter_web_plugins meta path plugin_platform_interface]
- amplify_datastore 1.0.0-next.0 [flutter amplify_datastore_plugin_interface amplify_core plugin_platform_interface meta collection async]
- amplify_flutter 1.0.0-next.0+1 [amplify_core amplify_datastore_plugin_interface amplify_flutter_android amplify_flutter_ios amplify_secure_storage aws_common collection flutter meta plugin_platform_interface]
- amplify_secure_storage 0.1.0 [amplify_secure_storage_dart flutter]
- amplify_storage_s3 1.0.0-next.0 [amplify_storage_s3_android amplify_storage_s3_ios amplify_core aws_common flutter meta plugin_platform_interface]
- animations 2.0.3 [flutter]
- aws_common 0.2.2 [async collection http logging meta stream_transform uuid]
- aws_signature_v4 0.2.1 [async aws_common collection convert crypto http json_annotation meta path]
- cupertino_icons 1.0.5
- encrypt 5.0.1 [args asn1lib clock collection crypto pointycastle]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_chat_types 3.4.5 [equatable json_annotation meta]
- flutter_chat_ui 1.6.4 [diffutil_dart equatable flutter flutter_chat_types flutter_link_previewer flutter_parsed_text intl meta photo_view url_launcher visibility_detector]
- flutter_dotenv 5.0.2 [flutter]
- flutter_image_compress 1.1.1 [flutter]
- flutter_launcher_icons 0.10.0 [args checked_yaml cli_util image json_annotation path yaml]
- flutter_riverpod 2.0.0-dev.9 [collection flutter meta riverpod state_notifier]
- flutter_svg 1.1.4 [flutter meta path_drawing vector_math xml]
- get 4.6.5 [flutter]
- get_it 7.2.0 [async collection]
- google_fonts 3.0.1 [flutter http path_provider crypto]
- hive 2.2.3 [meta crypto]
- hive_flutter 1.1.0 [flutter hive path_provider path]
- image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface]
- injectable 1.5.3 [get_it]
- path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- pin_code_fields 7.4.0 [flutter]
- provider 6.0.3 [collection flutter nested]
transitive dependencies:
- amplify_analytics_pinpoint_android 1.0.0-next.0 [flutter]
- amplify_analytics_pinpoint_ios 1.0.0-next.0 [flutter]
- amplify_api_android 1.0.0-next.0 [flutter]
- amplify_api_ios 1.0.0-next.0 [amplify_core flutter]
- amplify_auth_cognito_android 1.0.0-next.0+1 [flutter]
- amplify_auth_cognito_dart 0.1.5 [amplify_core amplify_secure_storage_dart async aws_common aws_signature_v4 built_collection built_value collection convert crypto fixnum http intl js json_annotation meta oauth2 path smithy smithy_aws stream_transform uuid worker_bee]
- amplify_auth_cognito_ios 1.0.0-next.0+1 [amplify_core flutter]
- amplify_core 1.0.0-next.0 [async aws_common aws_signature_v4 collection http intl json_annotation logging meta uuid]
- amplify_datastore_plugin_interface 1.0.0-next.0 [amplify_core collection flutter meta]
- amplify_flutter_android 1.0.0-next.0 [flutter]
- amplify_flutter_ios 1.0.0-next.0 [amplify_core flutter]
- amplify_secure_storage_dart 0.1.0 [aws_common built_collection built_value ffi js meta win32 worker_bee]
- amplify_storage_s3_android 1.0.0-next.0 [flutter]
- amplify_storage_s3_ios 1.0.0-next.0 [flutter]
- archive 3.1.11 [crypto path]
- args 2.3.1
- asn1lib 1.1.0
- async 2.8.2 [collection meta]
- built_collection 5.1.1
- built_value 8.4.0 [built_collection collection fixnum meta]
- characters 1.2.0
- charcode 1.3.1
- checked_yaml 2.0.1 [json_annotation source_span yaml]
- cli_util 0.3.5 [meta path]
- clock 1.1.0
- collection 1.16.0
- convert 3.0.2 [typed_data]
- crclib 3.0.0 [meta tuple]
- cross_file 0.3.3+1 [js meta]
- crypto 3.0.1 [collection typed_data]
- csslib 0.17.2 [source_span]
- diffutil_dart 3.0.0
- equatable 2.0.3 [collection meta]
- ffi 2.0.1
- file 6.1.2 [meta path]
- fixnum 1.0.1
- flutter_link_previewer 3.0.1 [flutter flutter_chat_types flutter_linkify html http linkify meta url_launcher]
- flutter_linkify 5.0.2 [flutter linkify]
- flutter_parsed_text 2.2.1 [flutter]
- flutter_plugin_android_lifecycle 2.0.7 [flutter]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- html 0.15.0 [csslib source_span]
- http 0.13.5 [async http_parser meta path]
- http_parser 4.0.1 [collection source_span string_scanner typed_data]
- image 3.2.0 [archive meta xml]
- image_picker_android 0.8.5+2 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface]
- image_picker_ios 0.8.5+6 [flutter image_picker_platform_interface]
- image_picker_platform_interface 2.6.1 [cross_file flutter http plugin_platform_interface]
- intl 0.17.0 [clock path]
- js 0.6.4
- json_annotation 4.6.0 [meta]
- linkify 4.1.0
- logging 1.0.2
- matcher 0.12.11 [stack_trace]
- material_color_utilities 0.1.4
- meta 1.7.0
- nested 1.0.0 [flutter]
- oauth2 2.0.0 [collection crypto http http_parser]
- path 1.8.1
- path_drawing 1.0.1 [vector_math meta path_parsing flutter]
- path_parsing 1.0.1 [vector_math meta]
- path_provider_android 2.0.19 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.11 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.6 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface]
- path_provider_windows 2.1.2 [ffi flutter path path_provider_platform_interface win32]
- petitparser 5.0.0 [meta]
- photo_view 0.14.0 [flutter]
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- pointycastle 3.6.1 [collection convert js]
- process 4.2.4 [file path platform]
- quiver 3.1.0 [matcher]
- retry 3.1.0
- riverpod 2.0.0-dev.9 [collection meta stack_trace state_notifier]
- shelf 1.3.2 [async collection http_parser path stack_trace stream_channel]
- sky_engine 0.0.99
- smithy 0.1.0 [aws_common built_collection built_value collection convert crypto fixnum http http_parser intl json_annotation meta path retry shelf typed_data xml]
- smithy_aws 0.1.1 [aws_common aws_signature_v4 built_collection built_value collection crclib http intl json_annotation meta path smithy xml]
- source_span 1.8.2 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- state_notifier 0.7.2+1 [meta]
- stream_channel 2.1.0 [async]
- stream_transform 2.0.0
- string_scanner 1.1.0 [charcode source_span]
- term_glyph 1.2.0
- tuple 2.0.0 [quiver]
- typed_data 1.3.0 [collection]
- url_launcher 6.1.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- url_launcher_android 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.1.0 [flutter plugin_platform_interface]
- url_launcher_web 2.0.13 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface]
- uuid 3.0.6 [crypto]
- vector_math 2.1.2
- visibility_detector 0.3.3 [flutter]
- win32 2.7.0 [ffi]
- worker_bee 0.1.0 [async aws_common built_collection built_value collection js meta path stack_trace stream_channel stream_transform]
- xdg_directories 0.2.0+1 [meta path process]
- xml 6.1.0 [collection meta petitparser]
- yaml 3.1.1 [collection source_span string_scanner]
Device
Pixel 5 - API 33
OS
Android Api 33
Deployment Method
Amplify CLI
CLI Version
9.2.1
Additional Context
No response
Amplify Config
const amplifyconfig = ''' {
"UserAgent": "aws-amplify-cli/2.0",
"Version": "1.0",
"analytics": {
"plugins": {
"awsPinpointAnalyticsPlugin": {
"pinpointAnalytics": {
"appId": "",
"region": ""
},
"pinpointTargeting": {
"region": ""
}
}
}
},
"api": {
"plugins": {
"awsAPIPlugin": {
"socale": {
"endpointType": "GraphQL",
"endpoint": "",
"region": "",
"authorizationType": "API_KEY",
"apiKey": ""
}
}
}
},
"auth": {
"plugins": {
"awsCognitoAuthPlugin": {
"UserAgent": "aws-amplify-cli/0.1.0",
"Version": "0.1.0",
"IdentityManager": {
"Default": {}
},
"AppSync": {
"Default": {
"ApiUrl": "",
"Region": "",
"AuthMode": "API_KEY",
"ApiKey": "",
"ClientDatabasePrefix": "API_KEY"
},
"socale_AWS_IAM": {
"ApiUrl": "",
"Region": "",
"AuthMode": "AWS_IAM",
"ClientDatabasePrefix": "AWS_IAM"
}
},
"CredentialsProvider": {
"CognitoIdentity": {
"Default": {
"PoolId": "",
"Region": ""
}
}
},
"CognitoUserPool": {
"Default": {
"PoolId": "",
"AppClientId": "",
"Region": ""
}
},
"GoogleSignIn": {
"Permissions": "email,profile,openid",
"ClientId-WebApp": ""
},
"FacebookSignIn": {
"AppId": "",
"Permissions": "public_profile"
},
"Auth": {
"Default": {
"OAuth": {
"WebDomain": "",
"AppClientId": "",
"SignInRedirectURI": "",
"SignOutRedirectURI": "",
"Scopes": [
"phone",
"email",
"openid",
"profile",
"aws.cognito.signin.user.admin"
]
},
"authenticationFlowType": "USER_SRP_AUTH",
"socialProviders": [
"FACEBOOK",
"GOOGLE",
"APPLE"
],
"usernameAttributes": [
"EMAIL"
],
"signupAttributes": [
"EMAIL"
],
"passwordProtectionSettings": {
"passwordPolicyMinLength": 8,
"passwordPolicyCharacters": []
},
"mfaConfiguration": "OFF",
"mfaTypes": [
"SMS"
],
"verificationMechanisms": [
"EMAIL"
]
}
},
"PinpointAnalytics": {
"Default": {
"AppId": "",
"Region": "us-west-2"
}
},
"PinpointTargeting": {
"Default": {
"Region": "us-west-2"
}
},
"S3TransferUtility": {
"Default": {
"Bucket": "",
"Region": "us-west-2"
}
}
}
}
},
"storage": {
"plugins": {
"awsS3StoragePlugin": {
"bucket": "-dev",
"region": "us-west-2",
"defaultAccessLevel": "guest"
}
}
}
}''';
@bibaswan-bhawal Thanks for posting this issue! We are looking into it.
Hi @bibaswan-bhawal is this issue resolved for you now? We pushed in a fix a while ago so looking to close this issue.
Hi @bibaswan-bhawal I'll close this issue for now as we released the fix and haven't heard any further problems related to this issue. Feel free to comment or open again if you're still dealing with this. Thanks!