zoffline / zwift-offline

Use Zwift offline
GNU Affero General Public License v3.0
766 stars 123 forks source link

Crashing after login - Mac Ventura #318

Closed RNall17 closed 8 months ago

RNall17 commented 8 months ago

I have followed the instructions as best I can, and attempted some of the fixes in resolved issues (e.g., editing the variants file as in issue #200 ).

I am able to log in and pair sensors, but the app crashes when attempting to ride or "just watch." Terminal shows Segmentation Fault: 11 after the crash. Screenshot 2024-03-08 at 9 06 32 AM This is the cacert file with the added certificate Screenshot 2024-03-08 at 9 06 50 AM I have also updated the ZwiftMac_Ver_Curr file in Zwift_Updates_Root

Lastly, here is the changed host file line. Screenshot 2024-03-08 at 9 07 13 AM

Any help is much appreciated!

fatsbrown commented 8 months ago

I have also updated the ZwiftMac_Ver_Curr file in Zwift_Updates_Root

You should not need to do that because zoffline is up to date with the latest Zwift client. If you are updating an old zoffline installation, you should update from the repository instead. If everything is up to date but the client still crashes, the file Log.txt (Documents/Zwift/Logs) may contain some hint about the crash reason.

RNall17 commented 8 months ago

Thanks for the quick reply!

I assumed this was updated, and I cloned the repo, so everything should be up to date. The variants file change wa removed after I tried it yesterday.

Here is the last bit of the most recent log showing an internal server error. Screenshot 2024-03-08 at 9 42 17 AM

fatsbrown commented 8 months ago

Please show the zoffline output, it probably contains an error right before a PUT /api/profiles/1/in-game-fields request.

Make sure you have the versions of Python modules specified in the file requirements.txt

RNall17 commented 8 months ago

Here is the zoffline output. You are correct that there is an error prior to PUT /api/profiles/1/in-game-fields Screenshot 2024-03-08 at 10 55 39 AM

I have checked permissions for both terminal and python, both have full access to all folders and docs in the documents folder. I toggled this off and back on to make sure, and manually changed the permissions to the profile.bin file to grant everyone read/write access. and still get the same error.

fatsbrown commented 8 months ago

It does look like a permission issue, odd because Python needs to be run as root to be able to bind to privileged ports.

I would try cloning the repository outside Documents (directly in your home directory).

This may help https://discuss.python.org/t/mac-ventura-permissions-error-with-os-module-solved/29580

RNall17 commented 8 months ago

I seem to have fixed the permissions issue by manually granting all users read/write permissions to each of the files with a permissions error in the zoffline output (these persisted when cloning to the home directory). So, one step in the right direction!

However, now I get a broken pipe error with the same symptoms as before - zwift crashes after login. Screenshot 2024-03-08 at 11 32 46 AM

For what it's worth, I noticed the zwift username is now set to zoffline. Before, it was my username. Now it will log in no matter what password is input and I cannot change the username.

fatsbrown commented 8 months ago

It looks like your Zwift client is not up to date, those "unknown features" you see in zoffline output were removed in recent updates.

Try to set read and write permission to all users in the entire storage directory recursively (sudo chmod -R ugo+rw zwift-offline/storage).

I noticed the zwift username is now set to zoffline

This is normal.

RNall17 commented 8 months ago

@fatsbrown That was the remaining issue. You're a legend. After re-downloading the latest version of zwift and recopying the ZwiftMac_Ver_Curr file in Zwift_Updates_Root it seems to be working. You're patience and assistance are very much appreciated!

fatsbrown commented 8 months ago

Glad you got it working. One detail, I noticed there are no requests from the launcher in zoffline output, are you executing the app binary directly? The launcher is not mandatory but it has useful features (also skips the login screen where you mentioned the username is zoffline).

RNall17 commented 8 months ago

To be perfectly honest, I have no idea how, but I think I was launching the app directly. When I reinstalled Zwift, there was a launcher screen that I cannot remember having seen before... In case it hasn't been readily apparent, I am not exactly well-versed in this level of computer detail. It is working now, however, and you're the one to thank. Hopefully, any other mac users as inept as me will find your useful comments here.