tosdr/browser-extensions

always display `this service is not rated yet`

Closed this issue · 16 comments

Describe the bug
always display this service is not rated yet even if website exist in db

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://www.youtube.com/
  2. Click on 'extension button'
  3. See error

Expected behavior
my rights online

Desktop (please complete the following information):

  • Browser: Firefox
  • Version: 76.0.1 (64-bit)

Smartphone (please complete the following information):

  • Device: LAPTOP HP Compaq nx7400
  • OS: MX Linux LIVE USB Linux mx1 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64 GNU/Linux
  • Browser: Firefox 76.0.1 (64-bit)
  • Version: 76.0.1 (64-bit)

Extension (please complete the following information):

  • Version: 4.0.6
  • Packed? Yes

This was related to tosdr/Frontpage/issues/67

not resolved, extension still display this service is not rated yet

I'm having the same issue as OP here. Are there anyways I can fix this issue?

I already tried changing the endpoints, but this didn't work. Also I can't seem to connect to https://shields.tosdr.org/. I wonder if that has to do with anything.

The shields endpoint is used for images, not anything to do with the API. Can you show me the logs of the extension if you turn on debugging mode?

I would but I can't seem to find the log you're talking about. In fact I don't think I can actually get the log. Even when I enabled the debug option, no entries relating to the tos;dr extension are mentioned in the console for me.

I also have the same issue in Microsoft Edge.

The extension has never worked for me. I removed it after some frustration last time I tried it (in early Feb I think). I just pulled the latest master and it still won't show any matches. This is on Brave Browser 1.21.XX. Very frustrating.

image

Below is what I see in the console, no "real" network errors. I tried enabling local file urls and disabling Brave Shields (the ad-blocking / anti-fingerprinting engine), but that didn't make any difference.

image

I found a bit more in the error log. See entries below. I don't know what exactly triggered those and if they're directly related. I think the final one occurred when I pressed the "Clear Cache" button in the extension settings.

image

image

image

Thank you! I'll fix the CORS issue on the API so it should be working again.

CORS is now enabled again, tell us if this fixed your issue(s)

I'm still getting this issue. I see no relevant errors in the console, and I get the same behavior in both Chrome and Firefox, making me think this is a backend issue. I enabled Debug mode in both browsers, but neither of them displayed any logs in the developer console, or anywhere on disk that I could find.

When manually testing the API, I noticed that it hangs for 30+ seconds when establishing a TLS connection. I noticed this in Chrome, Firefox, and curl:

$ curl -vvvvv "https://api.tosdr.org/v1/service/facebook.json"
* Trying 45.136.28.177:443...
* Connected to api.tosdr.org (45.136.28.177) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_CHACHA20_POLY1305_SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=tosdr.org
* start date: Mar 18 15:09:44 2021 GMT
* expire date: Jun 16 15:09:44 2021 GMT
* subjectAltName: host "api.tosdr.org" matched cert's "api.tosdr.org"
* issuer: C=US; O=Let's Encrypt; CN=R3
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55675c582860)
> GET /v1/service/facebook.json HTTP/2
> Host: api.tosdr.org
> user-agent: curl/7.75.0
> accept: /
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 200
< date: Sun, 21 Mar 2021 19:34:45 GMT
< server: Apache/2.4.46 (Win64) OpenSSL/1.1.1i PHP/7.4.14
< x-powered-by: PHP/7.4.14
< x-cluster: ares0fsn2-dc30pcatserv0com
< expires: Thu, 19 Nov 1981 08:52:00 GMT
< cache-control: no-store, no-cache, must-revalidate
< pragma: no-cache
< x-cms-currentpage: v1
< x-cms-locale: en
< x-cms-universe: 1
< x-cms-universe-human: UNIVERSE_PUBLIC
< onion-location: http://tosdrfrjnbwyxrdn.onion
< x-ratelimit-amount: 14
< x-ratelimit-exceeded: false
< x-ratelimit-limit: 15
< x-ratelimit-interval: 1
< x-ratelimit-indicator: 73.206.150.95
< x-ratelimit-benefit: guest
< x-cms-cdn:
< x-cms-shields: /api/badge/
< x-cms-api:
< x-api-interface: v1
< x-api-query: facebook
< access-control-allow-origin: *
< content-type: application/json
< set-cookie: PHPSESSID=juas95m069ogklm72pmgk17jqa; path=/
< set-cookie: crisp_universe=1; expires=Tue, 20-Apr-2021 19:34:45 GMT; Max-Age=2592000; path=/
< set-cookie: crisp_language=en; expires=Tue, 20-Apr-2021 19:34:45 GMT; Max-Age=2592000; path=/
<

Looks like maybe something is misconfigured in the backend TLS configuration. Note that API does eventually respond, it just takes 30+ seconds.

I see, most likely an issue with the caching server. I'll check and fix it right away. I'll post an update here

(Can confirm that I'm also still getting the same errors.)

The caching server issue has been resolved

Can you confirm the IP you are connecting to is 202.61.251.191?

yes

Request URL     :  https://api.tosdr.org/
Request Method  :  GET
Remote Address  :  202.61.251.191:443

Screenshot_2021-03-23 YouTube -- ToS;DR - Terms of Service; Didn't Read

Confirmed working again.