phcode-dev / phoenix

Phoenix is a modern open-source Code Editor for the web, built for the browser.
https://phcode.io
GNU Affero General Public License v3.0
1.75k stars 124 forks source link

Save functionality not working #1710

Open outdoortejan opened 4 months ago

outdoortejan commented 4 months ago

Describe the bug

After saving a file with File > Save File or with the keyboard shortcut I'll try to close out the Phoenix code application and I am presented with a pop up saying my file is not saved. I select "save file" and try to close the application but the same pop up is shown. If I force close and reopen my changes to the file are gone.

Reproduction

No response

Expected behavior

Changes since last save are saved after closing and opening file.

OS, Browser and Phoenix versions

OS: MacOS

logs or debug stack trace if any

No response

Additional context

No response

abose commented 4 months ago

Is the file on a network disc by any chance? Or anything special about the setup

outdoortejan commented 4 months ago

Yes, the file is a network location. Google drive.

El lun, 24 jun 2024 a la(s) 1:51 p.m., Arun Bose @.***) escribió:

Is the file on a network disc by any chance? Or anything special about the setup

— Reply to this email directly, view it on GitHub https://github.com/phcode-dev/phoenix/issues/1710#issuecomment-2187198927, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL6NEGY6SLPEPPZYWQUIHKLZJBTCVAVCNFSM6AAAAABJ2AJ7ESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBXGE4TQOJSG4 . You are receiving this because you authored the thread.Message ID: @.***>

abose commented 4 months ago

This is a known issue with some network drives. How is Google drive mounted on your mac, is it any app from Google. Can you give some instructions on how to set up Google drive like your setup for me to recreate this issue.

outdoortejan commented 4 months ago

It's mounted via the google drive app for mac: https://www.google.com/drive/download/

Shouldn't Phoenix Code show some kind of error if its having trouble saving?

El lun, 24 jun 2024 a la(s) 10:18 p.m., Arun Bose @.***) escribió:

This is a known issue with some network drives. How is Google drive mounted on your mac, is it any app from Google. Can you give some instructions on how to set up Google drive like your setup for me to recreate this issue.

— Reply to this email directly, view it on GitHub https://github.com/phcode-dev/phoenix/issues/1710#issuecomment-2187891594, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL6NEGZK63RI5MWN6UFQECDZJDOQZAVCNFSM6AAAAABJ2AJ7ESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBXHA4TCNJZGQ . You are receiving this because you authored the thread.Message ID: @.***>

abose commented 4 months ago

Got it. Will try it out.

devishraq commented 4 months ago

Is this an incompatibility between Phoenix and network drives? Specifically, does Phoenix have difficulty interacting with virtual file systems like Google Drive when it's mounted as a network disk?

abose commented 4 months ago

Yes, there are known compatibility issues with network drives. This fix is a bit hard as Phoenix keeps track of modified times of files to detect external changes and network drives like gdrive change file modified times unpredictably depending on network sync latency. Since we r getting a few reports, i guess will have to address this soon.