amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

PlatformException in getPermissionStatus (Android)

Open eslavyansky opened this issue 1 year ago • 3 comments

Description

The issue occurs exclusively on Android when push notification permissions have not yet been granted. On iOS, or on Android where permissions are already granted, everything works fine. All other functions of the library are functioning properly without any issues.

Categories

  • [ ] Analytics
  • [ ] API (REST)
  • [ ] API (GraphQL)
  • [ ] Auth
  • [ ] Authenticator
  • [ ] DataStore
  • [X] Notifications (Push)
  • [ ] Storage

Steps to Reproduce

firebase_core: ^3.4.0
amplify_flutter: ^2.4.1
amplify_auth_cognito: ^2.4.1
amplify_push_notifications_pinpoint: ^2.4.1
await Firebase.initializeApp(
  options: DefaultFirebaseOptions.currentPlatform,
);

final auth = AmplifyAuthCognito();
final push = AmplifyPushNotificationsPinpoint();

await Amplify.addPlugins([auth, push]);
await Amplify.configure(config);

final status = await Amplify.Notifications.Push.getPermissionStatus(); // <<--
safePrint(status);
D/ProfileInstaller(  709): Installing profile for ...
I/FirebaseApp(  709): Device unlocked: initializing all Firebase APIs for app [DEFAULT]
I/flutter (  709): ERROR | MyApp      | An error occurred configuring Amplify: PlatformException(channel-error, Unable to establish connection on channel., null, null)

Screenshots

No response

Platforms

  • [ ] iOS
  • [X] Android
  • [ ] Web
  • [ ] macOS
  • [ ] Windows
  • [ ] Linux

Flutter Version

3.22.3

Amplify Flutter Version

2.4.1

Deployment Method

Custom Pipeline

Schema

No response

eslavyansky avatar Sep 17 '24 16:09 eslavyansky