Closed marc-farre closed 1 year ago
@funkycram Hmm, push notification with the last app version via push.humhub.com still works for me. I'll keep investigating, there may be a problem here with the FCM Push Module.
I'm also not having any issues with the push services, it's rather strange that it works for some but not all, possible PHP extension missing?
Thanks for your answers. Tested with the Community instance (I've created a Testing account which could be hidden) and 2 others on Android, Chrome, Brave, Linux and Windows OS, I don't receive the notifications anymore. Tested also to reinstall the module. In all my tests, I made it work twice with a comment, nether with "Like".
Mobile is checked on my account:
And notifications are allowed:
If everything's working well on your side, I'll close the issue. Maybe a problem on my side. But in that case, I don't know how to solve https://github.com/humhub/app/issues/87 and https://github.com/humhub/app/issues/86
@funkycram I currently have problems here as well and am currently testing.
With the FCM Push module version Beta.3 there is a link "Mobile App Debug" in the module settings at the very bottom right.
On this page you can trigger test notifications, view a list of devices push tokens registered for the current user and force the app to re-register the push token.
But currently I don't get push notifications either.
Thanks. Nice to have a debug option! I'll try to take more time for testing as soon as possible (not sure when).
@funkycram I'm working on this right now, I'll let you know as soon as I have any new findings.
@funkycram If you have time, please try it again with the latest app version (.63) and the FCM Push module (Beta4). Thanks!
Thanks very much @luke- ! Just tested with php 8.2 on the server and I have this bug just after submitting the Humhub instance URL:
2023-07-13 16:06:46
[90.30.6.26][-][mnduv8dr7a9ma2gi0rfv7tgcja][error][Error] Error: Call
to a member function getSenderId() on null in
/var/www/humhub/protected/modules/fcm-push/Events.php:65
Stack trace:
#0 [internal function]:
humhub\modules\fcmPush\Events::onServiceWorkerControllerInit()
#1
/var/www/humhub/protected/vendor/yiisoft/yii2/base/Event.php(312):
call_user_func()
#2
/var/www/humhub/protected/vendor/yiisoft/yii2/base/Component.php(642):
yii\base\Event::trigger()
#3
/var/www/humhub/protected/humhub/components/Controller.php(97):
yii\base\Component->trigger()
#4
/var/www/humhub/protected/vendor/yiisoft/yii2/base/BaseObject.php(109):
humhub\components\Controller->init()
#5
/var/www/humhub/protected/vendor/yiisoft/yii2/base/Controller.php(95):
yii\base\BaseObject->__construct()
#6 [internal function]: yii\base\Controller->__construct()
#7
/var/www/humhub/protected/vendor/yiisoft/yii2/di/Container.php(411):
ReflectionClass->newInstanceArgs()
#8
/var/www/humhub/protected/vendor/yiisoft/yii2/di/Container.php(170):
yii\di\Container->build()
#9
/var/www/humhub/protected/vendor/yiisoft/yii2/BaseYii.php(345):
yii\di\Container->get()
#10
/var/www/humhub/protected/vendor/yiisoft/yii2/base/Module.php(607):
yii\BaseYii::createObject()
#11
/var/www/humhub/protected/vendor/yiisoft/yii2/base/Module.php(612):
yii\base\Module->createController()
#12
/var/www/humhub/protected/vendor/yiisoft/yii2/base/Module.php(546):
yii\base\Module->createController()
#13
/var/www/humhub/protected/vendor/yiisoft/yii2/web/Application.php(103):
yii\base\Module->runAction()
#14
/var/www/humhub/protected/vendor/yiisoft/yii2/base/Application.php(384):
yii\web\Application->handleRequest()
#15 /var/www/humhub/index.php(25):
yii\base\Application->run()
#16 {main}
I'm missing time to try debugging, sorry.
@funkycram Thanks for testing. I've just released fcm push beta 5 which should solve the problem.
Thanks @luke- I've tested again and I still cannot make push notification work (Browser and app) with Humhub 1.14.2 and fcm push beta 5 (Install Id starts with 66a07341). If you think the problem is on my side, I'll test more with the Community instance and another Humhub instance (developer branch).
Tested on Humhub develop branch latest version. No notification. I cannot make work anything on the debug page:
An idea of what I could do to help finding the problem?
My settings:
@funkycram Thanks for the details.
It is important to note that our push service only works for the mobile app and NOT for the browser notifications.
The mobile app should always automatically register a push token after a user login (with the current FCM module). So please try to log out of the app and log in again.
After that the message "No regsitered Push Tokens should disappear"
Oh, sorry, I didn't take time to read that the Push service was only for the mobile app... Maybe we could rename the titles?
However, I had also tried with the mobile app v1.0.63 on Android 10 and I tried again now with Humhub 1.14.2 and Humhub develop branch latest version. I always have "App Detection - Current Request: NO App Request Detected" even just after a user login.
I've tested also with the Community instance: notifications works well, I receive them via the mobile app.
I noticed that (not sure it can explain the problem):
So now I've understand that we need both Push service AND Firebase, I've tested again with Firebase configured and I receive the mobile notifications well now.
So new title suggestions:
The app behavior is alright: when closing / reopening the app, I stay logged in, and if I log out I can change the URL of the Humhub instance.
But strangely, I still have "App Detection - Current Request: NO App Request Detected" even after user login.
If I click on the "Trigger "HumHub Update" notification" button it works well, but if I click on other buttons, I have "Could not send message! ..."
So now I've understand that we need both Push service AND Firebase, I've tested again with Firebase configured and I receive the mobile notifications well now.
So new title suggestions:
- Push Service (Beta) -> Push Service (required for the mobile app) (Beta)
- Firebase Cloud Messaging -> Firebase Cloud Messaging (required for mobile notifications)
Ok good point!
But strangely, I still have "App Detection - Current Request: NO App Request Detected" even after user login.
If I click on the "Trigger "HumHub Update" notification" button it works well, but if I click on other buttons, I have "Could not send message! ..."
If you using the App, the App Detection says "NO App request Detected"? Maybe it's also a bit misleading. It checks if the current requests comes from the mobile app.
OK, so everything's fine now! I haven't seen you've already renamed the titles... But https://github.com/humhub/fcm-push/issues/26 can still be useful for the changelog and the conversion from links to buttons because the first time we see this config page it's not obvious the links are cliquables (because of the black color and in a list).
Tested with 2 instances and 2 devices (mobile and desktop). Was working well before.
Module version 2.0.0-beta.1 Method: Push Service (Beta) with https://push.humhub.com/site/index