converse.js: File upload is not always enabled

The file download is not always activated after the user logs in. Sometimes the download button appears and sometimes not.

To reproduce On my environment, this scenario seems reproducible (but not guaranteed):

  1. Open ConverseJs with a user account
  2. Perform page reloads (F5) until the button is no longer displayed (skip this step if the button is already not displayed).
  3. Perform page reloads and check that the button is not displayed.
  4. Close the browser, saving the tab context
  5. Restart the browser
  6. The download button appears

Expected behaviour The download button should always be displayed.

Environment:

  • Desktop
  • All browsers
  • Converse.js (master branch and 9.1.1, not tried on other versions)

Additional context Functional ejabberd server.

Initialization options
 converse.initialize({
          'view_mode' : 'overlayed',
          'i18n' : 'a language',
          'assets_path' : '/myserver/chat/converse/',
          'sounds_path' : '/myserver/chat/converse/',
          'play_sounds' : false,
          'bosh_service_url' : 'bosh url',
          'allow_logout' : false,
          'auto_login' : true,
          'auto_reconnect' : true,
          'jid' : 'a jid',
          'clear_messages_on_reconnection' : true,
          'default_domain' : 'a domain',
          'domain_placeholder' : 'a domain',
          'password' : 'a password',
          'autocomplete_add_contact' : false,
          'notification_icon' : 'aLogo.png',
          'muc_domain' : 'conference.a.domain',
          'locked_muc_domain' : 'hidden',
          'muc_disable_slash_commands' : true,
          'locked_muc_nickname' : true,
          'nickname' : 'a nickname',
          'auto_register_muc_nickname' : true,
          'notify_all_room_messages' : true,
          'auto_join_on_invite' : false,
          'roster_groups' : false,
          'allow_adhoc_commands' : false,
          'allow_contact_removal' : false,
          'allow_contact_requests' : false,
          'allow_registration' : false,
          'show_controlbox_by_default' : false,
          'discover_connection_methods' : false
        });
<bountysource-plugin>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (24 by maintainers)

Commits related to this issue

Most upvoted comments

Yes @jcbrand, this is fixed in my environment.

To make things work, I had to implement something to trash the previous disco keys in storage.

Hi, I’m able to trigger this issue as well. I observed the difference in the websocket messages that are exchanged between the session where the button is present and the session where the button is missing.

In the one that works, there is a disco query request to upload.example.com with a reply that contains the urn:xmpp:http:upload:0 feature. In the session where the button is missing, this request is never sent. I guess it confirms @jcbrand’s thoughts that for some (still unknown) reasons, the disco entities (and/or their features) are not fetched again from the server. I do not see any Timeout error messages in the console.

Thank you @jcbrand for taking time to analyze again this issue.

Concerning the “ignore_cache” flag, I was preparing some screenshot to show you how I discovered the flag, but in a mean time, you have discovered it on your own!

I have verified the point about IQ stanza timeout when fetching features. I do not have this issue.