Skip to content
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

PlatformException in getPermissionStatus (Android) #5475

Open
2 of 14 tasks
eslavyansky opened this issue Sep 17, 2024 · 3 comments
Open
2 of 14 tasks

PlatformException in getPermissionStatus (Android) #5475

eslavyansky opened this issue Sep 17, 2024 · 3 comments
Assignees
Labels
pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. pending-community-response Pending response from the issue opener or other community members push notifications question A question about the Amplify Flutter libraries to-be-reproduced Issues that have not been reproduced yet, but have reproduction steps provided

Comments

@eslavyansky
Copy link

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
  • 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
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.22.3

Amplify Flutter Version

2.4.1

Deployment Method

Custom Pipeline

Schema

No response

@github-actions github-actions bot added pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Sep 17, 2024
@Equartey
Copy link
Member

Hi @eslavyansky, thanks for taking time to submit this issue.

Am I understanding correctly that calling final status = await Amplify.Notifications.Push.getPermissionStatus(); on Android when permissions are not granted is returning that error log, but it's working on iOS when no permissions are granted?

If so, we'll try to reproduce it to find the issue and provide an update here.

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Sep 17, 2024
@eslavyansky
Copy link
Author

Hi @Equartey. Yes, that's correct. We would be very grateful to you.

@github-actions github-actions bot added the pending-maintainer-response Pending response from a maintainer of this repository label Sep 18, 2024
@Equartey Equartey removed the pending-maintainer-response Pending response from a maintainer of this repository label Sep 18, 2024
@Equartey Equartey added the to-be-reproduced Issues that have not been reproduced yet, but have reproduction steps provided label Sep 19, 2024
@tyllark
Copy link
Member

tyllark commented Sep 20, 2024

Hi @eslavyansky, I've been unable to reproduce the issue on my end. Could you please provide the following to help me recreate your environment:

  • Are you using any Firebase libraries other than core? There are some Android Firebase SDK limitations when setting up multiple services.
  • Are you using a physical Android device or emulator? What is the OS version and phone model?
  • Can you please share your Android configurations
    • android/app/build.gradle (plugins block)
    • android/build.gradle (plugins block)
    • android/settings.gradle (plugins block)

@khatruong2009 khatruong2009 added the pending-community-response Pending response from the issue opener or other community members label Sep 26, 2024
@NikaHsn NikaHsn added question A question about the Amplify Flutter libraries pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. and removed pending-triage This issue is in the backlog of issues to triage labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. pending-community-response Pending response from the issue opener or other community members push notifications question A question about the Amplify Flutter libraries to-be-reproduced Issues that have not been reproduced yet, but have reproduction steps provided
Projects
None yet
Development

No branches or pull requests

5 participants