Host file update failed DK0022 (authorization never requested) [Mac]

Q: Date/Time this occurred (Provide your time zone also)
A: 2022-03-15 10:00AM Pacific

Q: DevKinsta Version
A: 2.4.1 (2.4.1.3185)

Q: OS Version
A: macOS Catalina 10.15.7

Q: Docker Desktop Version
A: 4.6.0 (75818)

Q: Were any error codes or messages observed? If so, what were they?
A: Host file update failed (DK0022)

Q: Detailed Description of the Problem
**A: When importing a staging site from our Kinsta account, the import fails on the 4th step with the “Host file update failed (DK0022)” error. Usually this process prompts me for my administrator password before attempting to change the hosts file but in this case it is just failing, no prompt. Clicking “Retry” just spins the loader for a few seconds and then fails again. I tried completely uninstalling and reinstalling both Docker and DevKinsta multiple times and I run into the same problem.

I did notice there were existing bug reports but they were all for windows, with the suggested solution of running the app as administrator. Does mac have a similar solution?**

Update 1
Here is the output to the log file when I click “Retry”:

[2022-03-15 11:47:11.970] [info]  [ViewSite] checking site unread emails
[2022-03-15 11:47:11.971] [info]  [getSiteMailbox] Update site mailbox with API query: search?kind=containing&query=scribeconnect.local
[2022-03-15 11:47:11.989] [info]  [getSiteMailbox] 0 emails retrieved. for domain scribeconnect.local
[2022-03-15 11:47:12.009] [info]  [addHostfileEntries] Start adding host entries
[2022-03-15 11:47:12.010] [info]  [hosts] Add host entries: [
  {
    "ip": "127.0.0.1",
    "host": "scribeconnect.local",
    "wrapper": "DEVKINSTA"
  },
  {
    "ip": "127.0.0.1",
    "host": "www.scribeconnect.local",
    "wrapper": "DEVKINSTA"
  },
  {
    "ip": "::1",
    "host": "scribeconnect.local",
    "wrapper": "DEVKINSTA"
  },
  {
    "ip": "::1",
    "host": "www.scribeconnect.local",
    "wrapper": "DEVKINSTA"
  }
]
[2022-03-15 11:47:12.018] [info]  [ProgressIndicator] { isFailed: false, isOpen: true }
[2022-03-15 11:47:12.835] [error] ERROR: Error: 652411:652412: syntax error: Expected “"” but found unknown token. (-2741)

    at ChildProcess.<anonymous> (file:///Applications/DevKinsta.app/Contents/Resources/app.asar/dist/renderer.prod.js:8:2069937)
    at ChildProcess.emit (node:events:394:28)
    at ChildProcess.emit (node:domain:475:12)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:394:28)
    at Socket.emit (node:domain:475:12)
    at Pipe.<anonymous> (node:net:672:12)
[2022-03-15 11:47:12.836] [error] Error: 652411:652412: syntax error: Expected “"” but found unknown token. (-2741)

    at ChildProcess.<anonymous> (file:///Applications/DevKinsta.app/Contents/Resources/app.asar/dist/renderer.prod.js:8:2069937)
    at ChildProcess.emit (node:events:394:28)
    at ChildProcess.emit (node:domain:475:12)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:394:28)
    at Socket.emit (node:domain:475:12)
    at Pipe.<anonymous> (node:net:672:12)
[2022-03-15 11:47:12.890] [error] Error: 652411:652412: syntax error: Expected “"” but found unknown token. (-2741)

    at ChildProcess.<anonymous> (file:///Applications/DevKinsta.app/Contents/Resources/app.asar/dist/renderer.prod.js:8:2069937)
    at ChildProcess.emit (node:events:394:28)
    at ChildProcess.emit (node:domain:475:12)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:394:28)
    at Socket.emit (node:domain:475:12)
    at Pipe.<anonymous> (node:net:672:12)
[2022-03-15 11:47:12.900] [info]  [ViewSite] checking site unread emails
[2022-03-15 11:47:12.901] [info]  [getSiteMailbox] Update site mailbox with API query: search?kind=containing&query=scribeconnect.local
[2022-03-15 11:47:12.913] [info]  [getSiteMailbox] 0 emails retrieved. for domain scribeconnect.local
[2022-03-15 11:47:12.946] [info]  [ProgressIndicator] { isFailed: true, isOpen: true }

Screen Shot 2022-03-15 at 10.43.19 AM

Hi @phil-s, welcome to DevKinsta!

I’ve never seen this error come up for Mac. I don’t think it’s as straightforward to Run as Administrator on Mac but it is possible. You would basically have to make sure DevKinsta is “chowned” by root or make sure you are running the App as the root user.

There are some guides here: 3 Ways to Open Applications With Root Privileges on a Mac

Please let me know if none of these options work for you. If that doesn’t work, we might have to look into what is causing this error:

[2022-03-15 11:47:12.835] [error] ERROR: Error: 652411:652412: syntax error: Expected “"” but found unknown token. (-2741)

I just tried running the app as root from the console and I ran into the same issue, same error. This seems to be an issue with this laptop specifically as a team member was able to install DevKinsta no problem earlier today.

I was able to get it working. I had an ad blocker installed that added a ton of entries to my hosts file. I reset it to the default (based on another laptop) and tried again and was prompted for my password and everything worked as expected.

You can close this out. Thanks for the help.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.