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

Alert if the Humhub instance is not ready for the mobile app #98

Closed
marc-farre opened this issue Jul 16, 2023 · 16 comments
Closed

Alert if the Humhub instance is not ready for the mobile app #98

marc-farre opened this issue Jul 16, 2023 · 16 comments
Milestone

Comments

@marc-farre
Copy link
Collaborator

After validating the Humhub instance URL, some requirement checks could be done:

  • Humhub minimal version
  • Push Notifications module enabled
  • Push Service is configured and working
  • Firebase Cloud Messaging is configured and working
  • Others checks?

In case of a problem found:

  • Show an alert on the mobile app
  • Or show an alert on the mobile app only if logged in as an admin
  • Or throw an error on Humhub log
@luke-
Copy link
Collaborator

luke- commented Jul 17, 2023

Good point, even features that the URL dialog is no longer displayed after a login until logout is currently a feature that comes via the Push Notifications module.

For the first, I think about adding a point in the "Prerequisites" page first:
Mobile App - Push Notifications and Support (Optional) - Install FCM Module

Later we can integrate some code (Login&Login, ..) directly into the core.

@felixhahnweilheim
Copy link

felixhahnweilheim commented Oct 12, 2023

  • PrettyUrls

should also be checked with this point as it seems to be required

@luke- luke- added this to the v1.0 milestone Nov 21, 2023
@luke-
Copy link
Collaborator

luke- commented Nov 21, 2023

@marc-farre @felixhahnweilheim Do you know any public HumHub installation without PrettyURLs?

It would be good if we could detect this in the app and then display an error in the app such as "The selected HumHub installation does not meet the app requirements. Please contact the operator of the HumHub installation."

@felixhahnweilheim
Copy link

No, it was just a testing/development instance.
I just mentioned it because the error message is confusing: "The HumHub installation does not exist." (Although it works in the browser and PWA.)
So the easiest solution would be to change the message to "... does not exist or does not meet the app requirements "

@ArchBlood
Copy link

An easy solution would also be to mention this in the help section, for those that try the app without looking at the checkers for the requirements, we could also link to the docs for those that don't understand what PrettyUrls means.

@marc-farre
Copy link
Collaborator Author

detect this in the app

Yes!

public HumHub installation without PrettyURLs

I will send you an URL in a private message.

@PrimozRatej
Copy link
Collaborator

  • PrettyUrls

should also be checked with this point as it seems to be required

Issue: #143

@marc-farre
Copy link
Collaborator Author

@luke- I don't think this issue has been resolved.

The idea would be to display an alert, maybe when logging in as an admin, if the HumHub instance needs to be configured for the mobile app to work correctly.

E.g.: https://community.humhub.com/content/perma?id=278518

@luke-
Copy link
Collaborator

luke- commented Jun 2, 2024

@marc-farre Didn't we added checks for the AppPush service in the Selftest?

@ArchBlood
Copy link

@marc-farre Didn't we added checks for the AppPush service in the Selftest?

Yes, this was done in both the master and develop branches in their own ways;

Master

https://github.com/humhub/humhub/blob/81628659a3bd54a1ca53582a5ea70f30cad9b1f3/protected/humhub/libs/SelfTest.php#L847-L866

Develop

https://github.com/humhub/humhub/blob/a4106dd8329d2aac3d9313e4f7a55b595dd7edd3/protected/humhub/libs/SelfTest.php#L854-L871

@marc-farre
Copy link
Collaborator Author

@luke- @ArchBlood Thanks for this reminder!

However:

  1. If in the Push Notifications configuration, I leave the "API Key" and "Service Account (JSON file)" fields blank, in the Prerequisites, I have "HumHub - Mobile App - Push Service" green.
  2. We can test "Mobile App Debug" ->"App Detection - Current Request" only from the mobile app.

Problem: The app is very easy to install, but the procedure to make the HumHub instance work well with it is complex (see https://community.humhub.com/s/installation-and-setup/wiki/224/Mobile+app+%26+Push+notifications), and nobody knows it really.

Idea:

  • The prerequisites should check if the API key and JSON (from the Push Notifications module configuration) are really working.
  • When launching the app from an admin account, the app should check if:
    • the "HumHub - Mobile App - Push Service" self test is fine
    • the App is detected from the Push Notifications module

If the app detects a configuration issue on the HumHub instance, a warning should give the link to the official documentation page which explains what to do.

@luke-
Copy link
Collaborator

luke- commented Jun 3, 2024

@marc-farre Sounds good, so let's try to:

Agree?

@marc-farre
Copy link
Collaborator Author

@luke- Yes, that would be very good!

Shouldn't it be coded in the app?
Because if we don't install the PCM module, we won't have any warning.

@luke-
Copy link
Collaborator

luke- commented Jun 4, 2024

@marc-farre Ok, right, then we have to implement the check in the app. Then we do the following.

A.) Provide a controller action in the fcm-push module to query the configuration. /fcm-push/check-push-status. 404 = Module Not Installed; 200 = Ok; 501 = Not Configured.

B.) The app queries the route, if the status is not 200, there is a warning after the opener. (For all users). Warning: The server is not configured for the mobile app and push notification and possibly other functions are not available.

Should we implement this way?

@marc-farre
Copy link
Collaborator Author

I think that would be perfect

@luke-
Copy link
Collaborator

luke- commented Jun 4, 2024

New issue here: #188

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

5 participants