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

termux-notification-list fails to execute sometimes #662

Open
nozwock opened this issue Feb 28, 2024 · 0 comments
Open

termux-notification-list fails to execute sometimes #662

nozwock opened this issue Feb 28, 2024 · 0 comments

Comments

@nozwock
Copy link

nozwock commented Feb 28, 2024

Can't reproduce, seems to happen randomly.

NotificationService.get() is returning null sometimes?

NotificationService notificationService = NotificationService.get();
StatusBarNotification[] notifications = notificationService.getActiveNotifications();

Error

Error in ResultReturner:
java.lang.NullPointerException: Attempt to invoke virtual method 'android.service.notification.StatusBarNotification[] com.termux.api.apis.NotificationListAPI$NotificationService.getActiveNotifications()' on a null object reference
	at com.termux.api.apis.NotificationListAPI.listNotifications(NotificationListAPI.java:37)
	at com.termux.api.apis.NotificationListAPI$1.writeJson(NotificationListAPI.java:29)
	at com.termux.api.util.ResultReturner$ResultJsonWriter.writeResult(ResultReturner.java:122)
	at com.termux.api.util.ResultReturner.lambda$returnData$0(ResultReturner.java:179)
	at com.termux.api.util.ResultReturner$$ExternalSyntheticLambda0.run(Unknown Source:8)
	at java.lang.Thread.run(Thread.java:1012)

Termux

VERSION_NAME: 0.118.0+9d308c2
VERSION_CODE: 118
APK_RELEASE: Github

Termux:API

VERSION_NAME: 0.50.1+4a711e9
VERSION_CODE: 51
APK_RELEASE: Github
APT_PACKAGE_VERSION: 0.58.0-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant