Valyreon / Subloader

Subloader is a subtitle downloader that enables you to quickly find and download subtitles for your video files.
Other
100 stars 7 forks source link

Error Invalid domain #26

Open ab-cc opened 9 months ago

ab-cc commented 9 months ago

Hi, what is Invalid domain error and how can we resolve this? I'm not behind VPN, can access https://www.opensubtitles.com and https://api.opensubtitles.com from browser.

image

goldug commented 8 months ago

I have the same issue. It only occurs if you're logged in. Log out and it works as it should.

Valyreon commented 8 months ago

Are you normal users or VIP? @ab-cc Were you logged in?

I still think this is just something due to your network, everything works fine for me and I can see that there is daily usage at the API stats. But I am going to make sure to add more detailed logging of errors in the next version.

goldug commented 8 months ago

Are you normal users or VIP? @ab-cc Were you logged in?

I still think this is just something due to your network, everything works fine for me and I can see that there is daily usage at the API stats. But I am going to make sure to add more detailed logging of errors in the next version.

I'm a normal user, not VIP. I do not think it can be a network problem since it works fine if I don't log in.

ab-cc commented 8 months ago

Are you normal users or VIP? @ab-cc Were you logged in?

I still think this is just something due to your network, everything works fine for me and I can see that there is daily usage at the API stats. But I am going to make sure to add more detailed logging of errors in the next version.

Same as goldug, not behind VPN and not a VIP user, subtitle downloads works fine if not logged in. This error comes only when logged in.

batuhankrmn commented 7 months ago

Same with @ab-cc and @goldug , I get "Error occured: Invalid domain" on CLI tool.

Valyreon commented 5 months ago

@ab-cc @batuhankrmn @goldug

I have added logging to the latest version 1.6.1, if you could update and replicate this issue then attach the logs here it would be helpful to investigate the issue.

After you get the message on the UI, go to Settings > About > Logs and attach all the txt files in the directory that opens.

goldug commented 5 months ago

Adding the log (only one text file).

Note that the portable version has no log feature, only the version you install. 20240417T141352_845_RequestFailedException.txt

Valyreon commented 5 months ago

So looks like that is the only thing the API returns "Invalid domain"... I posted on their forum, they say they need more details of input, output etc. Thing is I can't replicate this and I would need to expand the app more if I want to include more info from your side.

I assume you tried with different files? How about when you use the manual Search? Do you use file names or search strings with any non-ascii characters?

goldug commented 5 months ago

Yeah, seems to be the same error no matter what I do. Weird that you can't reproduce it, do you have a premium account on opensubtitles? If so, try making a new free account and see if it happens to you then.

Valyreon commented 5 months ago

I don't have a premium account, just free one. I had my friend try as well, he also doesn't have any issues.

Maybe you could try using the app with VPN? That would prove that it's not anything to do with your connection/internet provider/location etc. The error comes from the API itself, so either my app is making an invalid request or something, or they are denying service for some reason.. the error message itself looks like a DNS error or something like that.

crashmaker18 commented 4 months ago

I'm currently having the same issue. Yesterday it worked fine (When I first installed it) Now it always says invalid domain for as long as I am logged in. If I log out, search a movie I can see the list of subtitles. I log back in (to download more than 5) and I can download them too, just fine. But as soon as I try to find another movie's subs it gives the same error again. No matter if I search or drag and drop. My log file is the exact same as goldug's.

ab-cc commented 3 months ago

I don't have a premium account, just free one. I had my friend try as well, he also doesn't have any issues.

Maybe you could try using the app with VPN? That would prove that it's not anything to do with your connection/internet provider/location etc. The error comes from the API itself, so either my app is making an invalid request or something, or they are denying service for some reason.. the error message itself looks like a DNS error or something like that.

Tried with v1.6.1:

Just like goldug said, if I'm logged out, it works absolutely fine but with limit of 5 downloads, and if I'm logged in it returns Invalid Domain. I understand what you are saying, that their API itself might be returning this response. Your assumption is logical that this may be network related, but the thing is I can access the opensubtitles.com web site without any problems or need for any VPN. Please let us know if we can try any additional tests. Currently I'm on a box that cannot run VPN, I will test that method soon and update.

Would it be possible to implement a proxy server function? May be that could solve this?

dmstumpf commented 3 months ago

This seems to be an issue with searches when logged in with a registered account. When I am logged in (as a VIP), search and download requests are made to vip-api.opensubtitles.com.

https://vip-api.opensubtitles.com returns an error HTTP 401: Invalid domain.

If I log out and then perform a search (which is posted to api.opensubtitles.com), the search is successful and I receive a list of subtitle matches.

If I log in after the search has completed, I am able to download items listed in the results without error.

Using Fiddler, I can replay a HTTP request that previously resulted in a 401: Invalid domain. If I alter the host header in the HTTP request from vip-api.opensubtitles.com to api.opensubtitles.com and replay the request, this results in a HTTP 200 and not a 401: Invalid domain.

Valyreon commented 3 months ago

@dmstumpf Thanks for looking into it with the fiddler. So you are VIP and it correctly returns that you are but the endpoint doesn't work.. other people above are not VIP. I could add an option in the Settings to force using the regular api endpoint. That would probably fix the problem for you, for the others probably not.

dmstumpf commented 3 months ago

Allowing VIP users to toggle to the other endpoint might help as a workaround until we have more information about the root cause.