Can’t create Local site under WSL2 Ubuntu 22.04

New to Local. Getting the following errors when selecting “Site Domains” as router mode:

[GraphQL error]: Message: Unauthenticated., Location: [object Object], Path: logout
[GraphQL error]: Message: Unauthenticated., Location: [object Object], Path: logout
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: Error: No polkit authentication agent found.

Error executing command as another user: No authentication agent found.

exitCode: 127
at /opt/Local/resources/app.asar/main/_helpers/sudo.js:1:1076
at /opt/Local/resources/app.asar/node_modules/sudo-prompt/index.js:191:11
at ChildProcess.exithandler (node:child_process:415:5)
at ChildProcess.emit (node:events:527:28)
at ChildProcess.emit (node:domain:475:12)
at maybeClose (node:internal/child_process:1092:16)
at Socket. (node:internal/child_process:451:11)
at Socket.emit (node:events:527:28)
at Socket.emit (node:domain:475:12)
at Pipe. (node:net:709:12)
10/13/2023, 10:51:00 AM [warn] [main] undefined: Unhandled Rejection. – {“reason”:{},“p”:{},“eventId”:“1cfe2ba222bd4b3284d730cfbf4d777d”}
(node:2716) UnhandledPromiseRejectionWarning: Error: Error: No polkit authentication agent found.

Error executing command as another user: No authentication agent found.

exitCode: 127
at /opt/Local/resources/app.asar/main/_helpers/sudo.js:1:1076
at /opt/Local/resources/app.asar/node_modules/sudo-prompt/index.js:191:11
at ChildProcess.exithandler (node:child_process:415:5)
at ChildProcess.emit (node:events:527:28)
at ChildProcess.emit (node:domain:475:12)
at maybeClose (node:internal/child_process:1092:16)
at Socket. (node:internal/child_process:451:11)
at Socket.emit (node:events:527:28)
at Socket.emit (node:domain:475:12)
at Pipe. (node:net:709:12)
10/13/2023, 10:51:00 AM [info] [main] undefined: Warning:Error: Error: No polkit authentication agent found.

Error executing command as another user: No authentication agent found.

exitCode: 127
at %%appPath%%/main/_helpers/sudo.js:1:1076
at %%appPath%%/node_modules/sudo-prompt/index.js:191:11
at ChildProcess.exithandler (node:child_process:415:5)
at ChildProcess.emit (node:events:527:28)
at ChildProcess.emit (node:domain:475:12)
at maybeClose (node:internal/child_process:1092:16)
at Socket. (node:internal/child_process:451:11)
at Socket.emit (node:events:527:28)
at Socket.emit (node:domain:475:12)
at Pipe. (node:net:709:12) – {“name”:“UnhandledPromiseRejectionWarning”,“stack”:“UnhandledPromiseRejectionWarning: Error: Error: No polkit authentication agent found.\n\nError executing command as another user: No authentication agent found.\n\nexitCode: 127\n at %%appPath%%/main/_helpers/sudo.js:1:1076\n at %%appPath%%/node_modules/sudo-prompt/index.js:191:11\n at ChildProcess.exithandler (node:child_process:415:5)\n at ChildProcess.emit (node:events:527:28)\n at ChildProcess.emit (node:domain:475:12)\n at maybeClose (node:internal/child_process:1092:16)\n at Socket. (node:internal/child_process:451:11)\n at Socket.emit (node:events:527:28)\n at Socket.emit (node:domain:475:12)\n at Pipe. (node:net:709:12)\n at emitUnhandledRejectionWarning (node:internal/process/promises:191:15)\n at processPromiseRejections (node:internal/process/promises:270:11)\n at process.processTicksAndRejections (node:internal/process/task_queues:97:32)”}
(node:2716) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line API | Node.js v20.8.0 Documentation). (rejection id: 5)
10/13/2023, 10:51:00 AM [info] [main] undefined: Warning:Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line API | Node.js v20.8.0 Documentation). (rejection id: 5) – {“stack”:“Error: Error: No polkit authentication agent found.\n\nError executing command as another user: No authentication agent found.\n\nexitCode: 127\n at %%appPath%%/main/_helpers/sudo.js:1:1076\n at %%appPath%%/node_modules/sudo-prompt/index.js:191:11\n at ChildProcess.exithandler (node:child_process:415:5)\n at ChildProcess.emit (node:events:527:28)\n at ChildProcess.emit (node:domain:475:12)\n at maybeClose (node:internal/child_process:1092:16)\n at Socket. (node:internal/child_process:451:11)\n at Socket.emit (node:events:527:28)\n at Socket.emit (node:domain:475:12)\n at Pipe. (node:net:709:12)”}

(local:2716): libnotify-WARNING **: 10:51:00.865: Failed to connect to proxy

(local:2716): libnotify-WARNING **: 10:51:00.865: Failed to connect to proxy

(local:2716): libnotify-WARNING **: 10:51:00.865: Failed to connect to proxy
[2716:1013/105100.866084:ERROR:libnotify_notification.cc(49)] notify_notification_show: domain=1210 code=1 message=“Could not connect: No such file or directory”
10/13/2023, 10:51:00 AM [info] [main] HostsFileService: Updating hosts with
10/13/2023, 10:51:00 AM [error] [main] HostsFileService: Could not update hosts. – {“error”:{},“stdout”:{},“stderr”:{},“exitCode”:{}}


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

Just select “Site Domains” as Router mode in the Preferences → Advanced options

System Details

  • Local Version:
    Linux MSI 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • Operating System (OS) and OS version:
    PRETTY_NAME=“Ubuntu 22.04.3 LTS”
    NAME=“Ubuntu”
    VERSION_ID=“22.04”
    VERSION=“22.04.3 LTS (Jammy Jellyfish)”
    VERSION_CODENAME=jammy
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL=“https://www.ubuntu.com/
    SUPPORT_URL=“https://help.ubuntu.com/
    BUG_REPORT_URL=“Bugs : Ubuntu
    PRIVACY_POLICY_URL=“Data privacy | Ubuntu
    UBUNTU_CODENAME=jammy

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

local-lightning-verbose.log (178.4 KB)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @deladWP

You mentioned you’re getting these errors when using Site Domains. Does that mean if you change your Router Mode to Localhost it will work?

This would be under Preferences>Advanced>Router Mode>Localhost

Yes, works OK when using Localhost.

1 Like

image

am having this error trying to create site, please what do i need to do

Hi @godfirst

Are you specifically trying to create a site under WSL2 using Ubuntu 22.04? If your error isn’t related to the above thread could you create your own post and include your OS, Local version, and Local Logs to help us troubleshoot further? Thank you!

Hi @deladWP!

Based on what we’ve seen from other users it might work if you downgrade to Local 7.1

But one of the other devs provided some troubleshooting steps on a similar thread here that might help debug things further:

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