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

Newly created Nextcloud users do not show up in Chat list #565

Closed
Nils160988 opened this issue Jun 23, 2017 · 12 comments
Closed

Newly created Nextcloud users do not show up in Chat list #565

Nils160988 opened this issue Jun 23, 2017 · 12 comments

Comments

@Nils160988
Copy link

Nils160988 commented Jun 23, 2017

This is a copy from https://help.nextcloud.com/t/javascript-xmpp-chat-missing-contacts/14408, so, as suggested there, I post it here.

Nextcloud version: 12.0.0
Operating system and version: Ubuntu 16.04
Apache or nginx version: 2.4.18
PHP version: 7.0.18
Is this the first time you've seen this error?: yes

Can you reliably replicate it? (If so, please outline steps):

The issue you are facing:

Other users, which are created afterwards, are not shown in the chat window ( JavaScript XMPP Chat with internal server).
So, the first user (admin) sees no other contacts, second user only sees admin and so on.

I tried reinstalling the app, no changes.
I tried removing the app, manually dropping the tables oc_ojsxc_presence and oc_ojsxc_stanzas in the database (I thought, they might be some unwanted relict from the app?) and reinstalling, no changes.

Any suggestions?
Is it due to the internal server of the app, which is marked as experimental, did I misconfigured something or might there be a bud somewhere?

The output of your Nextcloud log in Admin > Logging: no relevant log messages

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

  'instanceid' => 
  'passwordsalt' =>
  'secret' => 
  'trusted_domains' =>· 
  array (
    0 => 'www.*domain*',
    1 => '*domain*',
    2 => '*fixedip*',
  ),  
  'datadirectory' => '/var/www/nextcloud/data',
  'overwrite.cli.url' => ,
  'dbtype' => 'mysql',
  'version' => '12.0.0.29',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '', 
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => '************',
  'installed' => true,
  'memcache.local' => '\OC\Memcache\APCu',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => '************',
  'default_language' => 'de',
  'htaccess.RewriteBase' => '/',
  'logtimezone' => 'Europe/Berlin',
  'maintenance' => false,
@MarcelWaldvogel
Copy link
Contributor

Just as context: The basic XMPP concept is for the users to manage the roster list and adds/deletes themselves. There are plugins for many external XMPP servers to share an admin-provided roster among multiple users.

The internal XMPP server should maintain a global group roster of all users. Apparently, it doesn't.

@LEDfan Can you look into this once your exams are over?

@LEDfan
Copy link
Contributor

LEDfan commented Jun 30, 2017

This is probably because JSXC caches the roster in the localStorage and doesn't asks for it every time you open a Nextcloud page.

@sualko is there a way in XMPP to inform a change of the roster, or to invalidate the cache? I think there are some ways in Nextcloud to be notified of new, changed and deleted users so then the server can send the new roster.

@sualko
Copy link
Member

sualko commented Jun 30, 2017

Year, there are roster pushes.

Btw. nice that you are back 😜

@LEDfan
Copy link
Contributor

LEDfan commented Jul 8, 2017

@Nils160988 @poVoq this can be tested now (see nextcloud/jsxc.nextcloud#33). The changes are too big to manually apply so here is a test version. It would be great to get some feedback on this!
ojsxc-3.2.1.tar.gz

@Schmuuu
Copy link

Schmuuu commented Jul 8, 2017

Hi @LEDfan
I tested the new version. So far it works fine. I don't know if I was affected by the Problem Nils described, but while I have the same environment (Ubuntu 16.04, NC 12, internal chat, ...) I think my test results could be interesting. Furthermore I was also having problems with the app and hoped the changes might solve them.

What I saw:

  • when created a new account on my server, it appeared a few seconds later in Chat windows (offline user list) even without the first login of that user
  • when new user logged in first time, it was shown as online only few seconds later (3s)
  • with all users logging in and logging out updates the online status correctly with only little delay

So that's all great!

My issue persists however: only admin user can chat with all the other non-admin users. The non-admin users can't chat with each other. Well they can type in messages but the receiving user won't get these messages. I was hoping that was this issue here. Just wanted to let you know.

@LEDfan
Copy link
Contributor

LEDfan commented Jul 9, 2017

Thanks @Schmuuu for the feedback!

About your other issue that only admin users can chat with non-admin users, I'm not able to reproduce it. Can you open a new issue for this and provide the browser and server (nextcloud.log) logs? Also are you using multiple domains to access your server, or do your non-admin users have any special characters in their username?

@Nils160988
Copy link
Author

Thanks @LEDfan for the test-version!
I can confirm Schmuuu's findings for my instance of nextcloud.
The version works fine for new users. They show up in the chat window directly after they are created.

But one small issue persists: After installing the new version, the chat contacts are still not visible for all existing users. Updates only occur for new users. An easy workaround (at least if you have not too many users) is to deactivate all users and activate them again.
You are probably still missing an initial update of your roster or something, could this be possible?

I did not yet look into the issue whether all messages are properly sent.

@LEDfan
Copy link
Contributor

LEDfan commented Jul 10, 2017

@Nils160988 I added a command to refresh the rosters of all users. You can run it by executing php occ ojsxc:refresh-roster in the main nextcloud directory.

ojsxc-3.2.1.tar.gz

@Nils160988
Copy link
Author

On executing the command, it gives the error "There are no commands defined in the "ojsxc" namespace."
Am I doing something wrong?
I also do not find the folder lib/Command in the ojsxc-version you provided here...

Additionally, it might be nice, if this command is done automatically on installation of the app, because some people might run nextcloud without command line access.

@LEDfan
Copy link
Contributor

LEDfan commented Jul 11, 2017

Yeah I actually provided the old archive...
ojsxc-3.2.1.tar.gz

About running the command at installation: that's actually a good idea, but note that for a fresh installation of the app it shouldn't be necessary. Since then users don't have a local copy of the roster and thus the client part fetches the roster from the backend. But for when re-enabling the app after it was enabled once it is needed.

@Nils160988
Copy link
Author

Now it works, after executing the command, all contacts are shown.
Still, I also have issues with messages which are not delivered to other users.
@Schmuuu: Did you already open a new issue for that?

@Schmuuu
Copy link

Schmuuu commented Jul 11, 2017

Hi @Nils160988

Sorry, I haven't found the time yet. So no unfortunately.

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

No branches or pull requests

5 participants