Blank/empty files on creating new project from existing files
Hi,
We used the Web server is installed locally, source files are located under its document root. option to create a new project from existing files. Now they all show a 0Kb size and have nothing in them. Is there any way to get them back?
Yes, we realise now we should not have picked that option.
请先登录再写评论。
Hi Stephen,
We don't have any reports about similar behavior and I can't reproduce this issue - creating project from existing files in the described way should be totally fine.
Are your hard disk and file system healthy? Did you check them for errors? Can you reproduce this issue again with some other project?
As for current project files, you can try to check the local history in PhpStorm: <https://www.jetbrains.com/phpstorm/help/local-history.html>.
Hi Vladimir,
No, there's nothing in local history. We've done this a few times before, so frankly it's a surprise. At this stage we'll assume the files are gone, and it was a freak occurrence that can't be reproduced.
I'll double-check the disk and file system, just in case.
Thanks.
i have the same issue on every new project, when i create new projects "web server is on remote host, files are accessible via SFTP" for the first time. the most files are empty (0 KB). i have to start the download for a second time and overwrite all files.
i use PhpStorm on macOS
There is a known issue on YouTrack and, at the first glance, your scenario resembles it:
https://youtrack.jetbrains.com/issue/WI-64476/New-Project-from-Existing-Files-empty-files-are-created-on-a-connection-error-project-opens-like-nothing-happened
Do you have anything like "Stream closed" in your IDE logs? (Help > Show Log in...)
Yes, the log shows several times the entry:
"Caused by: net.schmizz.sshj.connection.ConnectionException: Stream closed"
Is there a way to prevent that?
This week I had the problem that an empty file was automatically uploaded to live server and the website went off
Thank you for the confirmation.
Unfortunately, there is no way to prevent it at the moment and the only workaround is to create a new empty project and set up deployment afterwards.
Or does it happen even when the project is set up?
On a first test, all files were downloaded correctly. I will keep watching it. Thanks for the hint…