humhub / app

18 stars 7 forks source link

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

Closed marc-farre closed 7 months ago

marc-farre commented 11 months ago

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

In case of a problem found:

luke- commented 11 months ago

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 commented 9 months ago

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

luke- commented 7 months ago

@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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

detect this in the app

Yes!

public HumHub installation without PrettyURLs

I will send you an URL in a private message.

PrimozRatej commented 7 months ago
  • PrettyUrls

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

Issue: #143

marc-farre commented 1 month ago

@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- commented 1 month ago

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

ArchBlood commented 1 month ago

@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 commented 1 month ago

@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:

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- commented 1 month ago

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

Agree?

marc-farre commented 1 month ago

@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- commented 1 month ago

@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 commented 1 month ago

I think that would be perfect

luke- commented 1 month ago

New issue here: https://github.com/humhub/app/issues/188