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

Getting 'Unacceptable file type, only regular file is allowed' after a while #225

Closed
toniR15 opened this issue Apr 18, 2021 · 16 comments
Closed
Labels
Installing Issues with installing this webui

Comments

@toniR15
Copy link

toniR15 commented Apr 18, 2021

Hi, I'm running qbittorrent-nox 4.1.5 on a Raspberry pi 4 ( Raspbian 10) and I can download VueTorrent and apply the alterate webUI without problems and for some time it works fine. But after some time (about one hour more or less) with the system at idle, when I try to access it again the webUI, I get a blank screen with 'Unacceptable file type, only regular file is allowed' message.

After this happens the only way for me to solve it is to edit qbittorrent.conf and remove the flag for AlteranteWebUI to false, restart qbittorrent and then it can load again on the default web interface.

Any ideas of what could be going wrong and how I can solve it? Thanks!

@m4ximuel
Copy link
Contributor

It's possible that the storage is unmounted. This message is a message that occurs when qbittorrent cannot find the correct webui file.

@jak3-taylor
Copy link

jak3-taylor commented Apr 19, 2021

FYI you can instantly get back to the old UI by adding this to the end of your url:

/api/v2/app/setPreferences?json=%7B%22alternative_webui_enabled%22:false%7D

@WDaan WDaan added the Installing Issues with installing this webui label Apr 19, 2021
@rany2
Copy link

rany2 commented Apr 19, 2021

I've had this issue as well. I eventually gave up and just used Nginx reverse proxy instead

@m4ximuel
Copy link
Contributor

@toniR15 @rany2 I don't think the message was triggered by 'VueTorrent'.
First check this:

  • The web ui file location must be the parent folder of the 'public' folder.
  • Only 'public' folder should exist in web ui file location, and components of 'VueTorrent' such as 'index.html' should be included in 'public' folder.

@rany2
Copy link

rany2 commented Apr 19, 2021

@m4ximuel Ah, so the WebUI path should be /path/to/release and not /path/to/release/public. My bad

@m4ximuel
Copy link
Contributor

@rany2 yes, you right. please try it and tell me the result.

@rany2
Copy link

rany2 commented Apr 19, 2021

it works now, thanks!

@toniR15
Copy link
Author

toniR15 commented Apr 19, 2021

It's possible that the storage is unmounted. This message is a message that occurs when qbittorrent cannot find the correct webui file.

I really doubt that's the case since the VueTorrent folder is inside the home folder and it can still be accessed via ssh

@toniR15 @rany2 I don't think the message was triggered by 'VueTorrent'.
First check this:

  • The web ui file location must be the parent folder of the 'public' folder.
  • Only 'public' folder should exist in web ui file location, and components of 'VueTorrent' such as 'index.html' should be included in 'public' folder.

Yes, I'm pointing to the VueTorrent folder which is the parent of the public folder. And it works perfectly when I do that, my problem is as I told you that after a while, when I try to access qbittorrent webUI, I get that message as if the program cannot find the folder or the contents of the folder are not correct.
I could partially solve that issue by making a copy the index.html file and renaming it to login.html, since I was getting the same error when I was logged out of qbittorrent and when you have to enter your credentials again it was failing when using VueTorrent. After creating the login.html file that issue was solved, but still I'm running into the same problem after some time idle.

FYI you can instantly get back to the old UI by adding this to the end of your url:

/api/v2/app/setPreferences?json=%7B%22alternative_webui_enabled%22:false%7D

That's a nice trick, thanks for the tip!

@m4ximuel
Copy link
Contributor

@toniR15 A properly designed serviceworker should work in offline mode when the original source does not exist.
However, I broke the serviceworker rules in the past patch to fix the immediate cache problem, and I didn't fix it according to the rules, even though the previous patch did not cause a cache problem.
In the next patch you will no longer see the message in the same situation. However, I can not stop thinking that there is something wrong with the nox of qbittorrent.
Check the difference between when it is working and when it's not working. For example, file permissions in index.html.

I will put a PR that fixes serviceworker problem.

@toniR15
Copy link
Author

toniR15 commented Apr 19, 2021

@toniR15 A properly designed serviceworker should work in offline mode when the original source does not exist.
However, I broke the serviceworker rules in the past patch to fix the immediate cache problem, and I didn't fix it according to the rules, even though the previous patch did not cause a cache problem.
In the next patch you will no longer see the message in the same situation. However, I can not stop thinking that there is something wrong with the nox of qbittorrent.
Check the difference between when it is working and when it's not working. For example, file permissions in index.html.

I will put a PR that fixes serviceworker problem.

I see, I'll keep an eye on the permissions when I ran into the issue and I will update you. Thanks for the quick reply 👍👍

@toniR15
Copy link
Author

toniR15 commented Apr 19, 2021

I had the issue again and the permisions for both the index.html file and VueTorrent folder did not change from when it was working to when it wasn't.
Hoever I just realized the issue happens every time after every reboot. I have qbittorrent programmed to run at reboot with crontab and like that I ran into the issue. But if I do sudo killall qbittorrent-nox and then qbittorent-nox -d through ssh it works fine without needing to change anything in the qbittorrent.conf file. Which I find extremely confusing, since as far as I understand crontab just runs that same command after the pi system has rebooted.
So I have no idea what's going on, but I suspect it might be related to qbittorrent-nox rather than to VueTorrent itself

@m4ximuel
Copy link
Contributor

@toniR15 Starting qbittorrent might have taken precedence over mounting storage. After all operations have been performed for startup, adjust qbittorrent to run last, approximately 20 seconds later.

@toniR15
Copy link
Author

toniR15 commented Apr 20, 2021

@toniR15 Starting qbittorrent might have taken precedence over mounting storage. After all operations have been performed for startup, adjust qbittorrent to run last, approximately 20 seconds later.

I tried delaying the start of qbittorrent with @reboot sleep X && qbittorrent-nox -d in crontab with up to 2 minutes and still the same issue, I need to run it manually every time I reboot. Is this the way you were suggesting or were you thinking on something else?

@m4ximuel
Copy link
Contributor

@toniR15 I'm not using a Raspberry Pi, so I don't think I can help anymore. It could be a problem with the processor's permission causing the auto-start... I can't think of another case anymore.

@toniR15
Copy link
Author

toniR15 commented Apr 20, 2021

Yeah of course, don't worry. Thanks for the help anyways! 👍👍

@WDaan
Copy link
Collaborator

WDaan commented Apr 20, 2021

Closing as the issue seems solved and unrelated to VueTorrent itself.

@WDaan WDaan closed this as completed Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Installing Issues with installing this webui
Projects
None yet
Development

No branches or pull requests

5 participants