zoffline / zwift-offline

Use Zwift offline
GNU Affero General Public License v3.0
757 stars 122 forks source link

Mac can not open zwife #389

Open gyqs opened 4 days ago

gyqs commented 4 days ago

I get the same question #317 ,When enter python standalone.py fellow is the log: INFO:zoffline:server-ip.txt not found, using 192.168.3.12 INFO:zoffline:Server version 1.78.0 (136426) is running. This is my /ect/hosts doc:127.0.0.1 us-or-rly101.zwift.com secure.zwift.com cdn.zwift.com launcher.zwift.com when i ping launcher.zwift.com can link 127.0.0.1 and i kill all 80 port,it also print same log

fatsbrown commented 4 days ago

Like I commented in the other issue, these messages shown in log are expected. When you run Zwift you should see more messages in the log and the launcher should have the zoffline screen instead of the default Zwift screen. If you still see the default Zwift screen, check if the launcher is running in the background and force it to quit.

fatsbrown commented 4 days ago

This is my /ect/hosts doc:127.0.0.1 us-or-rly101.zwift.com secure.zwift.com cdn.zwift.com launcher.zwift.com

Notice that you should not delete the default hosts file content, just append the new line at the bottom. I'm not sure about macOS, but on Windows if you delete the default content it causes problems.

https://osxdaily.com/2014/04/12/restore-original-hosts-file-mac/

gyqs commented 4 days ago

Like I commented in the other issue, these messages shown in log are expected. When you run Zwift you should see more messages in the log and the launcher should have the zoffline screen instead of the default Zwift screen. If you still see the default Zwift screen, check if the launcher is running in the background and force it to quit.

you are right bro,When i run zwift see more log,but still Zwift screen ,i check running in the background,kill all .py and zwift process but get same log,and i just append new line at the bottom.

gyqs commented 4 days ago

I dont konw which process should be force it to quit,i search start whit z and py,kill these all ,it not use

image
fatsbrown commented 4 days ago

Check if all redirected hosts are working with the ping command in terminal

ping secure.zwift.com
ping us-or-rly101.zwift.com

If some of them are not working, try to split the hosts redirection in multiple lines

127.0.0.1 us-or-rly101.zwift.com
127.0.0.1 secure.zwift.com
127.0.0.1 cdn.zwift.com
127.0.0.1 launcher.zwift.com
gyqs commented 4 days ago

Check if all redirected hosts are working with the ping command in terminal

yes,all redirected hosts can link 127.0.0.1

fatsbrown commented 4 days ago

Which option do you have selected in "Hide IP address from trackers"? If it's "from Trackers and Websites", try changing to "from Trackers only".

https://support.apple.com/en-jo/guide/safari/sfri35610/mac

Another thing you can try is redirecting also for IPv6

::1 us-or-rly101.zwift.com secure.zwift.com cdn.zwift.com launcher.zwift.com
fatsbrown commented 4 days ago

Since redirection works for the ping command, it seems to be a Safari issue, to verify you can open https://secure.zwift.com/login/ with zoffline running. If you see "Resource not found" instead of the zoffline screen, redirection is not working.

Also try running ~/Library/Application\ Support/Zwift/ZwiftAppSilicon (or ZwiftAppMetal if it's an Intel Mac) and login with any username and password to check if the redirection issue also affects ZwiftApp or only the launcher (which uses Safari).

gyqs commented 4 days ago

If you see "Resource not found" instead of the zoffline screen

yes,i skip to "Resource not found" and my "Hide IP address from trackers"setting is "from Trackers only".,trun off ipv4 is also doesn't work

fatsbrown commented 4 days ago

How about running ZwiftAppSilicon directly? Does it cause zoffline to show info in log?

Other things that can break hosts redirection:

gyqs commented 4 days ago

How about running ZwiftAppSilicon directly? Does it cause zoffline to show info in log?

oh,this option can open zwift,but i cant login,log :Login failed, check network connection,and when i try regis,submit button doesn't work

fatsbrown commented 4 days ago

oh,this option can open zwift,but i cant login,log :Login failed, check network connection,and when i try regis,submit button doesn't work

Do you see any messages in zoffline log?

gyqs commented 4 days ago

lots of line log

image

this is the end log

fatsbrown commented 4 days ago

lots of line log

Those are from ZwiftApp, I ask if you see something in "zoffline log" after the following lines

INFO:zoffline:server-ip.txt not found, using 192.168.3.12
INFO:zoffline:Server version 1.78.0 (136426) is running.
gyqs commented 4 days ago

The top log has been overwritten, other log no"zoffline log" ,by a way,i use VPN proxy,i don't know if this will have an impact

fatsbrown commented 4 days ago

The top log has been overwritten, other log no"zoffline log"

You need 2 terminal windows, 1 for standalone.py, other for ZwiftAppSilicon, can't run both in same terminal.

by a way,i use VPN proxy,i don't know if this will have an impact

It surely does. Try to disable proxy.

gyqs commented 4 days ago

i turn off proxy,and can login in ,but it quickly flashed back automatically, zoffline log:

image

ZwiftAppSilicon log:

image
fatsbrown commented 4 days ago

Can't you reach zoffline screen in launcher with proxy disabled? (running from the Zwift icon in applications)

gyqs commented 4 days ago

i test again,Whether open or close proxy ,the situation remains the same.i nend go to bed,now is 2:00 am,you are a very patient and nice guy,let's tomorrow to solve this problem,thank you ,have a good day.

fatsbrown commented 4 days ago

Have you tried these?

In the proxy settings you can try adding *zwift.com in "Bypass proxy settings for these Hosts and Domains".

jricoclq commented 4 days ago

1.检查电脑是否开了代理 2.关闭一切虚拟软件 3.检查HOSTS内127.0.01的定向是否准确,比如空格,等