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

Broken ZeroHello site #116

Open
filips123 opened this issue Apr 7, 2019 · 7 comments
Open

Broken ZeroHello site #116

filips123 opened this issue Apr 7, 2019 · 7 comments

Comments

@filips123
Copy link
Contributor

ZeroHello site is broken. Tested in Firefox, Chrome and Edge with fresh-installed ZeroNet 0.6.5.

screenshot

If I open browser console in Firefox, I see a lot of Content Security Policy errors.

But main problem is that http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D/js/all.js is not found. It is same in all other browsers.

@HelloZeroNet
Copy link
Owner

I just tested on a new installation and it's works for me.
Do you have all.js on your hdd data/1HeLLo.../js directory?
If you open log/debug.log is there a line that contains "Verify correct: js/all.js" (or any other reference to js/all.js?)
Whats the value of the "modified" node in the file "data/1Hello../content.json" ? (it should be 1553514828)

@filips123
Copy link
Contributor Author

I think I know what's the problem.

I downloaded ZeroNet to Program Files on Windows because I want to use it globally. And this is probably the problem because ZeroNet.exe can't write to that folder.

Is it possible to fix this? If possible, I want to have log and data directories in %APPDATA%\ZeroNet.

@HelloZeroNet
Copy link
Owner

You can change by putting a zeronet.conf next to zeronet.exe:

[global]
log_dir = C:\ProgramData\ZeroNet\log
data_dir = C:\ProgramData\ZeroNet\data

This will put the data to c:\Users[username]\AppData\Local\ZeroNet\data
The %APPDATA% and other variables not supported yet.

@filips123
Copy link
Contributor Author

I fixed this by adding the following lines to Config.py that check if the program is running from Program Files and then set start_dir to %APPDATA\ZeroNet.

        elif this_file.startswith("C:/Program Files"):
            # Running in non-writeable directory, put data to AppData
            start_dir = os.path.expandvars("%APPDATA%/ZeroNet").replace("\\", "/")

Is that OK? Or should I use %LOCALAPPDATA%?
If it is, I can submit a pull request.

@HelloZeroNet
Copy link
Owner

Yes, it's looks good for me. I think %LOCALAPPDATA% is the proper place for it. (does not travels on the network with the user)

@filips123
Copy link
Contributor Author

filips123 commented Apr 8, 2019

I changed start_dir but there are still some problems.

Tor doesn't work. I get this error in ZeroHello:

Status: Error ([Errno 10061] [Error 10061] No connection could be made because the target machine actively refused it.)

After stopping ZeroNet, processes still exist (ZeroNet.exe, meek-client.exe). I have to manually kill them from Task Manager.

These problems are probably because of non-writable directory because all things work if I run ZeroNet from the writable directory.

This is my log file after starting and stopping.

Can you make some installer for ZeroNet that will correctly set up all directories?

@filips123
Copy link
Contributor Author

I created HelloZeroNet/ZeroNet#1972. Should I also submit it to py3 branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants