question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

File upload is not always enabled

See original GitHub issue

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>

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:25 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
SilverYoChacommented, Dec 23, 2022

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.

1reaction
joudinetcommented, Jun 23, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

File Upload not working, how do i fix this? - Microsoft Community
1) Reset the browsers in Windows Settings > Apps & Features > Browser > Advanced Options > Reset and Repair to see if...
Read more >
How to Fix the “Sorry, This File Type Is Not Permitted for ...
Learn what the 'sorry, this file type is not permitted for security reasons' means in WordPress, and five ways you can resolve it....
Read more >
File upload not working for all files - Stack Overflow
I'm using the code below to upload some files with allowed extension under 5MB. But using this code, all doc or pdf etc...
Read more >
10 Ways to Fix File Upload Not Working on Slack - Saint
How to Fix File Upload Not Working on Slack · 1. Check Slack Servers. · 2. Restart Your Device. · 3. Check Your...
Read more >
Unrestricted File Upload - OWASP Foundation
For instance, when an application resize an image file, it may just show an error message when non-image files are uploaded without saving...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found