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

Mouse right click not working on WEB UI (may be a theme/whitespace issue?) #18754

Open
L1cardo opened this issue Mar 24, 2023 · 29 comments
Open
Labels
Can't reproduce Issues that cannot be reproduced GUI GUI-related issues/changes WebUI WebUI-related issues/changes

Comments

@L1cardo
Copy link

L1cardo commented Mar 24, 2023

qBittorrent & operating system versions

qBittorrent: 4.5.2
Operating system: ubuntu 22.04 docker

What is the problem?

Mouse right click not working on WEB UI

Steps to reproduce

right click on the item

Additional context

related issue: linuxserver/docker-qbittorrent#236

No response

Log(s) & preferences file(s)

No response

@thalieht
Copy link
Contributor

right click on the item

Which "item"?

@thalieht thalieht added the WebUI WebUI-related issues/changes label Mar 24, 2023
@L1cardo
Copy link
Author

L1cardo commented Mar 24, 2023

All of these.
image

@thalieht thalieht added the Can't reproduce Issues that cannot be reproduced label Mar 24, 2023
@burkely-00orso69
Copy link

I can confirm I've been dealing with this same issue, mind you, not only with 4.5.2 but rather most versions I've tried starting with 4.3.9. I feel as though it's a browser error, but I just come up empty everytime I try to look into it.

Only issues I'm seeing in Chrome Dev tools are:
Uncaught TypeError: string.charCodeAt is not a function at genHash (client.js?locale=en&v=9uua0s:102:47) at updateTagList (client.js?locale=en&v=9uua0s:502:29) at Object.onSuccess (client.js?locale=en&v=9uua0s:702:25) at Object.<anonymous> (MooTools-Core-1.6.0-compat-compressed.js:5:19487) at Array.forEach (<anonymous>) at Function.forEach (MooTools-Core-1.6.0-compat-compressed.js:5:2711) at Array.each (MooTools-Core-1.6.0-compat-compressed.js:5:4561) at Object.fireEvent (MooTools-Core-1.6.0-compat-compressed.js:5:19448) at r.extend.$owner (MooTools-Core-1.6.0-compat-compressed.js:5:18121) at Object.onSuccess (MooTools-Core-1.6.0-compat-compressed.js:7:23983)

as well as,
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL> which seems to point to . Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

If there's anything needed from me to help someone look into this sort of issue, I'm available to do anything. It's become almost a chore to try to navigate the hundreds of active torrents without being able to access that specfic menu.

Oh, also worth noting: the "trackers" list, bottom left, is also empty despite having at least a dozen to two dozen active trackers.

Apologies if I just hijacked this issue, that's not my intention.

@glassez
Copy link
Member

glassez commented Apr 8, 2023

Didn't it really occur to anyone to provide details about the affected browser?

@burkely-00orso69
Copy link

Didn't it really occur to anyone to provide details about the affected browser?

To be honest, I've been looking into this exact issue for weeks now and my head hurts from it. But no, I hadn't even thought about it. With that said, I've tried multiple browsers, across multiple systems (windows and linux os) as well Android tablet and phone. I've tried various networks, however, my main system is running:
Ubuntu 22.10, Google Chrome: Version` 111.0.5563.110 (Official Build) (64-bit)
Firefox 111.0.1 (64-bit)

Current docker container I'm using is:

image: "saltydk/qbittorrent:latest"
qbittorrent v4.5.2
Qt: | 6.5.0
Libtorrent: | 1.2.18.0
Boost: | 1.81.0
OpenSSL: | 3.1.0
zlib: | 1.2.13.zlib-ng

@L1cardo
Copy link
Author

L1cardo commented Apr 12, 2023

I am on macOS13 and Win11, tried Safari and Edge, all seeing this issue.

@glassez
Copy link
Member

glassez commented Apr 12, 2023

Cannot reproduce with latest qBittorrent master on latest Microsoft Edge. Will try v4.5.2 later.
@burkely-00orso69
Could you test it with clean profile?

@glassez
Copy link
Member

glassez commented Apr 12, 2023

Oh, also worth noting: the "trackers" list, bottom left, is also empty despite having at least a dozen to two dozen active trackers.

How about "tags" list above it?

@burkely-00orso69
Copy link

Cannot reproduce with latest qBittorrent master on latest Microsoft Edge. Will try v4.5.2 later. @burkely-00orso69 Could you test it with clean profile?

Hey there, so I've tried on a fresh install of ubuntu 22.04 Desktop, and same issues (on top of the multiple systems I've attempted to bypass this issue).

In addition, I've also attempted to spin up a new install of qbittorrent and what happened thereafter, is likely the weirdest issue I've come across in regards to this issue; for split second, the problem was gone. I was acutally able to interact with each individual torrent (i.e. selecting force recheck, start,stop, etc..). I then decided to reboot my PC and upon rebooting my laptop, the same issues were back unfortunately. The absolute only thing I could find in dev tools via Chrome is the following. I can't seem to find any info on it either, so no idea where to go.
caught TypeError: Cannot set properties of null (setting 'indeterminate') at Object.updateMenuItems (contextmenu.js?locale=en&v=h6fbjl:427:40) at r.extend.$owner (MooTools-Core-1.6.0-compat-compressed.js:5:18121) at Object.adjustMenuPosition (contextmenu.js?locale=en&v=h6fbjl:106:18) at r.extend.$owner (MooTools-Core-1.6.0-compat-compressed.js:5:18121) at Object.triggerMenu (contextmenu.js?locale=en&v=h6fbjl:202:18) at r.extend.$owner [as triggerMenu] (MooTools-Core-1.6.0-compat-compressed.js:5:18121) at Object.<anonymous> (contextmenu.js?locale=en&v=h6fbjl:165:22) at HTMLTableRowElement.<anonymous> (MooTools-Core-1.6.0-compat-compressed.js:5:10940) at HTMLTableRowElement.a (MooTools-Core-1.6.0-compat-compressed.js:6:28721)

As for tags, that doesn't work. Only options available are Untagged and All. (See second screenshot.)

Screenshot from 2023-04-13 02-31-16

Screenshot from 2023-04-13 02-32-14

So basically, the only things that I can interact with at this time, are Categories, the top menu options and the options below the list of torrents which list size, peers, etc..

@glassez
Copy link
Member

glassez commented Apr 13, 2023

#18754 (comment)
@Chocobo1
I may be mistaken, since I am not a JS expert. But it seems to me that we have already encountered this fact that for ... in can return not only the fields we expect, but also some other properties. So sortedTags could also contains something other than tag names making getHash() failed due to incompatible type.

const sortedTags = [];
for (const key in tagList)
sortedTags.push(tagList[key].name);
sortedTags.sort();
for (let i = 0; i < sortedTags.length; ++i) {
const tagName = sortedTags[i];
const tagHash = genHash(tagName);
const tagCount = tagList[tagHash].torrents.length;
tagFilterList.appendChild(createLink(tagHash, tagName, tagCount));
}

@cleesieboy
Copy link

I'm seeing what I assume is the same issue. On my end the problem has occurred a few times, not only blocking right-clicks but auto-refresh of the ui as well. Tested on both Safari and Chrome (on macOS), running the latest qB on Debian stable in a docker container. Restarting the container didn't help. Deleting a single torrent have made the problem go away, and downloading the exact same torrent again didn't trigger the problem.
The torrent I deleted was auto-added with a bunch of tags, I didn't add any tags when manually adding it again.

@burkely-00orso69
Copy link

I'm seeing what I assume is the same issue. On my end the problem has occurred a few times, not only blocking right-clicks but auto-refresh of the ui as well. Tested on both Safari and Chrome (on macOS), running the latest qB on Debian stable in a docker container. Restarting the container didn't help. Deleting a single torrent have made the problem go away, and downloading the exact same torrent again didn't trigger the problem.
The torrent I deleted was auto-added with a bunch of tags, I didn't add any tags when manually adding it again.

This actually helps me quite a bit. I also seem to be having the issue of the UI not refreshing ( adding/deleting torrents need a manual refresh of the browser in order to see any changes). I've also come across an issue where the entire UI is empty, displaying 0 active torrents when in fact there are several hundred.

I'm wondering though, how were you able to track down that one torrent that was causing the issue. My problem is that right now, I have upwards of 500 torrents in qbittorrent, many being cross-seeds. I think the issue will likely be with one of these cross seeding torrents.

Im definitely going to give it a shot and try to track down that 1 (hopefully only 1) bad torrent.

@glassez
Copy link
Member

glassez commented Apr 19, 2023

The torrent I deleted was auto-added with a bunch of tags, I didn't add any tags when manually adding it again.

Hm... but this is interesting. And it seems that it may be related to what I mentioned above. Is there any chance that you saved these tags to use them for testing?

@cleesieboy
Copy link

cleesieboy commented Apr 19, 2023

I'm seeing what I assume is the same issue. On my end the problem has occurred a few times, not only blocking right-clicks but auto-refresh of the ui as well. Tested on both Safari and Chrome (on macOS), running the latest qB on Debian stable in a docker container. Restarting the container didn't help. Deleting a single torrent have made the problem go away, and downloading the exact same torrent again didn't trigger the problem.
The torrent I deleted was auto-added with a bunch of tags, I didn't add any tags when manually adding it again.

This actually helps me quite a bit. I also seem to be having the issue of the UI not refreshing ( adding/deleting torrents need a manual refresh of the browser in order to see any changes). I've also come across an issue where the entire UI is empty, displaying 0 active torrents when in fact there are several hundred.

I'm wondering though, how were you able to track down that one torrent that was causing the issue. My problem is that right now, I have upwards of 500 torrents in qbittorrent, many being cross-seeds. I think the issue will likely be with one of these cross seeding torrents.

Im definitely going to give it a shot and try to track down that 1 (hopefully only 1) bad torrent.

Unfortunately it was more of chance than anything deliberate. I was looking at the interface, no issue, came back a couple of minutes later, noticed the error, checked which torrents had been added the last few minutes and deleted one of them.

@cleesieboy
Copy link

cleesieboy commented Apr 19, 2023

The torrent I deleted was auto-added with a bunch of tags, I didn't add any tags when manually adding it again.

Hm... but this is interesting. And it seems that it may be related to what I mentioned above. Is there any chance that you saved these tags to use them for testing?

Unfortunately not, if I run into the issue again I'll make sure to take notes.
This might not at all be related to the issue, but I'll mention it just the same; tags that begin with a leading space causes various issues (can't be deleted, can't be assigned etc), and I know I had a faulty autobrr config that added torrents with such tags. I can't remember if any of these tags were present on any torrents when the error occurred, so as said, might not be relevant.

EDIT: fixed typos

@glassez
Copy link
Member

glassez commented Apr 19, 2023

Unfortunately it was more of a chance than anything deliberate. I was looking at the interface, no issue, came back a couple of minutes later, noticed the error, checked which torrents had been added the last few minutes and deleted one of them.

So how was this torrent added after all and where did it get the assigned tags from? Maybe there is a way to reproduce this?

@cleesieboy
Copy link

cleesieboy commented Apr 19, 2023

Unfortunately it was more of a chance than anything deliberate. I was looking at the interface, no issue, came back a couple of minutes later, noticed the error, checked which torrents had been added the last few minutes and deleted one of them.

So how was this torrent added after all and where did it get the assigned tags from? Maybe there is a way to reproduce this?

It was added by autobrr, with some tags like video resolution etc. Unfortunately I cannot remember exactly what torrent it was, and have since changed the autobrr config so I cannot tell you exactly what tags were added. As I mentioned in a reply above, it might have had faulty tags with leading spaces but I cannot confirm this.

@glassez
Copy link
Member

glassez commented Apr 19, 2023

It was added by autobrr, with some tags like video resolution etc.

Confirmed that tags with leading spaces cause the problem (tags with trailing spaces should also do, but I have not checked).
But damn it, where do such tags come from? Both GUI and WebAPI trim spaces before adding tags (so I had to modify the code to investigate this problem). Does your program (autobrr) use any workarounds to add torrents? This is a very bad idea.

@glassez
Copy link
Member

glassez commented Apr 19, 2023

Both GUI and WebAPI trim spaces before adding tags (so I had to modify the code to investigate this problem).

A more detailed investigation revealed that this is not always true. There are still some inconsistencies due to different leading/trailing spaces handling.

@cleesieboy
Copy link

It was added by autobrr, with some tags like video resolution etc.

Confirmed that tags with leading spaces cause the problem (tags with trailing spaces should also do, but I have not checked). But damn it, where do such tags come from? Both GUI and WebAPI trim spaces before adding tags (so I had to modify the code to investigate this problem). Does your program (autobrr) use any workarounds to add torrents? This is a very bad idea.

It should use the standard WebAPI as far as I can tell, I'm not the author and haven't done any source diving. It's available at github if you wan't to have a look. I accidentally added a space after "," when entering multiple tags in autobrr's config, and apparently neither it or qB trim the values in this case.

@burkely-00orso69
Copy link

Gentleman, I just wanted to pop in and say, I've solved my issue with thanks to @cleesieboy. After he mentioned the tag being the issue, I began looking at what information was infront of me in the GUI. Unfortunately, there wasn't much to work with as most things weren't accessible. Upon looking at it a second time, I noticed a very oddly named category with the same name used for a tag (although, tags weren't listed where they nromally would be on the left hand side). Somehow, someway I had enterted the Category and Tag as 4K TV sonarr4K, which autobrr made sure was also added upon injecting the torrent. So all along, this one category/tag was the issue. Since I could manually go shuffle through the the tags, I just took a chance and deleted everything under that Category and at that exact moment, qbittorrent is now fully displaying the UI, it's refreshing/updating as it normally would and all options/menus are accessible.

I truely cannot believe I've gone this long banging my head against a wall, deploying new servers, etc, etc trying to fix this when the entire time it was (likely) due to the fact the tag and/or category had those whitespaces in it. Thanks again for all the help folks!

@L1cardo
Copy link
Author

L1cardo commented Apr 20, 2023

Nice!
Will there be a fix or do I need to delete that tag manually?

@cleesieboy
Copy link

Gentleman, I just wanted to pop in and say, I've solved my issue with thanks to @cleesieboy. After he mentioned the tag being the issue, I began looking at what information was infront of me in the GUI. Unfortunately, there wasn't much to work with as most things weren't accessible. Upon looking at it a second time, I noticed a very oddly named category with the same name used for a tag (although, tags weren't listed where they nromally would be on the left hand side). Somehow, someway I had enterted the Category and Tag as 4K TV sonarr4K, which autobrr made sure was also added upon injecting the torrent. So all along, this one category/tag was the issue. Since I could manually go shuffle through the the tags, I just took a chance and deleted everything under that Category and at that exact moment, qbittorrent is now fully displaying the UI, it's refreshing/updating as it normally would and all options/menus are accessible.

I truely cannot believe I've gone this long banging my head against a wall, deploying new servers, etc, etc trying to fix this when the entire time it was (likely) due to the fact the tag and/or category had those whitespaces in it. Thanks again for all the help folks!

A tag with whitespaces within it rather than leading/trailing doesn't trigger this issue for me. My understanding from looking at the source code (though admittedly I'm far from a programmer) is that you shouldn't even be able to delete or assign a 'faulty' tag to a torrent from the Web UI. I had to manually delete the tags from both the config file as well as all torrents with those tags in the SQLite database autobrr use.

If the issue was resolved by the steps you describe there's something else that can cause it.

@burkely-00orso69
Copy link

burkely-00orso69 commented Apr 20, 2023

** edit** after posting I realize that there's another tag in that screenshot with a whitespace, although, no torrents are tagged to it. Perhaps it;s when the torrent is added to that "bad" tag that things go south?

Even this morning, a whole night after "fixing" the issue and changing the tags within autobrr qbittorrent is still running as expected It's defintely something to do with those tags having whitespaces in them, but I'm very much not a programmer so I wouldn't have a clue what the issue is to be honest.
image

@luzpaz
Copy link
Contributor

luzpaz commented Aug 31, 2023

t's defintely something to do with those tags having whitespaces in them

Can someone locate the whitespace threshold in the code and tweak it to see if this solves the issue?

@luzpaz luzpaz changed the title Mouse right click not working on WEB UI Mouse right click not working on WEB UI (may be a theme/whitespace issue?) Sep 24, 2023
@luzpaz luzpaz added the GUI GUI-related issues/changes label Sep 24, 2023
@pagaille
Copy link

Same for me but only in the search tab using Safari 17.0. Right mouse button does nothing. Working with Chromium.

This happened since I upgraded to 4.5.5 (docker version on raspberry pi).

@tyzbit
Copy link

tyzbit commented Dec 15, 2023

I can confirm, somehow a tag I used regularly disappeared from the tag list in the left but was still present on a torrent. Simply re-adding the tag fixed the issue, but obviously a code update to handle when tags and categories on torrents do not match known tags and categories should still be pursued.

Quick Fix TL;DR

  • Ensure the tags and categories on your torrent(s) are listed on the left pane and if they're missing, re-create them exactly as they exist on your torrent(s) (with exact case and spacing)
  • Once right-click works again you can remove them afterwards if desired.

@glassez
Copy link
Member

glassez commented Dec 15, 2023

This problem should be fixed in current master by #20028.

@blahbleh01
Copy link

I encountered this issue today with Chrome on Windows. I looked at this thread and tried Edge and the issue wasn't there. So I figured there was something wrong with my Chrome and disabled all my extensions, then the issue was gone. I found out that the Chrome extension that caused this issue was "Allow Right-Click" which would forbid websites from interfering with my ability to right click in Chrome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can't reproduce Issues that cannot be reproduced GUI GUI-related issues/changes WebUI WebUI-related issues/changes
Projects
None yet
Development

No branches or pull requests

9 participants