ZeroNetX / ZeroNet

ZeroNetX - Decentralized websites using Bitcoin crypto and BitTorrent network
https://zeronet.dev
Other
212 stars 32 forks source link

ZeroSiteX not showing any sites. Is it expected? #198

Closed SetoKaiba closed 1 year ago

SetoKaiba commented 1 year ago

Step 1: Please describe your environment

Step 2: Describe the problem:

ZeroSiteX not showing any sites. Is it expected?

Steps to reproduce:

  1. Open ZeroSiteX

Observed Results:

Expected Results:

slrslr commented 1 year ago

Your description lack enough detail. I would like to see a screenshot and the content of the log file which should be in your zeronet/logs or zeronet/log folder.

canewsin commented 1 year ago

Could you provide screenshot of the issue? I mean where it's not showing sites, on Dashboard?

SetoKaiba commented 1 year ago

image image No site list here I mean.

slrslr commented 1 year ago

@SetoKaiba

No site list here I mean.

and the log file i have mentioned? You can also mouse drag & drop the top-right corner button down to open the log to copy entries you can see. Ideally all to see what is going on. You have restarted Zeronet too i expect to see if issue continue.

SetoKaiba commented 1 year ago

debug.log

slrslr commented 1 year ago

Some errors/warnings inside it @canewsin :

ERROR CryptConnectionManager RSA ECC SSL CAcert generation failed, CAcert or CAkey files not exist. (Generating a RSA private key Error Generating Key

WARNING Site:1Sites..ZR1k data/users/14ssxjEjt1DWJfFZ4uByXTdztq945STdxm/content.json: verify sign error: VerifyError: No rules for this file in /src/Content/ContentManager.py line 988 > 814

Regarding the first error, check similar issues for the solution: https://github.com/ZeroNetX/ZeroNet/issues/192 https://github.com/ZeroNetX/ZeroNet/issues/176

SetoKaiba commented 1 year ago

@slrslr But it's strange. I found the command line here.

[2022-11-24 15:00:20,256] DEBUG    CryptConnectionManager Generating RSA CAcert and CAkey PEM files...
[2022-11-24 15:00:20,256] DEBUG    CryptConnectionManager Running: "tools\openssl\openssl.exe" req -new -newkey rsa:2048 -days 3650 -nodes -x509 -config "C:/Users/61304/Downloads/ZeroNet-win/data/openssl.cnf" -subj "/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA" -keyout "C:/Users/61304/Downloads/ZeroNet-win/data/cakey-rsa.pem" -out "C:/Users/61304/Downloads/ZeroNet-win/data/cacert-rsa.pem" -batch
[2022-11-24 15:00:20,581] ERROR    CryptConnectionManager RSA ECC SSL CAcert generation failed, CAcert or CAkey files not exist. (Generating a RSA private key
Error Generating Key
42864:error:2406C06E:random number generator:RAND_DRBG_instantiate:error retrieving entropy:crypto/rand/drbg_lib.c:335:
42864:error:2406C06E:random number generator:RAND_DRBG_instantiate:error retrieving entropy:crypto/rand/drbg_lib.c:335:
42864:error:2406B072:random number generator:RAND_DRBG_generate:in error state:crypto/rand/drbg_lib.c:588:
42864:error:2406C06E:random number generator:RAND_DRBG_instantiate:error retrieving entropy:crypto/rand/drbg_lib.c:335:
42864:error:2406C06E:random number generator:RAND_DRBG_instantiate:error retrieving entropy:crypto/rand/drbg_lib.c:335:
42864:error:2406B072:random number generator:RAND_DRBG_generate:in error state:crypto/rand/drbg_lib.c:588:
42864:error:2406C06E:random number generator:RAND_DRBG_instantiate:error retrieving entropy:crypto/rand/drbg_lib.c:335:
42864:error:2406B072:random number generator:RAND_DRBG_generate:in error state:crypto/rand/drbg_lib.c:588:
42864:error:04081003:rsa routines:rsa_builtin_keygen:BN lib:crypto/rsa/rsa_gen.c:387:)

It failed because the openssl.exe is not run correctly I think. But I can run the command manually. What's the problem? And I still get the generating key error even I generate them manually in command line.

SetoKaiba commented 1 year ago

Absolutely, there's something wrong with ZeroNetX. I tried ZeroNet. It can generate the RSA keys although it can't connect to the trackers.

canewsin commented 1 year ago

No site list here I mean.

Seems like site sync issue, delete site and reopen.

SetoKaiba commented 1 year ago

@canewsin Not working with deleting site and reopen. EDIT: It works now after I sync the site again.

What about the problem of RSA keys generation? I found that the openssl is replaced with a new one.

The command line returns

Generating a RSA private key
Error Generating Key

But when I run the command manually. It returns

Generating a RSA private key
..+++++
........................................................+++++
writing new private key to 'C:/Users/61304/Downloads/ZeroNet-win/data/cakey-rsa.pem'
-----

There must be something different with them.

SetoKaiba commented 1 year ago

If I replace the openssl folder from the original ZeroNet. It does generate the rsa keys correctly. So, there must be something wrong with the new openssl with Python shell running.

canewsin commented 1 year ago

@SetoKaiba previous one has security vulnerability thus updated to new one.

SetoKaiba commented 1 year ago

So, can you reproduce the bug that the command line return lines below?

Generating a RSA private key
Error Generating Key

But there's no problem with the manual command and the old one. So I don't know what's the problem.

canewsin commented 1 year ago

seems like this affect new installs only I was using binary, but syncing is ok on my side, I will investigate issue further.

SetoKaiba commented 1 year ago

OK. Thanks.

canewsin commented 1 year ago

from your context, binary can produce keys right ?

SetoKaiba commented 1 year ago

What do you mean by binary? I can run the command line in cmd.exe with working folder of core. And it sucessfully generate the keys. But the python call the command, but it doesn't generate the keys. The lines below is the replaced openssl.exe stdout.

Generating a RSA private key
Error Generating Key
canewsin commented 1 year ago

binary I refer is calling openssl.exe via cmd manually

SetoKaiba commented 1 year ago

binary I refer is calling openssl.exe via cmd manually

OK. Yes. It did generates the keys this way.

SetoKaiba commented 1 year ago

What about use the openssl from Git for windows? I test it without the problems. The keys are sucessfully generated.

defder-su commented 1 year ago

Perform "Check files" in zite context menu.

http://127.0.0.1:43110/1fznczNZUMEMvCiqSmCZGUiv5sVnRcsTD/?Topic:1635324765_1GooUE19488nDwG3TdkM8seYAHct4gjkq4/+network+bug+ZeroNet+forgets+delivering+updates

SetoKaiba commented 1 year ago

@canewsin I created a PR here. I finally find out the problem. Some required env var is missing if only specify the 3 env var here. With these changes, the openssl cmd run correctly. https://github.com/ZeroNetX/ZeroNet/pull/202

SetoKaiba commented 1 year ago

@defder-su I successfully open the zite already. But the openssl is still a problem. So I create a PR here.