Sheherezadhe / awair-uploader

GNU General Public License v3.0
121 stars 57 forks source link

Error while getting the devices of this jwt #34

Open cycom opened 2 years ago

cycom commented 2 years ago

Hi Sheherazadhe,

first of all: thanks for your efforts!

The tool does not work for me, though. I could sign in and then got a screen showing my two devices under "Availabe PW Sensors", but I can't add a token due to: "Error while getting the devices of this jwt: Request failed with status code 403"

I believe 403 is "forbidden"?

Any help would be greatly appreciated.

Thanks Thomas

cycom commented 2 years ago

Additional info - the error occured after trying to use the search. But I can't do anything with the devices shown in the middle section. Left section stays empty and greyed out.

psavva commented 2 years ago

The "Search" here is a little misleading. You need to enter your Awair Token there.
Please see the README on this project, and the procedure is clearly explained.

I suggest this issue is closed.

benfnjovi commented 2 years ago

In my case, this was because of a certificate error... You can verify whether it is what is causing your issue by toggling developer tools and selecting "Console." It will show the "ERR_CERT_DATE_INVALID" if you are having the same issue. Here is how I fixed it:

This error is the result of an expired "R3 Certificate and DST ROOT CA X3" Certificate Fix for windows: You will need to run "certmgr.msc" then delete "R3 Certificate and DST ROOT CA X3" from these locations, if it exists(it was only in two of them for me):

  1. Trusted Root Certification Authorities > Certificates
  2. Intermediate Certification Authorities > Certificates
  3. Third-party root Certification Authorities > Certificates To locate the right certificate : Just use Issued By and Expiration Date, search for certificate issued by DST ROOT CA X3, and expired around 29-30 sept 2021. Install new certificate : Download this : https://letsencrypt.org/certs/isrgrootx1.der Double click it. Then, Choose Local Machine, Next Choose Place all Certificates in the following store, and then choose "Trusted Root Certification Authorities" folder Restart your PC
benfnjovi commented 2 years ago

Discord link to a few screen shots showing the above process: https://discord.com/channels/855002894717419521/959096970591490108/961054369854398524

cycom commented 2 years ago

Thanks for the info, but in my case I just missed to enter the Awair API token.