Removing old sites stops at 0%

I cannot delete any sites from DevKinsta. It’s a longstanding issue. Each time it says “something bad has happened” at 0%. No error.

Is there a workaround to delete sites from DevKinsta?

Hello @Noelle_Steegs :wave:

Thank you for reaching us out in our community!
Could you please provide us (you can upload here) with the most recent main.log file from your local computer? So that we can check it and see what exactly has been logged in there related to that “something bad has happened” .

You may want to check this documentation here on how to check/get that main.log file.

Best Regards,
Agus Utomo

Hi there Agus,

Thanks so much for getting back to me so quickly. Here’s the log. It seems that it fails around some thumbnail process?

main.log (redacted)

Hello @Noelle_Steegs :wave:

I do see the error you are referring to but I don’t think that’s the one causing the issue. What I see above that error is:

[2024-02-07 09:56:24.391] [error] [ipcMainStep] Error in operation DELETE_SITE, step updateHosts: Error: Encountered an error: Error: Command failed: (after which the command is listed)

My current assumption is that Windows is preventing Devkinsta from accessing your hosts file, therefore, this seems to be a permission issue.

Did you try running Devkinsta as Administrator?

I have been having permission issues with the hosts file for foreeeeeeeever and update it manually with each and every site.

I just ran it with admin permission a moment ago, but the issue persists. I did have to make an edit in Windows security settings to do this, because I kept getting a “admin has blocked you from running this” message even though I am the admin.

Hi @Noelle_Steegs!

Thank you for your reply! I’m sorry to hear that you have constantly been having permission issues with the hosts file. I can imagine that is very frustrating having to update the hosts file manually each time.

We certainly want to help find a solution to this issue, as well as with any other permission issue happening. I am going to be escalating this issue with our DevKinsta developer team to see what could be causing the permission issues and error when trying to delete sites using DevKinsta. We will be providing another update as soon as possible once we have more details to share.

Please let us know however if you have any questions in the meantime!

Hi @Noelle_Steegs!

We are following up to obtain a bit more info from you about this issue that will help in our investigation.

We noticed you mentioned that you have to edit the hosts file manually. Does this mean you also have to manually edit the file when creating a new site? Or, do you only need to manually edit the file to remove the domains from deleted sites?

Also, do you see any errors during the site creation process as well or only during deletion?

We look forward to hearing from you!

Best regards

Hi Andrew,

Yes, I do have to manually update the hosts file every time I create a site.

I have seen many errors during site creation. And syncing, too… Generally I keep trying and after some Docker, DevKinsta and/or laptop reboots it eventually works (after having cost me heaps of time). I’d say that of the new sites I create, syncs I initiate, etc. less than 1 out of 3 is without errors.

Let me test by creating a new site, and get back to you with the errors.

When creating a standard new site, I get stuck after the installing WP step, and get the error: “Something bad has happened.” Then when I check the log I see it got stuck on accessing the hosts file.

Apologies for the delayed response.

We are still discussing this with our engineers. It is likely a permissions issue that might even go beyond DevKinsta. I will update this thread again when we have an idea or a suggestion.

Thanks for the update. I’m definitely curious what’s been causing all these issues. I have a pretty standard Windows 11 setup and am the admin of the machine. :man_shrugging:t2:

Hi @Noelle_Steegs!

Thank you for your patience while we have been investigating into this matter. We do have an update to share from our development team. They have explained that typically you should have been presented with a prompt asking you to allow DevKinsta permission to edit the hosts file. Did you ever see this prompt the first time you attempted to create or delete a site in DevKinsta?

We also do want to confirm a few things with you to ensure that DevKinsta has proper permissions to access the hosts file.

Within the Windows Settings → Privacy → File system page does DevKinsta appear to have file system permissions enabled?

Another thing that might be preventing DevKinsta from being able to access the hosts file could be antivirus software. Would it be possible to please try temporarily disabling any antivirus/malware software you have installed on the computer and try again?

We look forward to hearing back from you!

Yes, I didget those prompts before, accepted them, then get the error. Now I don’t get the prompts when creating a site, just the error.

Regarding the file system permissions, no list actually appears here. It looks like it wants to load a list, but then nothing. Enabling/disabling the options doesn’t reload a list either.

I have now tried to look into what could even cause such a thing, but no luck. :frowning:

I have no extra antivirus except Windows Security. I have played around a fair bit in the past with the settings there to try get DevKinsta to perform with less issues. DevKinsta is set to be allowed through the firewall.

Hey @Noelle_Steegs , can you please access the folder C:\Windows\System32\drivers\etc, use the right-click on the hosts file, go into properties and see if the file is set as read-only?

Alternatively, if you go one step back and use the right click on the etc folder, under Properties/Security do you have a way to grant write permission to you user or a specific app?

After I saw read-only permission on the etc folder and removed it, I got really hopeful, but when creating a site I still got the “something bad happened” error. In the log file it says access to the hosts file is denied.

I see why that happened - my etc folder keeps reverting back to read-only, no matter what I do. I am now zooming in on this. Have found some instrctions online re: user permissions that I am trying out. Waiting for all the file permissions to be updated… then I’ll revert back. I am following #3 of https://thegeekpage.com/folder-keeps-reverting-to-read-only/.

I have talked to an IT consultant, who set up my laptop for me. He’ll be looking into why my system keeps reverting back the etc folder.

Hi @Noelle_Steegs :wave:

Thank you for the update!

Please let us know when you check with the IT consultant if you can set permissions correctly and test again.

We are here if you have any questions in the meantime!

We look forward to hearing back from you!

I’m running current updated Win 11 for Workstations and have the same problems. I beleive the failure to delete sites is also related to the hosts file access problem.

I’m pretty sure this is a permissions issue too, but NOT beyond DevKinsta.
Every other app I run that needs to edit the hosts file (Docker/Laragon/LocalWP etc) all work just fine.
During testing I have opened up full access to the hosts file and even the containing folder to ‘anyone’ but only DevKinsta can’t edit the file. I have also run the install from a priveleged command prompt to bypass any elevation problems - same result.

I think we need to stop looking beyond DevKinsta to fix this.

This is a shame because if DevKinsta worked, it would be the best and fastest application of this type that I have come across yet. LocalWP works but response is so slow I can’t bring myself to work with it.

Edit:
I just remembered something else unusual - if I try to run the DevKinsta installation as administrator, I get a warning saying the application was blocked for my protection.
I have never seen this before for any other app and suspect it may be related.

Hi @Fishly :wave: and welcome to Kinsta Community Forum!

Thank you for reporting the similar / same problems on your end too! (though so far I myself have never experienced this case on my personal Windows 11 pro machine).

Anyway, we’ve also reported this to our internal DevKinsta developers and they’re still looking into it (and they also have created an internal ticket/task to review/investigate further for any issues and/or a potential replacement for a library we use in DevKinsta that handles the hosts file - especially for Windows environments).
If any bug fixes really need to be implemented, then it will be released in the next DevKinsta version most probably! :smiling_face:

We will update again as soon as we have any information/updates from them! :bowing_man:

Best regards,
Agus Utomo