View Issue Details

IDProjectCategoryView StatusLast Update
0000020SMS RelentlessSMS Relentlesspublic2024-04-03 23:51
ReporterBenjamin Long Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000020: Unable to select Users/Groups Allowed in admin page
DescriptionAt the bottom of each section in the admin page, there is a Groups Allowed and Users Allowed box. When I click on the buttons next to these to choose a group or a user, I get the following text in the popup:
function(){return OC.debug&&qi.warn("String.prototype.toRgb is deprecated! It will be removed in Nextcloud 22."),Gi(this)}

This also happens in the 'Restrict access to the following phone numbers' section, but only when selecting Users. Selecting groups works.
Additional InformationI'm running Nextcloud 28, but I started testing with Nextcloud 25. I've tested each major version as I upgraded.
TagsNo tags attached.

Activities

DoubleBastionAdmin

2024-02-13 22:33

administrator   ~0000030

How is your Nextcloud installed ? Are you using the Nextcloud AIO (All-in-One) Docker image ?

Benjamin Long

2024-02-13 23:31

reporter   ~0000031

I'm running it in an Ubuntu VM. I originally installed manually via the zip file.
I had attached some screenshots, but I don't see them here. Are they hidden or did they fail to upload?

Benjamin Long

2024-02-14 02:26

reporter   ~0000032

I'm not very good at this... but maybe this will be helpful. I've tried to debug the javascript that's creating that text. This is as far as I've gotten. In adminsettings.js, line 318, that function key is getting set to 'toRgb', so the usrval is getting set to the output of the toRgb function, which is that depreciation warning.
Again, I'm not very good at Javascript debugging of complicated projects, but hopefully this is helpful.
Screenshot_20240213_211938.png (50,299 bytes)   
Screenshot_20240213_211938.png (50,299 bytes)   

DoubleBastionAdmin

2024-02-14 11:22

administrator   ~0000033

The lists of available users and groups are working fine on our server, without any errors. The code that you show in the screenshot from above has nothing exotic in it. It just collects the users from the 'allUsers' variable and adds some html tags around them to create the drop-down list. The problem is that in your setup, the 'allUsers' variable comes with some weird content in it. Since, as you mention, in the restricted numbers section, the groups are shown correctly, and the JavaScript code for groups is identical with that for users, as can be seen above, it follows that the code for users is fine, but the content that comes from the database and is stored in the 'allUsers' variable, is not fine. This can have multiple causes, including using an incomplete or outdated PHP or MariaDB installation.

1. Have you created multiple users, both admins and non-admins, in your Nextcloud ? Do their names contain characters such as dots, dollar signs, etc. ? Have you created multiple groups apart from the 'admin' group in your Nextcloud and assigned users to groups ? Do the group names contain special characters ?

2. What errors do you see in the Nextcloud log (Administration Settings > under Administration > click Logging) ? The error that you posted is generated by some Nextcloud file and is out of place, since it mentions "String.prototype.toRgb is deprecated! It will be removed in Nextcloud 22.", but it shows up in Nextcloud 28. When you click on the users/groups buttons to see the list with all users/groups, do you see any errors in your browser's console (not in the pop-ups) ?

3. Since you mention that you installed Nextcloud manually, from the zip archive downloaded from the Nextcloud website, we deduce that you are using Apache, instead of Nginx. Please confirm that you installed Nextcloud on a subdomain and not on a subdirectory and that you configured Apache as explained here: https://www.doublebastion.com/apache-configuration-for-nextcloud/ , especially the part about enabling pretty URLs and updating the '.htaccess' file.

4. Please confirm that you run the latest version of Nextcloud (28), the latest version of SMS Relentless (1.3.2), on an Ubuntu server with the latest version of PHP and MariaDB.

5. Please provide the URL of the admin settings page of the app. Replace your real domain and subdomain with 'cloud.example.com' for privacy reasons, like this: https://cloud.example.com/settings/admin/sms_relentless

Benjamin Long

2024-02-14 15:59

reporter   ~0000034

Last edited: 2024-02-14 17:20

> Have you created multiple users, both admins and non-admins, in your Nextcloud?
Yes. One admin and one standard user.

> Do their names contain characters such as dots, dollar signs, etc. ?
Yes. The standard user is firstname.lastname.

> Have you created multiple groups apart from the 'admin' group in your Nextcloud and assigned users to groups ?
No. There is only the Admin group.

> Do the group names contain special characters ?
No.

> What errors do you see in the Nextcloud log (Administration Settings > under Administration > click Logging) ?
The only error I see is this:
"Error \t PHP \t Trying to access array offset on value of type bool at /var/www/cloud.mydomain.foo/apps/sms_relentless/lib/Service/SmsrelentlessService.php#3418"

> When you click on the users/groups buttons to see the list with all users/groups, do you see any errors in your browser's console (not in the pop-ups) ?
I've enabled debugging so that I can see them. I've attached a txt file with the console log.

> we deduce that you are using Apache
True

> Please confirm that you installed Nextcloud on a subdomain and not on a subdirectory
It is installed as cloud.mydomain.foo, no subdirectory.

> and that you configured Apache as explained here: https://www.doublebastion.com/apache-configuration-for-nextcloud/ , especially the part about enabling pretty URLs and updating the '.htaccess' file.
Yes. This is done.

> Please confirm that you run the latest version of Nextcloud (28), the latest version of SMS Relentless (1.3.2)
Yes. Nextcloud 28, SMS Relentless 1.3.2.

> on an Ubuntu server with the latest version of PHP and MariaDB
# dpkg -l php8.2 mariadb-server | grep ^ii
ii mariadb-server 1:10.3.39-0ubuntu0.20.04.2 all MariaDB database server (metapackage depending on the latest version)
ii php8.2 8.2.15-1+ubuntu20.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage)

> Please provide the URL of the admin settings page of the app.
https://cloud.mydomain.foo/settings/admin/sms_relentless
js-console.log (3,864 bytes)   
==== On SMS Relentless Page Load ===
InstallTrigger is deprecated and will be removed in the future. constants.js:50:15
JQMIGRATE: Migrate is installed, version 3.4.1 jquery-migrate.min.js:2:980
jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:59:27
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:59:27
Unified search initialized! UnifiedSearch.vue:51
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:59:27
jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:59:27
jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 4 globals.js:59:27
session heartbeat polling started session-heartbeat.js:103:9
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 7 globals.js:59:27
jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 8 globals.js:59:27
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 14 globals.js:59:27
[DEBUG] core: this browser is officially supported ! 🚀
Object { app: "core", uid: "cloudadmin", level: 0 }
ConsoleLogger.js:65:18
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:59:27
Registering notifications container as a menu NotificationsApp.vue:219
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 2 globals.js:59:27
Notifications permissions not yet requested NotificationsApp.vue:470
Polling interval updated to 30000 NotificationsApp.vue:416
Started background fetcher as session_keepalive is enabled NotificationsApp.vue:275
jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 156 globals.js:59:27
Contacts
Array [ {…}, {…} ]
UnifiedSearchModal.vue:248
Search providers
Array(11) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ]
UnifiedSearchModal.vue:244
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 33 globals.js:59:27
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 11 globals.js:59:27
jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 4 globals.js:59:27
Got notification data, restoring default polling interval. NotificationsApp.vue:376
jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 128 globals.js:59:27
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 4 globals.js:59:27
=== On Clicking the 'users' button ===
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 10 globals.js:59:27
jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 16 globals.js:59:27
js-console.log (3,864 bytes)   
Screenshot_20240214_105727.png (21,101 bytes)   
Screenshot_20240214_105727.png (21,101 bytes)   

Benjamin Long

2024-02-14 16:13

reporter   ~0000035

Oh, I should mention... I'm not using php-fpm. I'm using mod_php.
libapache2-mod-php8.2 8.2.15-1+ubuntu20.04.1+deb.sury.org+1

DoubleBastionAdmin

2024-02-14 17:46

administrator   ~0000036

Everything that you posted looks ok. The warning "The global jQuery is deprecated" can be ignored. The only problem we see with your installation is that your users contain dots in their names, which can cause problems in JavaScript, since dots are used to access object properties. You can replace the dots with hyphens (-) or underscores (_) in your usernames and Display Names where it appears. Also, you can create at least one group. You don't need to assign users to that group. All can be done on the 'Users' page of Nextcloud. Then post if you can see the list of users and groups when clicking on the respective buttons. You can use Fireforex, after removing all the cached data.

Benjamin Long

2024-02-14 18:30

reporter   ~0000037

Well... I think that's it. I added a user 'TestUser' and now that's the only user that shows up. I also added a group 'TestGroup' and that shows up as well.

I'm setting this up, not only for myself, but also as a testing for work. We have about 30 users, all firstname.lastname in LDAP. Is it possible to make this work with dots in the user name?
Screenshot_20240214_133019.png (7,609 bytes)   
Screenshot_20240214_133019.png (7,609 bytes)   

DoubleBastionAdmin

2024-02-14 19:05

administrator   ~0000038

In principle, it should be possible if we escape the dots in usernames and Display Names, but we have to test it before implementing it in the next app version. Just to be clear, in the example from above "TestUser" is the "Display Name" of the user, and not his "username", which can be different (like "user_153") and is used to log in to Nextcloud. When you mention you have 30 users with "firstname.lastname", you are referring to the 'usernames' that they use to log in to Nextcloud, or to their "Display Names" that in general are different and are shown in the allowed users pop-ups of SMS Relentless ?

Benjamin Long

2024-02-14 19:08

reporter   ~0000039

I spoke a bit too soon. I'm not sure if this is related, but I can't save the access restrictions because the 'Restriction Author' is set to 'Null' for some reason.
The error in the log is: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'saved_by_dsplname' cannot be null"}}
I've tried setting the value of the html form input element with developer tools, just as work around and to gain more insight into the issue, but have not had success.
Screenshot_20240214_135637.png (67,428 bytes)   
Screenshot_20240214_135637.png (67,428 bytes)   

Benjamin Long

2024-02-14 19:12

reporter   ~0000040

The user names are the login names, not the display names.
The non-admin I have that doesn't show up only has a dot in the login name. The display name is "Firstname Lastname". The login name is "firstname.lastname".
The one that works is "TestUser" for both.

DoubleBastionAdmin

2024-02-14 19:27

administrator   ~0000041

If your own Display Name as admin, contains a dot, this can cause the problem when trying to save the restrictions. Also, if you don't have a Display Name set up. Please confirm that you have both a username and a Display Name on the Users page of Nextcloud, and that both your username and Display Name don't contain a dot or other special character.

Benjamin Long

2024-02-14 19:30

reporter   ~0000042

I do. the 'cloudadmin' user did not have a separate display name, so it was just showing 'cloudadmin'. Now it's set to 'CloudAdminDsp'. I opened up a private window to test, and it's doing the same thing. The 'Restriction Author' field is 'null'. I'm going to play around with it and see if I can figure anything out.

DoubleBastionAdmin

2024-02-14 19:51

administrator   ~0000043

If you can open the "/var/www/cloud.mydomain.foo/apps/sms_relentless/js/adminsettings.js" file and search for this line:

                 $('[id^="rstsave-"]').click(function(event) {

you can add right below it the following line:

alert("The Display Name of the current admin who tries to save the restrictions is: "+ crntadmDispName);

to see if your Display Name as an admin is correctly retrieved from the database. Then click on the Save button on the row of the restriction, to see what the alert shows.

DoubleBastionAdmin

2024-02-14 19:56

administrator   ~0000044

When you click on the plus sign in the "Restrict access to the following phone numbers" section, to add a new restriction, what is the value included automatically in the 'Restriction Author' field ? Is it "null" ?

Benjamin Long

2024-02-14 20:00

reporter   ~0000045

I created a new user 'testadmin'/'TestAdminDsp' and added them to the admin group. I can use this user to change the access restrictions.
I don't know why it doesn't work with 'cloudadmin'. They're set up the same, and look the same in the database.

Benjamin Long

2024-02-14 20:02

reporter   ~0000046

Sorry I didn't see your reply. I'll run that test now.

Benjamin Long

2024-02-14 20:14

reporter   ~0000047

Yes, it says 'null'. But if I use my new admin account, it works.
I don't know what the difference is between the accounts. I can't find any.

Benjamin Long

2024-02-14 20:18

reporter   ~0000048

Here are some screenshots and sql data.
Screenshot_20240214_151604.png (14,266 bytes)   
Screenshot_20240214_151604.png (14,266 bytes)   
Screenshot_20240214_151631.png (14,790 bytes)   
Screenshot_20240214_151631.png (14,790 bytes)   

DoubleBastionAdmin

2024-02-14 20:18

administrator   ~0000049

Can you save a Display Name for your 'cloudadmin' user in Personal Settings > Personal info > Full name, then log out, clear browser cache, log in again as 'cloudadmin' and see if you can save a new restriction ?

DoubleBastionAdmin

2024-02-14 20:22

administrator   ~0000050

The app tries to obtain the 'Display Name' for 'cloudadmin' from the table 'oc_accounts_data' of your Nextcloud installation. So, if you inspect your Nextcloud database and look into the 'oc_accounts_data' table and you see:

cloudadmin displayname [empty space]

it means this is the cause of the problem.

Benjamin Long

2024-02-14 20:40

reporter   ~0000051

Oh my.....
The 'cloudadmin' and 'benjamin.long' users are completely missing from this table.
I think we found the root of the issue. Maybe the dot was never a problem?

Benjamin Long

2024-02-14 20:56

reporter   ~0000052

I logged into the missing users, disabled and re-enabled the profile, and that populated the oc_accounts_data table.
Now it all works, including the user with the dot.

This has been an interesting journey. Thank you so much for your time!

Now I can move on to the rest of the testing.

DoubleBastionAdmin

2024-02-14 21:00

administrator   ~0000053

So, now, even a user with a dot in the username is listed in the allowed users pop-up ? And no other errors ?

Benjamin Long

2024-02-14 21:19

reporter   ~0000054

Yes, it's all working. I've received and send texts from my firstname.lastname account. I was able to restrict this account to just one of the numbers on the account.
I'm not seeing any errors.

Now I'm trying to figure out the best way to use it from a smartphone. I was hoping the nextcloud android app would have some functionality, but it doesn't seem to. I do get the notification though.

Thanks again for your help!

DoubleBastionAdmin

2024-02-14 21:25

administrator   ~0000055

You are welcome. We'll mark this issue as solved. However, we will be releasing a new version of SMS Relentless in a few hours, to solve a small bug and add new features like automatically refreshing the 'Received Messages' table when receiving a new SMS. It would be ideal if you could upgrade to the latest version before other tests. We'll post here when the new version will be published, in a few hours.

Benjamin Long

2024-02-14 21:26

reporter   ~0000056

Will do!

DoubleBastionAdmin

2024-02-14 23:20

administrator   ~0000057

Version 1.3.3 of SMS Relentless has been published. If you have any issues with the new version, please don't hesitate to open a new thread here, or on GitHub (https://github.com/DoubleBastionAdmin/sms-relentless/issues). You can also send any questions or suggestions directly to tech at doublebastion.com. Thank you.

DoubleBastionAdmin

2024-04-02 21:52

administrator   ~0000058

Last edited: 2024-04-03 23:51

Hello,

We published a new version of SMS Relentless which was optimized to work on mobile phones. It also introduces the 'Conversations' page ( image 1_ ). If you are still interested to use the app on mobile phones, the easiest way is to install Firefox for mobile (version 123.0 or newer), then verify that 'Ask to save' is set in Firefox's 'Settings' > 'Logins and passwords' > 'Save logins and passwords' ( image 2_ ). Then access your Nextcloud login page in Firefox and after you enter your username and password, when you are asked if you want Firefox to remember your login, answer Yes. After you've logged in to Nextcloud, open the main Firefox menu (from the low right-hand corner) and choose 'Install' ( image 3_ ), to create a shortcut for Nextcloud on your mobile's screen. This shortcut will look like any mobile app ( image 4_ ). In this way, each time you want to access Nextcloud and its applications, including SMS Relentless, you just press the 'Nextcloud' shortcut, choose the proposed login credentials which are stored safely by Firefox (to avoid writing again your username and password) and then you are in Nextcloud, which has a responsive design. At least its main functions and SMS Relentless can be used on mobile phones. We are not referring here to using the official Nextcloud app for Android or iPhone. That is an entirely different setup and it doesn't allow using the apps installed inside Nextcloud, like SMS Relentless.

So, once you are logged in to Nextcloud using Firefox for mobile, you can access SMS Relentless like on a desktop computer, and use all its functions, including listing all the received messages ( image 6_ ) or using the reply pop-up window ( image_7 ) to send a quick reply.
2_save_login_and_password.png (195,366 bytes)   
2_save_login_and_password.png (195,366 bytes)   
5_sms_relentless_on_mobile.png (136,641 bytes)   
5_sms_relentless_on_mobile.png (136,641 bytes)   
6_received_messages_on_mobile.png (154,832 bytes)   
6_received_messages_on_mobile.png (154,832 bytes)   
7_reply_to_message_on_mobile.png (153,880 bytes)   
7_reply_to_message_on_mobile.png (153,880 bytes)   

Issue History

Date Modified Username Field Change
2024-02-13 21:53 Benjamin Long New Issue
2024-02-13 22:33 DoubleBastionAdmin Note Added: 0000030
2024-02-13 23:31 Benjamin Long Note Added: 0000031
2024-02-14 02:26 Benjamin Long Note Added: 0000032
2024-02-14 02:26 Benjamin Long File Added: Screenshot_20240213_211938.png
2024-02-14 11:22 DoubleBastionAdmin Note Added: 0000033
2024-02-14 15:59 Benjamin Long Note Added: 0000034
2024-02-14 15:59 Benjamin Long File Added: js-console.log
2024-02-14 15:59 Benjamin Long File Added: Screenshot_20240214_105727.png
2024-02-14 16:13 Benjamin Long Note Added: 0000035
2024-02-14 17:20 DoubleBastionAdmin Note Edited: 0000034
2024-02-14 17:46 DoubleBastionAdmin Note Added: 0000036
2024-02-14 18:30 Benjamin Long Note Added: 0000037
2024-02-14 18:30 Benjamin Long File Added: Screenshot_20240214_133019.png
2024-02-14 19:05 DoubleBastionAdmin Note Added: 0000038
2024-02-14 19:08 Benjamin Long Note Added: 0000039
2024-02-14 19:08 Benjamin Long File Added: Screenshot_20240214_135637.png
2024-02-14 19:12 Benjamin Long Note Added: 0000040
2024-02-14 19:27 DoubleBastionAdmin Note Added: 0000041
2024-02-14 19:30 Benjamin Long Note Added: 0000042
2024-02-14 19:51 DoubleBastionAdmin Note Added: 0000043
2024-02-14 19:56 DoubleBastionAdmin Note Added: 0000044
2024-02-14 20:00 Benjamin Long Note Added: 0000045
2024-02-14 20:02 Benjamin Long Note Added: 0000046
2024-02-14 20:14 Benjamin Long Note Added: 0000047
2024-02-14 20:18 Benjamin Long Note Added: 0000048
2024-02-14 20:18 Benjamin Long File Added: Screenshot_20240214_151604.png
2024-02-14 20:18 Benjamin Long File Added: Screenshot_20240214_151631.png
2024-02-14 20:18 Benjamin Long File Added: Screenshot_20240214_151712.png
2024-02-14 20:18 DoubleBastionAdmin Note Added: 0000049
2024-02-14 20:22 DoubleBastionAdmin Note Added: 0000050
2024-02-14 20:40 Benjamin Long Note Added: 0000051
2024-02-14 20:56 Benjamin Long Note Added: 0000052
2024-02-14 21:00 DoubleBastionAdmin Note Added: 0000053
2024-02-14 21:19 Benjamin Long Note Added: 0000054
2024-02-14 21:25 DoubleBastionAdmin Note Added: 0000055
2024-02-14 21:26 Benjamin Long Note Added: 0000056
2024-02-14 23:20 DoubleBastionAdmin Note Added: 0000057
2024-02-14 23:31 DoubleBastionAdmin Status new => resolved
2024-02-14 23:31 DoubleBastionAdmin Resolution open => fixed
2024-02-14 23:35 DoubleBastionAdmin File Deleted: Screenshot_20240214_151712.png
2024-04-02 21:52 DoubleBastionAdmin Note Added: 0000058
2024-04-02 21:52 DoubleBastionAdmin File Added: 1_active_archived_conversations.png
2024-04-02 21:52 DoubleBastionAdmin File Added: 2_save_login_and_password.png
2024-04-02 21:52 DoubleBastionAdmin File Added: 3_add_nextcloud_shortcut_to_home_screen.png.png
2024-04-02 21:52 DoubleBastionAdmin File Added: 4_firefox_and_nextcloud_shortcut.png
2024-04-02 21:52 DoubleBastionAdmin File Added: 5_sms_relentless_on_mobile.png
2024-04-02 21:52 DoubleBastionAdmin File Added: 6_received_messages_on_mobile.png
2024-04-02 21:52 DoubleBastionAdmin File Added: 7_reply_to_message_on_mobile.png
2024-04-03 23:51 DoubleBastionAdmin Note Edited: 0000058