diff --git a/packages/analytics/amplify_analytics_pinpoint/example/integration_test/no_unauth_test.dart b/packages/analytics/amplify_analytics_pinpoint/example/integration_test/no_unauth_test.dart index acc857310c..54f05b038e 100644 --- a/packages/analytics/amplify_analytics_pinpoint/example/integration_test/no_unauth_test.dart +++ b/packages/analytics/amplify_analytics_pinpoint/example/integration_test/no_unauth_test.dart @@ -14,7 +14,9 @@ import 'utils/mock_secure_storage.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - group('unathenticated access restricted', () { + group( + 'Amplify.configure should complete even when unauthenticated access is disabled.', + () { tearDown(Amplify.reset); for (final environmentName in const [ @@ -34,7 +36,7 @@ void main() { ]); await expectLater( Amplify.configure(amplifyEnvironments[environmentName]!), - throwsA(isA()), + completes, ); }); } diff --git a/packages/analytics/amplify_analytics_pinpoint_dart/lib/src/analytics_plugin_impl.dart b/packages/analytics/amplify_analytics_pinpoint_dart/lib/src/analytics_plugin_impl.dart index 236d72ddf0..14330b3747 100644 --- a/packages/analytics/amplify_analytics_pinpoint_dart/lib/src/analytics_plugin_impl.dart +++ b/packages/analytics/amplify_analytics_pinpoint_dart/lib/src/analytics_plugin_impl.dart @@ -128,7 +128,11 @@ class AmplifyAnalyticsPinpointDart extends AnalyticsPluginInterface { _endpointClient = analyticsClient.endpointClient; _eventClient = analyticsClient.eventClient; - await _endpointClient.updateEndpoint(); + try { + await _endpointClient.updateEndpoint(); + } on Exception catch (e) { + _logger.warn('Could not update endpoint: $e'); + } _sessionManager = SessionManager( fixedEndpointId: _endpointClient.fixedEndpointId,