DNS server coming from vpn network is not reflected in WSL

A brief description
I've L2TP/IPsec vpn connection without default gateway set and own DNS server

Expected results
Bash should add VPN DNS IP to /etc/resolv.conf

Actual results (with terminal output if applicable)
No VPN DNS IP in /etc/resolve.conf . It works though if i set "use default gateway on remote network" (generally i don't want) setting in vpn configuration.

Your Windows build number
14965.1001

@asvetliakov - Thanks for reporting the issue. Yes, we are aware of issues with VPN, as you can also see in #416. We are actively working on a solution for this. @misenesi as FYI.

Hi @asvetliakov, could you please provide output when you do:
ipconfig /all
?
I have a fix prepared for this, but need to verify that your VPN networking interface is reported as point-to-point interface.

@misenesi
PS C:\Users\asvet> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . .     : No
   DNS Suffix Search List. . . . . . : Home

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  .    : Yes
   Autoconfiguration Enabled . . . .    : Enabled

PPP adapter freechat.com:

   Connection-specific DNS Suffix  .   : No
   Autoconfiguration Enabled . . . .    : Media disconnected
   Connection-specific DNS Suffix  .   : Yes
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Local Area Connection* 10:

   Connection-specific DNS Suffix  .   : No
   Autoconfiguration Enabled . . . .   : Disabled

The one with name 'freechat.com' is my VPN

Thank you @asvetliakov . I have checked in a fix that will address some of the VPN DNS resolving issues, including yours. Currently for DNS resolving we update /etc/resolv.conf from the service. In this fix I added the capability to manually modify the /etc/resolv.conf file if you wish so, disabling its automatic regeneration.
However, due to how DNS resolving works for various VPN solutions, this fix will only work with strict force tunnel VPN. I have a proposal for better fix prepared for that and we are currently discussing it.

@misenesi With creators update installed, the automic generation cannot be disabled on my system. Even if I remove the first line, it still get regenerated every single time. It's working for /etc/hosts though.

@blemasle - @misenesi is no longer with MSFT.
It looks like we screwed up the /etc/resolv.conf auto-generation logic, see @benhillis comment in #1908.
Here is the background. By default, bash.exe will auto-generate /etc/resolv.conf every time you launch bash.exe. Then it will try to keep it up to date with changes from Windows, when bash is running. It looks like if you remove the first line, we stop auto-update of the file while bash is running, but forgot to disable the logic to auto-generate during bash launch. We do apologize for the inconvenience and as @benhillis mentions in #1908, we are looking to improve the experience here.

I don't know if this is still a problem for anyone else. I am on build 16232.rs_prerelease.170624-1334 using WSL with Ubuntu 16.04.2 LTS from the Windows Store and CISCO AnyConnect version 21.12020 , and I still can't connect. I tried removing the commented line in /etc/resolv.conf, but it still get's reset. I don't know if there has a been a fix posted yet, but I haven't found it online if it exists.

The problem I'm seeing is that the ordering of the dns servers is incorrect when the vpn is connected. as a reslult, I can't resolve any of the hosts behind the vpn. I'm running windows 15063.483 with Cisco Anyconnect. The dns bindings in windows are the following:
> Get-DnsClientServerAddress -AddressFamily ipv4 | Select-Object -ExpandProperty ServerAddresses
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>

in ubuntu the are the following:
$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, remove this line.
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
search home xyz.vpn

If you are connected to a VPN and lose connectivity within bash, please try the workaround posted here. It should work for Creators Update and above. Post Fall Creators Update, we will be looking at a better support for other VPN solutions.
Thanks to @bradley101, who first pointed out the workaround.

Thank you that works around that. The only other thing is to get the list of domain suffixes, but that is 2nd order.

here's a more automatic workaround that works for me - in my case I only ever connect to one VPN at a time and its nameserver is at the very end of /etc/resolv.conf, which of course is no good.
YMMV but, first...
create a file in /etc/sudoers.d with allowing your username to run sudo with no password; you can restrict this to specific commands if you want but I do it for all (please adjust for your needs).  For example let's say your username is linux, so create the file /etc/sudoers.d/00-linux (you can call this whatever you want), with the following text in it:
linux ALL=(ALL) NOPASSWD: ALL

you'll need to of course sudo to root to create that file.  Be sure to replace "linux" with whatever your username is in WSL.
Close the shell and all instances of WSL and run a new one, and try it - type sudo -s
if you are not prompted for password, it worked.  Otherwise please check the syntax.
Next, create this python file in your home directory = call it resolv_flip.py :
#!/usr/bin/python

if __name__ == '__main__':
    with open('/etc/resolv.conf', 'r') as f:
        lines = f.read().splitlines()
    ns = []
    other = []
    for i in lines:
        if i[:11] != 'nameserver ':
            other.append(i)
        elif i[11:][:2] == '8.':
            ns.append(i)
        else:
            ns.insert(0, i)
    with open('/etc/resolv.conf', 'w') as f:
        f.write('\n'.join(other) + '\n')
        f.write('\n'.join(ns) + '\n')

finally, add this to the end of your ~/.bashrc file:
sudo ~/resolv_flip.py

from that point forward every time you run the WSL shell it will flip the nameservers so that anything that doesn't start with 8. will be at the top, but it won't disturb the comment header that is used to autogenerate the file (because we need that information in order for this to work).
It's not perfect but it works fine for me, and it's dead simple.
Enjoy,
Leo Reiter

For me, DNS lookups via my corporate nameserver (on VPN) won't resolve external domains, so just swapping nameserers in resolv.conf only allows me to swap between "only resolve external" and "only resolve internal"
I'm still hoping something can be done to proxy DNS requests out to the windows host resolver.

Makes sense.. this worked for me but my DNS does external as well.  It's too bad this is isn't properly fixed yet.. it's a great set of tools that are almost unusable as a result.

@l8nite - If the VPN DNS server is not able to resolve a name, then glibc resolver should walk the list in /etc/resolv.conf and try the next nameserver on the list. Are you suggesting that that's not happening?

that's not how the resolver works on Linux... it only goes to the next server if the primary (or secondary, etc.) is not accessible.  Otherwise it would work fine to just keep it as it is.  In our case our DNS can do external resolution as well, so it's not a problem for me to just switch the order.

@sunilmut FYI, this explains it pretty well:
http://man7.org/linux/man-pages/man5/resolv.conf.5.html
specifically:
"nameserver Name server IP address
Internet address of a name server that the resolver should
query, either an IPv4 address (in dot notation), or an IPv6
address in colon (and possibly dot) notation as per RFC 2373.
Up to MAXNS (currently 3, see <resolv.h>) name servers may be
listed, one per keyword.  If there are multiple servers, the
resolver library queries them in the order listed.  If no
nameserver entries are present, the default is to use the name
server on the local machine.  (The algorithm used is to try a
name server, and if the query times out, try the next, until
out of name servers, then repeat trying all the name servers
until a maximum number of retries are made.)"
unfortunately a name resolution error is not enough to say "try the next one" - it has to actually timeout or fail to connect in order to move to the next.
I don't know how hard or easy this kind of thing is, but perhaps a good long term solution is to just somehow forward NS requests to the native Windows resolver services, which actually do a very good job at this (arguably better than the glibc one).

@nimbixler - Thanks for the pointer. So, the default DNS resolver on Ubuntu, network-manager must have a better logic than glibc to do the resolution because obviously it works.
Redirecting the DNS requests to Windows service is not totally out of scope, but the solution from WSL point of view will look a bit different because all the NS resolution in Linux happens in user space, where WSL has no role to play.

@sunilmut I haven't used desktop Linux in a while, but my guess is that it's providing some sort of caching name service that is being smarter about name resolution on the back end.  It may be worth looking into that approach as well - doing whatever NetworkManager (plus whatever name service) does, perhaps even packaging it up that way.
Just trying to help - you guys did a great thing here, want to make sure it gets used ;-)
Leo Reiter

@donaldpipowitch check out this solution https://github.com/Microsoft/WSL/issues/2082#issuecomment-369994557

It's been almost a year since the last significant comment on this.  Is this still being investigated?  This still seems like a problem.

I also tried to get deadwood running like described here. issue 2082, but it still doesn't work.
Is there any chance of a solution for this?

I'm using this bash script to generate the proper resolv.conf based on current windows DNS configuration values, which I run each time the windows DNS settings change (i.e. when connecting to a VPN server) or the resolv.conf file gets overwritten by WSL for some reason.
#!/bin/bash

tmp=`mktemp`
powershell="/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe"
trap ctrlC INT

removeTempFiles() {
    rm -f $tmp
}

ctrlC() {
    echo
    echo "Trapped Ctrl-C, removing temporary files"
    removeTempFiles
    stty sane
}

echo "Current resolv.conf"
echo "-------------------"
cat /etc/resolv.conf

echo
echo "Creating new resolv.conf"
echo "------------------------"

{
    head -1 /etc/resolv.conf | grep '^#.*generated'
    nameservers=$($powershell \
        -Command "Get-DnsClientServerAddress -AddressFamily ipv4 | Select-Object -ExpandProperty ServerAddresses" \
        )
    for i in $nameservers; do
        echo nameserver $i
    done
    tail -n+2 /etc/resolv.conf | grep -v '^nameserver'
} | tr -d '\r' | tee $tmp

(set -x; sudo cp -i $tmp /etc/resolv.conf)

removeTempFiles

You can mark this script setuid with owner root, so it doesn't ask for password through sudo every time.

I resolved this issue basically by applying the following steps:

Locate the VPN adapter over the network settings. To go there:
a. Go to Settings
b. Click on Network & Internet
c. Change adapter options

Right click on the VPN virtual network, and click on properties.

In my case I selected IPv4, and then click on properties

You will see the DNS settings that are set statically

You will need to copy these DNS settings to your /etc/resolv.conf. It is advisable that if the DNS failover is turned on you can add all of the DNS settings from various adapters. A simple script that generates a bash file with the commands for all of the adapters is as the following;
function PopulateDNSServers()
{
    $DNSServers = Get-DnsClientServerAddress | Select-Object –ExpandProperty ServerAddresses

    #Create the bash file
    $FileName = 'C:\Users\' + $env:USERNAME + "\WSLDNSFix.bash"
    Write-Host $FileName

    New-Item $FileName -type file

    echo "#!/bin/bash" >> $FileName
    echo "sudo cp /etc/resolv.conf{,.bkp}" >> $FileName
    echo "sudo rm /etc/resolv.conf" >> $FileName
    echo "sudo touch /etc/resolv.conf" >> $FileName

    foreach($serverAddress in $DNSServers)
    {
        $lineToAdd = "nameserver " + $serverAddress
        $Command = "sudo sh -c ""echo " + $lineToAdd + " >>/etc/resolv.conf"""
        echo $Command >> $FileName

    }
}

Once these are done, you can restart your WSL, and should be good.

Deven,
This works great unless you only have nameserver entries in your resolv.conf.  This was my situation so I had to elide the command to move to the previous line '-' and just make it kx because I was already at the first line.  Is there a more general way to do this?

@chiamarc I am curious, does the GIST I provided here resolve your DNS issues?

Deven,
This works great unless you only have nameserver entries in your resolv.conf. This was my situation so I had to elide the command to move to the previous line '-' and just make it kx because I was already at the first line. Is there a more general way to do this?

Yes, I came up with a solution and edited my comment above to fix this problem.  The new version should work for your situation.  I updated the explanation as well.

Thanks @deven !

@deven thanks for the workaround. Any idea with executing the script change the layout of the bash?

This simple solution worked for me:
Fix DNS resolution in WSL2

None of the solutions work for me while running a VPN :( Might it have something to do that running the powershell command, I just get a single "<IP_ADDRESS>" address (same as before connecting)?
Also, when I inspect the connection properties in the command panel -> IPv4 settings -> DNS address, I just get "DNS resolved dynamically", and can't see what the true DNS address is of my currently connected VPN.
Does someone have any ideas?

I don't know how relevant this is anymore, but this works for me (a bash function that I run from .bashrc):
dnsfix () {     /mnt/c/Windows/system32/ipconfig.exe /all | grep --color=auto "DNS Servers" | cut -d ":" -f 2 | grep --color=auto -e '^ [0-9]' | sed 's/^/nameserver/' | sudo tee /etc/resolv.conf > /dev/null }
If I ever connect to VPN and have a WSL session open already, and done want to open another one, I just type dnsfix in the shell manually.  Otherwise running a new session will do this.  Note that you have to have passwordless sudo setup for your shell user, which I did like this:
ler@LAPTOP-LEO:~$ cat /etc/sudoers.d/00-ler ler ALL=(ALL) NOPASSWD: ALL
replace ler with whatever your username is for WSL of course.

I don't know how relevant this is anymore, but this works for me (a bash function that I run from .bashrc):
dnsfix () { /mnt/c/Windows/system32/ipconfig.exe /all | grep --color=auto "DNS Servers" | cut -d ":" -f 2 | grep --color=auto -e '^ [0-9]' | sed 's/^/nameserver/' | sudo tee /etc/resolv.conf > /dev/null }
If I ever connect to VPN and have a WSL session open already, and don't want to open another one, I just type dnsfix in the shell manually. Otherwise running a new session will do this. Note that you have to have passwordless sudo setup for your shell user, which I did like this:
ler@LAPTOP-LEO:~$ cat /etc/sudoers.d/00-ler ler ALL=(ALL) NOPASSWD: ALL
replace ler with whatever your username is for WSL of course.
Thank you for your awesome script.
Added fix on DOS CR-LF

/mnt/c/Windows/system32/ipconfig.exe /all | grep --color=auto "DNS Servers" | cut -d ":" -f 2 | grep --color=auto -e '^ [0-9]' | sed 's/^/nameserver/' |tr -d '\r' | sudo tee /etc/resolv.conf > /dev/null

I'm in the same boat as @sgarcia-dev:

None of the solutions work for me while running a VPN :( Might it have something to do that running the powershell command, I just get a single "<IP_ADDRESS>" address (same as before connecting)?

I'm in the same boat as @sgarcia-dev:

None of the solutions work for me while running a VPN :( Might it have something to do that running the powershell command, I just get a single "<IP_ADDRESS>" address (same as before connecting)?

Look at mine comment

@MGlants like I said, it doesn't work for me since it only returns <IP_ADDRESS>, which is already in /etc/resolv.conf:
~$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, remove this line.
nameserver <IP_ADDRESS>
nameserver fec0:0:0:ffff::1
nameserver fec0:0:0:ffff::2

~$ /c/Windows/system32/ipconfig.exe /all | grep --color=auto "DNS Servers" | cut -d ":" -f 2 | grep --color=auto -e '
^ [0-9]' | sed 's/^/nameserver/' | tr -d '\r'
nameserver <IP_ADDRESS>

For WSL1 on Win 10 2004, WSL1 works very well with VPN:
Just need to enable [network]generateResolvConf.
I.e.
robert@OFFICE-LAPTOP:~$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
nameserver fec0:0:0:ffff::1
robert@OFFICE-LAPTOP:~$ #disconnect VPN
robert@OFFICE-LAPTOP:~$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver <IP_ADDRESS>
nameserver fec0:0:0:ffff::1
nameserver fec0:0:0:ffff::2
robert@OFFICE-LAPTOP:~$ #connect VPN
robert@OFFICE-LAPTOP:~$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
nameserver fec0:0:0:ffff::1

This solution works with MoitonPro and built-in L2TP VPN.

I don't know how relevant this is anymore, but this works for me (a bash function that I run from .bashrc):
dnsfix () { /mnt/c/Windows/system32/ipconfig.exe /all | grep --color=auto "DNS Servers" | cut -d ":" -f 2 | grep --color=auto -e '^ [0-9]' | sed 's/^/nameserver/' | sudo tee /etc/resolv.conf > /dev/null }
If I ever connect to VPN and have a WSL session open already, and don't want to open another one, I just type dnsfix in the shell manually. Otherwise running a new session will do this. Note that you have to have passwordless sudo setup for your shell user, which I did like this:
ler@LAPTOP-LEO:~$ cat /etc/sudoers.d/00-ler ler ALL=(ALL) NOPASSWD: ALL
replace ler with whatever your username is for WSL of course.

I encountered 2 little problems with this script:

it was unable to work with ipv6 addresses as those use : as delimiters
windows newline characters were taken from the ipconfig.exe command so the /etc/resolv.conf file was no longer understood by linux utilities

dig: parse of /etc/resolv.conf failed```

I solved those by adding a dash at the end of the `cut` command then I installed `dos2unix` utility to get rid of windows newlines. Working script looks as follows for me now:

$ cat dnsfix.sh
#!/bin/bash
helper script to update dns setting while on VPN
/mnt/c/Windows/system32/ipconfig.exe /all | grep --color=auto "DNS Servers" | cut -d ":" -f 2- | grep --color=auto -e '^ [0-9]' | sed 's/^/nameserver/' | sudo tee /etc/resolv.conf > /dev/null
sudo dos2unix /run/resolvconf/resolv.conf

@zahaim check out my GIST It's an Init.d service to keep DNS in sync
To support IPv6 as well as IPv6 remove -AddressFamily IPv4 from line 22

There's probably a way to do this with 1 line of awk, but here's my fix.  This handles ipv4 AND ipv6 and search parameters.  Don't know if it's i18n aware.
dnsfix () {
    local search=$(grep -F "search" /etc/resolv.conf);
    local nameservers=$(/mnt/c/Windows/system32/ipconfig.exe /all | grep -F "DNS Servers" | cut -c 40- | tr -d '\r' | sed 's/^/nameserver /');
    printf '%s on %s\n%s\n%s\n' '# generated by dnsfix' "`date`" "${nameservers}" "${search}" | sudo tee /etc/resolv.conf;
}

Which generates the following /etc/resolv.conf
# generated by dnsfix on Thu Apr 16 14:04:20 EDT 2020
nameserver X.X.X.X
nameserver XXXX:6940:6b2e::1
search example.net

WSL1: For some people may work this simple script, while keeping the file automatically managed by WSL:
cat /etc/resolv.conf | sort | sudo tee /etc/resolv.conf

Generating the following result:
# This file was automatically generated by WSL. To stop automatic generation of this file, remove this line.
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
search my-home-lan corporate.com

Note that sorting may inadvertently place DNS servers added by the VPN lower in the search list, preventing resolution of internal hostnames known only that DNS.
For example, unlike Google (<IP_ADDRESS>), cloudflare (<IP_ADDRESS>) would always appear first.

I solved the problem.
In my case the problem was that the OpenVPN configuration that i was using, didn't set any dns resolver, so windows was correctly using google dns, but wsl didn't set any dns.
I solved by modifying the openvpn client configuration by adding this line:
dhcp-option DNS <IP_ADDRESS>
with this option set, when i connect to openvpn, the dns is getting correctly set even on linux wsl.

@zahaim check out my GIST It's an Init.d service to keep DNS in sync
To support IPv6 as well as IPv6 remove -AddressFamily IPv4 from line 22

I was to try it but then I moved to wsl2. Thanks for sharing anyway :)

To neatly and automatically update your resolv.conf file, it is only neccessary to reload Lxss. In the case of split-tunneling, my experience is that nameserver rotation does the trick.
I basically just added this alias to my .bashrc file as a workaround:
alias reload='powershell.exe -Command "{Restart-Service LxssManager}" && echo "options rotate" | sudo tee -a /run/resolvconf/resolv.conf'
Of course be sure to check whether the /etc/wsl.conf file is configured correctly:
[network]
generateResolvConf = true

I had the same issue after upgrading from WSL to WSL2. After hours looking up quick fixes online, I accidentally found out that just running WLS2 with Administrator privileges fixed the issue in my case.

WSL1 still appears this issue. I solved this problem after adding DNS list from Windows into wsl /etc/resolve.conf. Thanks @mo18

Please add the name-servers from the VPN to the top of the resolv.conf file! This would solve the issue for a lot of people. While my file is auto-generated as I (re-)launch WSL, the VPN DNS is put dead last and nothing works.
The blissful ignorance that everyone seems to live in, is that it actually matters to put more than one DNS server in your config. EVERY SINGLE APPLICATION in the world will time out before trying server 2. The first server in the list matters.
Thanks!

Please add the name-servers from the VPN to the top of the resolv.conf file! This would solve the issue for a lot of people. While my file is auto-generated as I (re-)launch WSL, the VPN DNS is put dead last and nothing works.

Can confirm this. The VPN DNS gets added to resolv.conf, but as the last entry, and it never gets used. It would be great to get this fixed in WSL 1.

To neatly and automatically update your resolv.conf file, it is only neccessary to reload Lxss. In the case of split-tunneling, my experience is that nameserver rotation does the trick.
I basically just added this alias to my .bashrc file as a workaround:
alias reload='powershell.exe -Command "{Restart-Service LxssManager}" && echo "options rotate" | sudo tee -a /run/resolvconf/resolv.conf'
Of course be sure to check whether the /etc/wsl.conf file is configured correctly:
[network]
generateResolvConf = true

thanks a lot! I came up with this problem too and I'm counting it on my wrongly editing of the wsl.conf.   Anyway I fixed it by using your experience. Thx a lot!

this is still not fixed in 1904

I had the same issue using WSL2. Tried a lot of things, everytime the /etc/resolv.conf was getting updated automatically. Finally tried switching back to WSL1, the problem was solved.

Thanks @Christopher-bit . That's a partial fix for me. I cannot run sudo apt-get update when using NordVPN. However, I couldn't  even nslookup google.com until I tried your workaround. This problem is related to #4648 (already mentioned above).

soo.. for me this was caused by me starting my VPN before starting WSL. I fixed it by disconnecting from the VPN, restarting WSL (wsl -t ), and then reconnecting to the VPN.

Not sure if this will help anyone, but throwing in my 2 cents.
Sorting the private nameserver to the top of the list allowed me to reach hosts in my private network, but then I could no longer reach public ones. I wanted to access both without have to connect/disconnect from VPN, and adding options rotate to the top of the /etc/resolve.conf allowed me to do that.

Update to the dnsfix to use PowerShell:
dnsfix () {
  pwsh.exe -Command "Get-DnsClientServerAddress -AddressFamily ipv4 | Select-Object -ExpandProperty ServerAddresses" | sed 's/^/nameserver /' | sudo tee /etc/resolv.conf > /dev/null;
}

I am using WSL2 and Cisco AnyConnect VPN. What solved this for me is:

Open AnyConnect "Advanced Window". For me, it is clicking the gear icon.
Go to VPN -> Preferences
Tick the checkbox "Allow local (LAN) access when using VPN (if configured)

The default content of /etc/resolv.conf for me is "nameserver 192.168.."
Hope this helps someone.

I am using WSL2 and Cisco AnyConnect VPN. What solved this for me is:

Open AnyConnect "Advanced Window". For me, it is clicking the gear icon.
Go to VPN -> Preferences
Tick the checkbox "Allow local (LAN) access when using VPN (if configured)

The default content of /etc/resolv.conf for me is "nameserver 192.168.."
Hope this helps someone.

Thank you so much. This worked for me on WSL2 + Cisco Anyconnect VPN.

I am using WSL2 and Cisco AnyConnect VPN. What solved this for me is:

Open AnyConnect "Advanced Window". For me, it is clicking the gear icon.
Go to VPN -> Preferences
Tick the checkbox "Allow local (LAN) access when using VPN (if configured)

The default content of /etc/resolv.conf for me is "nameserver 192.168.."
Hope this helps someone.

Thank you so much. This worked for me on WSL2 + Cisco Anyconnect VPN.

Thanks!! it work for me : WSL1 + Cisco Anyconnect

Only way I got this too work is to add
generateResolvConf = false to wsl.conf but im pretty sure something will break down the line from this so if anyone knows let me know because so far its all working great. Altho  like above I had to whitelist my network nordvpn whitelist add subnet <IP_ADDRESS>/24
No matter what I was doing before unless i used scripts to edit and re-edit /etc/resolv.conf the internet on vpn always ended up breaking. But if my fix breaks something else down the line ill take more time to read about this issue, right now seems like theres a tun of fixes and most dont really work for me.

Add and hybrid solution on wsl.conf for the automatic generation of /etc/resolv.conf with a list of parameters (nameservers, search domains, options like rotate) to be appended to the end of the autogenerated section.

Please note an important fact:
In my case the DNS servers from VPN connections were not added to /etc/resolv.conf when the other network was using IPv6.
Simply disabling IPv6 on the ethernet/wifi adapter allowed to make the VPN connection to work properly.

Now the nameservers are correctly added when VPN connection is enabled, and removed when VPN is disabled.
With VPN connected:
$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver <IP_ADDRESS>
nameserver xx.xx.xx.x1 # obfuscated company dns
nameserver xx.xx.xx.x1 # obfuscated company dns
search home

With VPN disconnected:
$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver <IP_ADDRESS>
nameserver fec0:0:0:ffff::1
nameserver fec0:0:0:ffff::2
search home

Note that I don't know where does the fec0:0:0:ffff::1 and fec0:0:0:ffff::2 IPv6 addresses come from...

I have added the following to my ~/.bashrc file. This is a consistent fix that takes care of the interface priority problem, via an auto-elevating PowerShell script and solves the DNS issue with VPN. Note that you have to create the script as described in the comments inside here and change interface name according to your provider (in my case AnyConnect).
When you connect to VPN via AnyConnect or another provider simply write vpn  in WSL/WSL2 prompt and you'll be asked to type the sudo password and approve the PS elevation.
Hope this helps you guys, but my gosh how hacky is this?
I really hope Microsoft can deliver a more robust fix via Windows Update, since now everyone is WFH, that also means being connected to VPN most of the time.
#run to fix connection / nameserver issues when connected to VPN
vpn () {
#Write dns servers from VPN interface to /etc/resolv.conf
    powershell.exe -Command 'Get-NetAdapter -InterfaceDescription "Cisco AnyConnect*" | Get-DnsClientServerAddress | Select -ExpandProperty ServerAddresses' | awk 'BEGIN { print "# Generated by vpn fix func on", strftime("%c"); print } { print "nameserver", $1 }' | tr -d '\r' | sudo tee /etc/resolv.conf
#                                                         ## ^VPN^PROVIDER^INTERFACE^NAME^ ##
#Script to set interface metric correctly, since admin is required, some extra code to elevate rights.
    powershell.exe -File 'C:\\Users\\USERNAME\\dev\\Scripts\\vpn.ps1'
#                        ^YOUR SCRIPT LOCATION IN WINDOWS FORMAT^
#
#THE SCRIPT SHOULD CONTAIN:
#
#if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
#    Start-Process PowerShell -Verb RunAs "-NoProfile -ExecutionPolicy Bypass -Command `"cd '$pwd'; & '$PSCommandPath';`"";
#    exit;
#}
#Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric 6000
#                                                    ## ^VPN^PROVIDER^INTERFACE^NAME^ ##
#
}

Cheers

thank you so much @donatelloOo, your post is the only thing that has gotten my AnyConnect working with WSL.
One note however, I've noticed I have to disable IPv6 on the WSL adapter (and possibly the Hyper-V bridge as well) each time I restart and before I open WSL for the first time.

Still facing issues with DNS resolution in windows 20H2 build with Ubuntu 20.04 on WSL2.
Hostname resolution works sometimes and sometimes it doesn't , not at all reliable . I am also using Vcxrvs X server to run linux GUI apps, if I set generateResolvConf = false and add companies DNS at the starting of /etc/resolv.conf then on starting apps for GUI it complains as /etc/resolv.conf only takes into consideration the first nameserver available.
Please need a fix

@rg1235, you can use DNSmasq. Then you point to it in your resolv.conf and the service then takes over sending resolv requests to different DNS. You will have to set up a separate config for DNSmasq as well containing the different DNS server you want to use.
I am using it to deal with the split DNS situation in my company and it works very well. Just remember to start it up every time when the WSL2 box starts (add start code to your profile for example).

@rg1235, you can use DNSmasq. Then you point to it in your resolv.conf and the service then takes over sending resolv requests to different DNS. You will have to set up a separate config for DNSmasq as well containing the different DNS server you want to use.
I am using it to deal with the split DNS situation in my company and it works very well. Just remember to start it up every time when the WSL2 box starts (add start code to your profile for example).

@trallnag thanks for the reply just want to confirm a few things
Do you have X server configured? , I currently use gui for linux apps and WSL2 automatically resolves the address of the display based upon entries in resolv.conf ,so correct me if I am wrong if I add DNSmasq to resolv.conf (as the first entry) will gui apps find the running X server itself?
And it will be helpful if you can share your dnsmasq configuration file sample , Thanks again

@rg1235
port=53
no-resolv
server=/<intranet-top-level-domain>/<internal-dns>
server=/<intranet-top-level-domain>/<internal-dns>
server=<IP_ADDRESS>

Regarding X server: No, I don't use it atm

Please note an important fact, and workaround:
The DNS servers from VPN connections are not added to /etc/resolv.conf when another network adapter is using IPv6 DNS servers, which seems to cause kind of conflict (additional IPv4 DNS servers are discarded).
Check the adapters that use IPv6 DNS servers :
Get-DnsClientServerAddress -AddressFamily IPv6 | Where-Object ServerAddresses -NE "{}" | Select-Object -ExpandProperty InterfaceAlias

Get their related adapter binding
Get-NetAdapterBinding -ComponentID ms_tcpip6 | Where-Object Name -In (Get-DnsClientServerAddress -AddressFamily IPv6 | Where-Object ServerAddresses -NE "{}" | Select-Object -ExpandProperty InterfaceAlias)

Disable IPv6 for each adapter binding (or directly for all adapters) using Powershell with administrator privileges:
Disable-NetAdapterBinding -Name "Wi-Fi" -ComponentID ms_tcpip6 -PassThru
Disable-NetAdapterBinding -Name "Network Bridge" -ComponentID ms_tcpip6 -PassThru
...
Disable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6 -PassThru

Alternatively, simply disable IPv6 on the ethernet/wifi adapter using Windows UI:

Now the nameservers are correctly added when VPN connection is enabled, and removed when VPN is disabled.
With VPN connected:
$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver <IP_ADDRESS>
nameserver xx.xx.xx.x1 # obfuscated company dns
nameserver xx.xx.xx.x1 # obfuscated company dns
search home

With VPN disconnected:
$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver <IP_ADDRESS>
search home

Thank you @donatelloOo I was experiencing network problems when using Hamachi VPN.
The Hamachi adapter hasd IPv6 enabled and by disabling it I was able to resolve the issue!!! 😄  🎉

@funmonty, I also had to switched back to WSL1. WSL2's resolv.conf kept getting updated automatically and stopped my connectivity.

I have added the following to my ~/.bashrc file. This is a consistent fix that takes care of the interface priority problem, via an auto-elevating PowerShell script and solves the DNS issue with VPN. Note that you have to create the script as described in the comments inside here and change interface name according to your provider (in my case AnyConnect).
When you connect to VPN via AnyConnect or another provider simply write vpn  in WSL/WSL2 prompt and you'll be asked to type the sudo password and approve the PS elevation.
Hope this helps you guys, but my gosh how hacky is this?
I really hope Microsoft can deliver a more robust fix via Windows Update, since now everyone is WFH, that also means being connected to VPN most of the time.
#run to fix connection / nameserver issues when connected to VPN
vpn () {
#Write dns servers from VPN interface to /etc/resolv.conf
    powershell.exe -Command 'Get-NetAdapter -InterfaceDescription "Cisco AnyConnect*" | Get-DnsClientServerAddress | Select -ExpandProperty ServerAddresses' | awk 'BEGIN { print "# Generated by vpn fix func on", strftime("%c"); print } { print "nameserver", $1 }' | tr -d '\r' | sudo tee /etc/resolv.conf
#                                                         ## ^VPN^PROVIDER^INTERFACE^NAME^ ##
#Script to set interface metric correctly, since admin is required, some extra code to elevate rights.
    powershell.exe -File 'C:\\Users\\USERNAME\\dev\\Scripts\\vpn.ps1'
#                        ^YOUR SCRIPT LOCATION IN WINDOWS FORMAT^
#
#THE SCRIPT SHOULD CONTAIN:
#
#if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
#    Start-Process PowerShell -Verb RunAs "-NoProfile -ExecutionPolicy Bypass -Command `"cd '$pwd'; & '$PSCommandPath';`"";
#    exit;
#}
#Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric 6000
#                                                    ## ^VPN^PROVIDER^INTERFACE^NAME^ ##
#
}

I got some inspiration from different posts on this site, sorry for not crediting those, I don't actually remember the who and where.
Cheers

After trying all the other solutions on the entire internet, this was the only option that worked for me. I augmented this with a notvpn function as well to restore the nameservers to Google's <IP_ADDRESS> and <IP_ADDRESS> to have the ability to switch DNS manually when I connect/disconnect VPN. Now when I connect VPN i run vpn and when I disconnect VPN I run notvpn.
Thanks for this. The issue has been plaguing me for weeks.
Here's my hacky notvpn function
notvpn () {
    echo "# generated by ~/.bashrc notvpn () "
    echo "nameserver <IP_ADDRESS>" | tr -d '\r' | sudo tee /etc/resolv.conf
    echo "nameserver <IP_ADDRESS>" | tr -d '\r' | sudo tee /etc/resolv.conf
}

The solution from @cod3monk3y worked when added to .bash_profile. Thank you for this workaround.
Microsoft: Totally unacceptable to have these issues. After spending an afternoon moving to WSL2 with Docker for Windows, I am not amused after finding DNS resolutions didn't work the next day.
echo "# generated by ~/.bashrc notvpn () "
echo "nameserver <IP_ADDRESS>" | tr -d '\r' | sudo tee /etc/resolv.conf
echo "nameserver <IP_ADDRESS>" | tr -d '\r' | sudo tee /etc/resolv.conf

The solution from @cod3monk3y worked when added to .bash_profile. Thank you for this workaround.

Credit for this should really go to https://github.com/ebc-conscia . I really just added the opposite method to their vpn() solution/workaround.
I'll note that sometimes this still doesn't work on the first attempt for me. I still sometimes have to shut down WSL, Cisco AnyConnect, then reconnect VPN (Cisco), then reopen WSL, then type vpn. When I get ony one DNS entry (primary), the vpn settings don't work. But if I get both primary and secondary DNS entries, the networking will work correctly.
Not sure if this problem is originating from Cisco AnyConnect or not. I feel like it could be Cisco not populating the secondary DNS correctly.
And, I'm in the habit of always trying host google.com when I switch between vpn and notvpn modes.
But I'm usually able to get into a state where networking is working. It's just a matter of "try again", "how about now?" iterating.

For those still looking for a solution to get it working, I've been applying https://github.com/microsoft/WSL/issues/5068#issuecomment-839756030 and it's working fine for me.

Could I suggest that microsoft gives the ability to configure dns forwarding on the resolver that gets configured when resolv.conf is generated? I think everyone is expecting that WSL2 will automatically use the DNS configuration of its host without having to manually switch static DNS servers. This could be easily accomplished with forwarding.

Could I suggest that microsoft gives the ability to configure dns forwarding.

Actually, this is the default case. and the goal of generateResolveConfg
https://docs.microsoft.com/en-us/windows/wsl/wsl-config#network
but it may fail due with VPN or ipv6 servers... since years.

I'm saying that microsoft should provide a proper DNS forwarder as it's defined in RFC2308, like the feature in bind, unbound, dnsmasq, et c., at the IP address that's set as the gateway and as the nameserver when starting a WSL2 instance. Changing resolv.conf more than one time is specifically what I'm saying should not be done. It should be set once to this hypothetical forwarder, which should have the capability to dynamically forward requests (or not to do so, assuming the forwarder itself is fully and independently configurable) according to the DNS configuration of the host, which could be changed at any time due to moving between wireless networks or connecting to a VPN. I don't think I'm mistaken when I say that microsoft has never provided a DNS forwarder with WSL2 on win10.

Having a new IP address assigned to WSL2 every time it is launched creates additional work when DNS and virtual environments are used to access web applications for testing and development.
As a result of this issue, I have abandoned WSL2 and moved back to Ubuntu on VirtualBox. This has eliminated many headaches. I don't understand why this issue wasn't fixed before but can't allow any more impacts to my projects.

Run into the same issues.
Setup:

Windows 20H2(Build 19042.1110)
WSL2 Debian
VPN: Cisco Any Connect

I've created a workaround see here which is basically a excerpt of the comments of this issue.
As @spencerharmon stated: Microsoft realy should implement a proper DNS forwarder that resloves the issues when working with VPN, it's a standard scenario to have a VPN especially in the current situation.

I've spent a lot of time puzzling over this on my brand new laptop / installation only to discover that WSL1 was installed by default (❗❗), not WSL2. I can confirm that a fresh WSL1 doesn't work (I wrote a custom python script to workaround it), but WSL2 does (both "Ubuntu", using built-in vpn).

I'm using this bash script to generate the proper resolv.conf based on current windows DNS configuration values, which I run each time the windows DNS settings change (i.e. when connecting to a VPN server) or the resolv.conf file gets overwritten by WSL for some reason.
#!/bin/bash

tmp=`mktemp`
powershell="/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe"
trap ctrlC INT

removeTempFiles() {
    rm -f $tmp
}

ctrlC() {
    echo
    echo "Trapped Ctrl-C, removing temporary files"
    removeTempFiles
    stty sane
}

echo "Current resolv.conf"
echo "-------------------"
cat /etc/resolv.conf

echo
echo "Creating new resolv.conf"
echo "------------------------"

{
    head -1 /etc/resolv.conf | grep '^#.*generated'
    nameservers=$($powershell \
        -Command "Get-DnsClientServerAddress -AddressFamily ipv4 | Select-Object -ExpandProperty ServerAddresses" \
        )
    for i in $nameservers; do
        echo nameserver $i
    done
    tail -n+2 /etc/resolv.conf | grep -v '^nameserver'
} | tr -d '\r' | tee $tmp

(set -x; sudo cp -i $tmp /etc/resolv.conf)

removeTempFiles

You can mark this script setuid with owner root, so it doesn't ask for password through sudo every time.

After running this bash script, you can make the file resolv.conf immutable by running sudo chattr +i /etc/resolv.conf so that  wsl will not overwrite your settings.
to undo the command, run
sudo chattr -i /etc/resolv.conf

Has anyone been able to get this to work with PaloAlto's GlobalProtect? We keep having issues and it's so frustrating.

Anyone knows about the ../run/resolvconf/resolv.conf?
https://docs.microsoft.com/da-dk/windows/wsl/troubleshooting#bash-loses-network-connectivity-once-connected-to-a-vpn

I've been trying all sorts of suggestions with the /etc/resolv.conf file, but I still can't seem to connect to my company's VPN. I can see the connections when I run ipconfig on Windows, but not when I run ifconfig in WSL.

@zenithstorm, have you tried dnsmasq approach?

@trallnag Thank you for the suggestion! I've been trying it for the past half hour or so, but no luck so far. I will keep fiddling with it.

In my case, i set network interface metric to 6000 and both vpn and internet within wsl is now working:
Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric **6000**

Don't forget to make /etc/resolv.conf file immutable after editing to avoid Windows overwrite it
chattr +i /etc/resolv.conf
I also was struggling with using wireguard tunnel
It was important to me since I'm using DoH on MikroTik wireguard server

This comment has the solution that worked best for me on WSL2
https://github.com/microsoft/WSL/issues/2884#issuecomment-932483876
Hope wsl-vpnkit helps you too

Find out nameserver with windows powershell (during VPN Session and without) using nslookup
USe sudo touch /etc/wsl.conf and sudo vim /etc/wsl.conf to add:

[network]
generateResolvConf = false

Restart wsl (Windows powershell) using wsl --shutdown
Open WSL and remove using rm -f /etc/resolv.conf
Add new file sudo touch /etc/resolv.conf and sudo vim /etc/resolv.conf with:

nameserver X.X.X.X

nameserver Y.Y.Y.Y

Restart wsl (Windows powershell) using wsl --shutdown
Open WSL and remove using wget google.com and test some you corporate domain.

don't forget to make sure your VPN's nameserver comes first in your /etc/resolv.conf file
i was losing my sanity to this issue lol
luckily this seems to have done the trick for me

Here's my solution, it takes what @cod3monk3y did, and makes it automatic it so you don't have to run anything manually anymore. It's geared towards the Cisco AnyConnect client, so if you you're using something different, you would just need to figure out the events in the event log to trigger off of.
https://www.frakkingsweet.com/automatic-dns-configuration-with-wsl-and-anyconnect-client/

Here's my solution, it takes what @cod3monk3y did, and makes it automatic it so you don't have to run anything manually anymore. It's geared towards the Cisco AnyConnect client, so if you you're using something different, you would just need to figure out the events in the event log to trigger off of.
https://www.frakkingsweet.com/automatic-dns-configuration-with-wsl-and-anyconnect-client/

Works like a charm, thanks.

Still facing this issue in WSL2. When using ProtonVPN.
Why is this issue not resolved since 2017? This makes WSL un-useable in corporate envs and home envs, without all these hacky workarounds. Is MS assuming that the workaround is good enough?

isn’t wsl-vpnkit working for you?

A reboot fixed it 🤷♂

All the presented "solutions" seem to involve modifying resolv.conf. The default(?) WSL setup has resolv.conf pointing to an internal IP address, and the same address is also used as default route. The failure seems to be that WSL (which handles this internal routing and DNS server / proxy) is not tracking resolver changes on the windows side. All the modifications to resolv.conf are just workarounds for WSL's failure, not fixes to WSL.
Why are windows applications able to track resolver changes, but WSL isn't?

Hi, is the VPN in development plan? We are waiting for this.

unlike https://github.com/microsoft/WSL/issues/2884#issuecomment-932483876 which push DNS from Windows to WSL
I have made a script for the other way: pull DNS from WSL.
https://gist.github.com/exeral/87c792d20262026318661fdc03ea8807
hope it helps ;)

Thanks. Still I would need something more instant for enterprise environment.

all I have to say is that after many hours wasted while working off the VPN I decided to just go back to my VM
afterall

They know!
i just dont think they care lol

I just went back to my vm after many hours wasted troubleshooting this.
Afterall....

 毕竟....
他们知道但不在乎哈哈

fu*k

For me the new WSL2dns tunneling feature solved the problem, see https://learn.microsoft.com/en-us/windows/wsl/wsl-config#main-wsl-settings
Add the following to %UserProfile%\.wslconfig to enable the feature:
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Changes how DNS requests are proxied from WSL to Windows
dnsTunneling=true

This works in my case: https://github.com/microsoft/WSL/issues/4246#issuecomment-1726524286

For me the new WSL2dns tunneling feature solved the problem, see https://learn.microsoft.com/en-us/windows/wsl/wsl-config#main-wsl-settings
Add the following to %UserProfile%\.wslconfig to enable the feature:
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Changes how DNS requests are proxied from WSL to Windows
dnsTunneling=true

Thanks for pointing that out. Unfortunately, it's only available in Windows 11. 😢

In my case, i set VPN network interface metric to 6000 and both vpn and internet within wsl is now working: Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric 6000 Cisco AnyConnect mentioned in command above is my VPN. yours could be different. along with the metric number.
and then used @cod3monk3y solution above for fixing DNS.

This was the only think that have worked for me and resolved the issue.

Guys, are there any plans to completely fix this issue in the future?
Thanks all :)

For me the new WSL2dns tunneling feature solved the problem, see https://learn.microsoft.com/en-us/windows/wsl/wsl-config#main-wsl-settings
Add the following to %UserProfile%\.wslconfig to enable the feature:
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Changes how DNS requests are proxied from WSL to Windows
dnsTunneling=true

I am actually on Windows 11 23H2 and this still doesn't work to access corporate resources. I have internet access even on VPN but the internal corp things can't be accessed.

Hi ! Please try the latest networking features that we've added in WSL. Those should greatly improve compatibility with VPN's.
If the issue still remains, please reopen this issue.

Hi ! Please try the latest networking features that we've added in WSL. Those should greatly improve compatibility with VPN's.

That link doesn't state it, but the linked page "Advanced settings configuration in WSL" makes it clear that these settings require Windows 11.
@OneBlue do you know if there are plans to support dnsTunneling and autoProxy in Windows 10?

unfortunately I'm stuck with corporate windows 10 for another year or two
sigh...
On Wed, May 15, 2024, 20:19 Blue @.***> wrote:

@OneBlue https://github.com/OneBlue do you know if there are plans to
support dnsTunneling and autoProxy on Windows 10?
Unfortunately, those features won't be backported to Windows 10.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/WSL/issues/1350#issuecomment-2113165299,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABTBB5KPUO74RBM2S7XWEDZCORMFAVCNFSM4CWBLNU2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJRGMYTMNJSHE4Q
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Don't be too sad about it, it is not sure that it will fix the issues anyways. I am currently using Citrix Secure Access and I still have to use wsl-vpnkit to get connectivity when on the VPN.
[wsl2]
networkingMode=mirrored
firewall=true
dnsTunneling=true
autoProxy=true

dnsTunneling=true does help resolve the name to an IP address, but I still can't connect to internal resources. I've tried with and without networkingMode=mirrored.

Hi ! Please try the latest networking features that we've added in WSL. Those should greatly improve compatibility with VPN's.
If the issue still remains, please reopen this issue.

What about WSL 1? Due to the filesystem performance issue in WSL 2, it remains unusable for my needs. If I'm understanding this new feature correctly, it's only available to WSL 2.


Adding PgHasArrayType for &[u8;N]

Not sure why this isn't implemented. Maybe something I'm missing here?

Sounds reasonable. Please run cargo fmt, the indentation seems off.

Great, done


[ allowtagsfrompaste ] Fix issue with removing the wrong tags

if "s" is not in the allowTagsFromPaste list, then "foo" is removed as well with the current regex.
This commit is preventing that from happening

Thanks :)


How to send a contract transaction?

How to send a contract transaction?
We need a demo, thanks!

How to send a contract transaction?
We need a demo, thanks!

https://github.com/tonkeeper/tongo/issues/277#issue-2415926335

did you check example directory?
https://github.com/tonkeeper/tongo/blob/master/examples/wallet/simple_send/main.go


Broken Drag with Handle on Safari 11.0.3

I'm currently running into an issue with the ui sortable directive. When I click an hold on a handle in safari to move the section of the page it starts scrolling the page down on safari and it won't let me move it up.

I would suggest you to try using the placeholder or the helper options to fill in the gap or use a smaller element while dragging (respectively).
Seems related to #495 #286 #109 , please check the discussion in there as well.
PS: I'm not a mac user, so someone else might have better ideas

@thgreasi Are there docs for the placeholder and helper options? I don't see them

Here is the snippet of the options that remedied the situation for me
'ui-floating': true,
      start: function(e, ui) {
        $('.promo-list').sortable({
          sort: function(event, ui) {
            var $target = $(event.target);
            if (!/html|body/i.test($target.offsetParent()[0].tagName)) {
              var top = event.pageY - $target.offsetParent().offset().top - (ui.helper.outerHeight(true) / 2);
              ui.helper.css({'top' : top + 'px'});
            }
          }
        });

      },
      update: function(e, ui) {
        if (ui.item.sortable.model.idVideo == -1) {
          ui.item.sortable.cancel();
        }
      },
      scroll: false,


Add first test

It was tried before in #97 but github forced login made it flaky

I think we can close this one. We have several tests already.


Create initial guidelines for best practices for DT team developers

Done: https://espressive.atlassian.net/l/c/Ry7KQJ3M


has() method has a debug when set ATTR_EMULATE_PREPARES to false

Medoo version 1.5.7
Mysql version 5.7
`
$medoo = new Medoo([
            'database_type' => DB_CONFIG['TYPE'],

            'database_name' => DB_CONFIG['DB'],

            'server' => DB_CONFIG['HOST'],

            'port' => DB_CONFIG['PORT'],

            'username' => DB_CONFIG['USER'],

            'password' => DB_CONFIG['PWD'],

            'charset' => DB_CONFIG['CHARSET'],

            'prefix' => DB_CONFIG['PREFIX'],

            'logging' => DEBUG_MODEL,

            'option' => [PDO::ATTR_EMULATE_PREPARES => false]

        ]);

`
has() method always return FALSE.
but I modified the function, it could work well.
`
public function has($table, $join, $where = null)
{
$map = [];
$column = null;
	$query = $this->exec('SELECT EXISTS(' . $this->selectContext($table, $map, $join, $column, $where, 1) . ')', $map);

	if ($query)
	{
		$result = $query->fetchColumn();

		return $result === 1 || $result === '1' || $result === true;
	}

	return false;
}

`
Old code:
return $result === '1' || $result === true;
To this:
return $result === 1 || $result === '1' || $result === true;
Because I setting ATTR_EMULATE_PREPARES to FALSE,
the COLUMN return value's type is integer.
but you strict judge with string and boolean.
So it always return FALSE.
PLEASE TO FIXED IT , THANKS!

Do not open a new duplicated issue from #720. You can discuss on there.
I tested this case again with another environment, finally reproduced the problem.
I will test more and figure out for the EMULATE_PREPARES option and find a way to fix it.

#720 has been discussed for a long time,but I can't see the solution.
This debug affected many application scenarios,so I hope the next version can repair it!
@catfan

It just because you set the ATTR_EMULATE_PREPARES to false. The default value of this option is true.
There is no problem using the default value. We do not recommend to change those PDO option. It may cause some unexpected problem.
If you just want to convert the type of fetched value, Medoo has provided a way to convert it.
For this case, it need to test other PDO option together for compatible reason for the next.


Pinned tabs are not hidden in Firefox Nightly 51

Maybe this is caused by a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=472020.
I'll wait until ether the workaround is removed in Firefox Nightly or the breaking change starts to ride the release train.

Okay, the problem made it's way up to the release version of Firefox. I'll try to have a look into this as soon as I find some time.

Fixed. Will be available in AMO during the next days.


signed integer overflow in do_sub()

Triggered in 67435d9, compiled with clang 6.0.0-trunk and -fsanitize=address,undefined.
./vim -u NONE -X -Z -e -s -S test014 ':qa!'
ex_cmds.c:5031:13: runtime error: signed integer overflow:<PHONE_NUMBER>854775807 + 8 cannot be represented in type 'long'
    #0 0x75208f in do_sub /root/vim/src/ex_cmds.c:5031:13
    #1 0x7d4058 in do_one_cmd /root/vim/src/ex_docmd.c:2908:2
    #2 0x7bc866 in do_cmdline /root/vim/src/ex_docmd.c:1071:17
    #3 0x7ae076 in do_source /root/vim/src/ex_cmds2.c:4355:5
    #4 0x7ab31c in cmd_source /root/vim/src/ex_cmds2.c:3968:14
    #5 0x7ab31c in ex_source /root/vim/src/ex_cmds2.c:3943
    #6 0x7d4058 in do_one_cmd /root/vim/src/ex_docmd.c:2908:2
    #7 0x7bc866 in do_cmdline /root/vim/src/ex_docmd.c:1071:17
    #8 0x13f138f in exe_commands /root/vim/src/main.c:2954:2
    #9 0x13f138f in vim_main2 /root/vim/src/main.c:799
    #10 0x13e5d3d in main /root/vim/src/main.c:415:12
    #11 0x7fa9296b13f0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x203f0)
    #12 0x41bba9 in _start (/root/vim/src/vim+0x41bba9)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ex_cmds.c:5031:13

test014.gz

Fixed in patch 8.1.0953.

A relevant todo item can be removed (and another similar one):
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 1772aa1e9..65eca83c5 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -846,9 +846,7 @@ window for the buffer.
 Win32 key codes are messy.  Mike Williams tried to fix that, but now old
 mappings no longer work.  Create a new terminal for the better solution?

-Compiler warnings (geeknik, 2017 Oct 26):
-- signed integer overflow in do_sub() (#2249)
-- signed integer overflow in get_address() (#2248)
+Compiler warning (geeknik, 2017 Oct 26):
 - undefined left shift in get_string_tv() (#2250)

 Add Native language protocol server (LSP) support. (Yegappan Lakshmanan, 2018

I'll remove those lines from the todo list, thanks.


Reload notification appears when extensions are already installed

Testing #101117

Download extensions from marketplace ex: ESLint, C/C++
DnD into the extension viewlet
Both extensions are successfully installed and requests reload
Confirm reload window
Again DnD the extensions into the viewlet
nothing should happen instead notification pops up with Please reload Visual Studio Code to complete installing the extension ....

This also happens when you are installing an extension using the Install from VSIX... action in the context menu of the Extensions viewlet. I believe that there was a conversation around improving this behavior but I am not sure whether that worked is being tracked. @sandy081 do you remember?

Yes it was discussed but do not remember if it is being tracked. Let's use this issue.

Sometimes VSIXs with same version can have different changes crafted in the VSIX, hence we show the reload notification even when same version is installed from VSIX.
So, I would still show the reload prompt with a different message..


Pings

This is the C# client implementation of:  https://github.com/nats-io/go-nats-streaming/pull/183
This will help the client library detect and report that
the connection to the Streaming server is permanently lost.
This also allows the server to detect that a client has
been replaced by another one with the same client ID.
Imagine a client being disconnected from the streaming
server. At the same time, another application that can
communicate with the streaming server creates a connection
with the same client ID. The server detects the duplicate
ID, tries to contact the original client, but can't,
assume that it has terminated and replaces it.
When the original client resumes communication with the
server, it should now fail because the connection is
no longer "valid". For that, the client PINGs contain
a connection ID that uniquely identify any connection (NUID).
When the server gets a PING it verifies if that connection
ID is still valid, if not send back an error.
If the user has registered a new ConnectionLostHandler
(with the option setter SetConnectionLostHandler), he/she
will be notified of the error.
Also, published messages now contain this connection ID, which
allows the server to reject a published message if the
client is no longer valid.
The NATS connection created by the library during the Connect()
will now set the maximum reconnect attempts to infinite and
the reconnect buffer size to -1 to prevent any buffering during
a disconnect event.
The library uses default Ping interval of 5seconds and a max
number of PINGs without response of 3. These values can be
changed by the addition of a new option setter: Pings().
NOTE: No ping is used when connecting to an older server.
Also, if a client originally connects to a new server and that
new server is shutdown and an older server is restarted, the
ConnectionLostHandler will be invoked since the old server
does not listen to client PINGs.
Resolves #78

All tests pass for .NET 4.5, Core seems to get hung on one test when AppVeyor is very busy, haven't been able to get past that today.  IMO, we should merge.  Wdyt?

@ColinSullivan1 @watfordgnf Another vote for merging this PR. Thanks.

Agree on squash.


"Remove attack info from damage roll" not currently working.

Foundry 11 Build 313, PF2E version 5.7.4, Doroko version 2.11.6
Disabled all modules except Doroko's to make sure it was just this module and not a conflict.
Have Chat Merge & remove attack info from damage roll enabled.

As you can see, the attack tags (Attack/Evocation/Fire/Magical) are still present on the damage roll.

Fixed in 2.11.7


Created DynamicAutocomplete field.

Hey guys,
This is a new Dynamic Autocomplete component.
It is used to dynamically populate the suggestions so that a service can be called to return results.
David

Hi! What do you mean by Dynamic? You can always change the source prop and the autocomplete will change as well

Also, this is pretty much duplicating code :(

You can update the source dynamically but you cant easily use the value from the input to use as a service call parameter. Also the current autocomplete field does some extra filtering which is unnecessary in this situation.

I think a dry approach would be allowing to pass optional search function as prop.


getChildren() doesn't return all children, always return 1 less child

For the code below, I expect getChildren() to return Phones and TVs but it only returns Phones.
const { Sequelize, DataTypes, BulkRecordError } = require('sequelize');
const ns = require('sequelize-nested-set');

// Connect to database.
const sequelize = new Sequelize({
    dialect: 'sqlite',
    storage: 'treeorg.sqlite'
});

// Define Tree model.
const Tree = ns(sequelize
                , DataTypes
                , 'Tree'
                , { label: DataTypes.STRING }
                , { //tableName: 'Tree'
                    timestamps: false
                    , hasManyRoots: true
                    , levelColumnName: 'level'
                }
);

sequelize.sync()
    .then(() => {

        (async () => {

            let electronics = new Tree(); electronics.label = 'Electronics';
            electronics = await Tree.createRoot(electronics);

            let phones = new Tree(); phones.label = 'Phones';
            await electronics.reload();
            await electronics.addChild(phones);

                let xiaomi = new Tree(); xiaomi.label = 'Xiaomi';
                await phones.reload();
                await phones.addChild(xiaomi);

            let TVs = new Tree(); TVs.label = 'TVs';
            await electronics.reload();
            await electronics.addChild(TVs);

            // Test getChildren()----------------------------------------
            let children = await electronics.getChildren();
            console.log(children);

        })();

    });

Output
[
  Tree {
    dataValues: { id: 2, lft: 2, rgt: 5, level: 1, rootId: 1, label: 'Phones' },
    _previousDataValues: { id: 2, lft: 2, rgt: 5, level: 1, rootId: 1, label: 'Phones' },
    uniqno: 1,
    _changed: Set(0) {},
    _options: {
      isNewRecord: false,
      _schema: null,
      _schemaDelimiter: '',
      raw: true,
      attributes: [Array]
    },
    isNewRecord: false
  }
]
id  lft  rgt  level  root_id  label
--  ---  ---  -----  -------  -----------
1   1    8    0      1        Electronics
2   2    5    1      1        Phones
3   3    4    2      1        Xiaomi
4   6    7    1      1        TVs

You need to have an up-to-date electronics object before getting its children. // Test getChildren()----------------------------------------await electronics.reload(); let children = await electronics.getChildren(); console.log(children);

Thx @fremail, it works with reload(). Can I know why it is not automatically updated? It is becoming increasingly cumbersome to call reload(). First, it is needed for addChild() and now getChildren().

In real life you don't need to insert and select nodes in the same code/function. Usually we have one method (e. g. API) for adding a node, another method for getting node(s). Calling reload() makes an additional query to DB. If your code is rather complex, it's better to control a number of DB queries. That's why I didn't put reload() inside each function


[BUG] 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: roles must alternate between "user" and "assistant", but found multiple "assistant" roles in a row"}}

Describe the bug
Recieving the following error while in a conversation (often after 2-3 messages sent)
400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: roles must alternate between \"user\" and \"assistant\", but found multiple \"assistant\" roles in a row"}}
To Reproduce
Steps to reproduce the behavior:

Start chat
Exchange a few messages
See error

Expected behavior
Continued conversation
Screenshots

Flow

Setup

Installation: Azure
Flowise Version: 1.6.2
OS: macOS
Browser: Safari

Can you try using XML Agent? As Claude doesnt have support for function calling yet, Conversational Agent might not works well


chore: Install toolchain files to location provided in KUBEBUILDER_ASSETS if set

Also use sudo only when necessary to create the location
Fixes #N/A
Description
This allows the installation of toolchain files to an arbitrary path by setting the KUBEBUILDER_ASSETS environment variable. This was done in order to avoid the use of sudo in order to create and use a system path. Backward compatibility with the original method is preserved.
How was this change tested?
I ran make toolchain both with and without setting the KUBEBUILDER_ASSETS environment variable. Without it set, the default location of /usr/local/kubebuilder/bin was used and I was prompted for my password by sudo. With it set to a path under my home directory, the indicated path was created without needing sudo, and all toolchain content was copied into place.
I then ran make test with KUBEBUILDER_ASSETS set to the path in my home directory and /usr/local/kubebuilder deleted to prove that everything still works.
Does this change impact docs?

[ ] Yes, PR includes docs updates
[ ] Yes, issue opened: #
[x] No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Someone please take a few minutes to review and merge this very trivial MR.


Update the ChaosCenter API document

As, we have moved project related graphql APIs to REST, so we need to update our API docs with these changes.
PR- https://github.com/litmuschaos/litmus/pull/3377

@rajdas98 Is graphql API moved into REST API ? :(
We have implemented a wrapper library around the graphql library and spent a lot of time on it
We did not expect this change coming

@vamsiammineni not all APIs, only 2-3 project-related API.

@vamsiammineni only the project related APIs are converted to REST APIs, to optimise performance and eliminate chances of DB inconsistencies

@rajdas98 @SarthakJain26  Thanks for the update. I am just looking into your  PR- 3377
Is there any changes planning in graphql API in near future ?

No, we are not migrating any APIs to REST from now-onwards. But we will add a few fields to some existing APIs.

@rajdas98 Thank you. Thats okay.

@rajdas98 Shouldn't this page also be updated ?

Yes @vamsiammineni

Updated API doc- https://github.com/litmuschaos/litmus/issues/3411#issuecomment-1002063282


Multiply G1, G2 by Fr

Does the lib support multiplication of G1, G2 by Fr?
I don't see it in the code, but I could be wrong.

What is your use case?

I mean, Fr is simply a BigInt underneath.

I was missing little endian to big endian conversion.
Closing the issue.


Support for react-leaflet 2.x

React-Leaflet (https://react-leaflet.js.org/) is nearing version 2 release (currently RC1), and this is a request to update react-leaflet-google to support the upcoming release of react-leaflet v2.

Thx, for the report.
Actions we be taken as soon as possible.

I just submitted PR #29 that makes this plugin React-Leaflet 2 compatible.

Can we get this merged and pushed to npm asap?

Agree with RustyRaptor. In the meantime you can load this package in your package.json like this:
"react-leaflet-google": "https://github.com/danieldunderfelt/react-leaflet-google.git",

I have done the update.
Thx, guys for the support.


Retrieval agent

Add agent which for given text will return the closest chunk from vector database

@astroseger , please, merge if you don't have further concerns


Update github_repo.rb

Added def config
(Managed to miss this in my last PR)

This change was included in devel...which has now been merged to master...closing.


Detect when Steam Deck is Docked?

Maybe this is a dumb question, but has anyone who has been testing on Steam Deck, figured out a way to detect when your game is not only running on a Steam Deck, but is docked (aka showing game on TV/monitor/etc).
I can detect if it's a Steam Deck playing the game, but I sadly can't figure out how to determine if docked and displaying on a larger screen/etc. As I need to change a few things in the game.
I have tried to check for Elecron JS call of "screen.getAllDisplays()", but only gives me back the original Steam Deck screen (1280 x 800) and not any connected screens sadly.
Thanks in advance

Not sure about this. steamworks.js wraps around https://github.com/Noxime/steamworks-rs which has documentation here https://docs.rs/steamworks/latest/steamworks/
steamworks-rs wraps around the Steamworks C++ API documented here https://partner.steamgames.com/doc/api
Questions like the one you're asking generally have an API in ISteamUtils https://partner.steamgames.com/doc/api/ISteamUtils
That's where you'll find the IsSteamRunningOnSteamDeck() function, as well as IsSteamInBigPictureMode(). I'm not sure, but maybe big picture mode is true when docked, and false when not docked?
But I think it might be challenging to test this using steamworks.js, because IsSteamInBigPictureMode() isn't exposed in steamworks-rs. https://docs.rs/steamworks/latest/steamworks/struct.Utils.html
… and so it's not available in steamworks.js, either.
So, the first step to investigate this might be to try using the Steamworks C++ API directly for a basic example game you author yourself, to see if you can find any way to use that to detect docking.
If you knew for sure that this does work properly in C++, well, in the past, I've filed PRs on steamworks-rs to add C++ features, get the PR merged, and then file a PR on steamworks.js to expose that functionality to Electron.
It's a lot of work, but, it's open source, so you might not have much luck waiting for someone else to implement IsSteamInBigPictureMode() for you.

Interesting idea! I'm curious if that would work.
I ended up making it a setting in Options to force it one way or another as well as an Auto Detect method that basically works by checking if a 2nd Controller is being actively used (I use navigator.getGamepads() at the moment and not the Steam Input stuff in the API) for a "Steam Deck" player. So if a Steam Deck is being used & a 2nd Controller actively used, then switches the display resolution and treats the 2nd Controller as Controller 1 (since Steam Deck itself is normally controller 1). And of course switch it back to Steam Deck view (1280 x 800) if the Steam Deck Controller is used again.
Not perfect, but it works and is a working solution for now.


/e-link/explore endpoint

Create an endpoint /e-link/explore that fetches all triples related to a resource. It has three parameters

resource - the resource URI
endpoint - the endpoint URL
endpoint-type- the type of the endpoint, ldf, or sparql. Default value is sparql

requests sent as POST, right?

requests sent as POST, right?

right.

the SPARQL endpoint based description has been implemented
curl -v -X POST "http://api-dev.freme-project.eu/current/e-link/explore?resource=http%3A%2F%2Fdbpedia.org%2Fresource%2FBerlin&endpoint=http%3A%2F%2Fdbpedia.org%2Fsparql&endpoint-type=sparql"

The Linked Data Fragments based exploration of a resource is waiting for https://github.com/freme-project/technical-discussion/issues/74 - hosting LDF artifact in our maven repo.

works also for LDF endpoints. Try
curl -v -X POST "http://api-dev.freme-project.eu/current/e-link/explore?resource=http%3A%2F%2Fdbpedia.org%2Fresource%2FBerlin&endpoint=http%3A%2F%2Ffragments.dbpedia.org%2F2014%2Fen&endpoint-type=ldf"

resource=http://dbpedia.org/resource/Berlin
endpoint=http://fragments.dbpedia.org/2014/en
endpoint-type=ldf
Note that the resource and the endpoint URIs should be properly encoded.

Nice! When I try your example for sparql I get the output attached to this post. There is a lot of "undefined" strings in the output. E.g.
        undefined<http://dbpedia.org/property/rulingParty>undefined<http://dbpedia.org/resource/Christian_Democratic_Union_of_Germany> , undefined<http://dbpedia.org/resource/Social_Democratic_Party_of_Germany> ;
        undefined<http://dbpedia.org/property/sepHighC>
                18.800000000000000711 ;
        undefined<http://dbpedia.org/property/sepLowC>
                10.599999999999999645 ;
        undefined<http://dbpedia.org/property/sepMeanC>
                14.699999999999999289 ;
        undefined<http://dbpedia.org/property/sepRainDays>
                7.7999999999999998224 ;
        undefined<http://dbpedia.org/property/sepRainMm>
                45.100000000000001421 ;
        undefined<http://dbpedia.org/property/sepRecordHighC>
                34.200000000000002842 ;
        undefined<http://dbpedia.org/property/sepRecordLowC>
                -0.5 ;
        undefined<http://dbpedia.org/property/sepSun>
                156 ;
        undefined<http://dbpedia.org/property/singleLine>
                "yes"@en ;
        undefined<http://dbpedia.org/property/source>
                "World Meteorological Organization , HKO"@en ;

Is this a bug?
elink-explore-output.txt

Do you run
curl -v -X POST "http://api-dev.freme-project.eu/current/e-link/explore?resource=http%3A%2F%2Fdbpedia.org%2Fresource%2FBerlin&endpoint=http%3A%2F%2Fdbpedia.org%2Fsparql&endpoint-type=sparql"
for that request I dont get undefined strings

Sorry. I found out that the problem originated from my client software and not from your code. So everything works fine!

The output is not "random" but proper turtle. The thing is that if you choose sparql but the URL is pointing to LDF endpoint then the normal Jena client is used to query the endpoint as it was SPARQL.
Yes, it is possible to query LDF endpoint using normal Jena client, but it is not recommended.
If you choose ldf  but the URL is pointing to LDF endpoint then a proper LDF Java client is used and the output is as expected.

It is valid turtle, however the entities seem entirely random. I'm guessing we leave this enabled, but I think i should include a message in the documentation that this works but is not recommended.

this works because we are not able (or difficult to do) detect the type of the endpoint. I suggest you highlight in the doc that the clients should double-check the endpoint-type and the actual endpoint URL whether they have chosen the right type.


Enable the address sanitizer in our CI to catch memory corruption immediately

Please select one of the following

[ ] I am removing an existing difference between facebook/react-native and microsoft/react-native-macos :thumbsup:
[ ] I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos :thumbsup:
[ ] I am making a fix / change for the macOS implementation of react-native
[X] I am making a change required for Microsoft usage of react-native

Summary
There's no ASAN detection right now in our builds. There were a couple options for how to approach this and I'd like to hear folks' feedback.

Enable ASAN in the CI-only
Enable ASAN in the CI, add an ASAN test page to crash (we already have a JS crash test page) to make manual validation of ASAN easier (not sure if the test page would really get used so sitting on that change at the moment)
Enable ASAN in our downstream dependencies and don't touch this repo (depending on if we add a test or not, we might be taking on more repo debt with FB so an argument could be made to leave this repo aline). Personally I'm not as big a fan to this option as I like knowing immediately if a change is causing memory corruption instead of finding out days later.

Test Plan
I tested the CI command and verified we're in fact building asan-enabled object files. Depending on how people feel about this change we could potentially add a test page too and some validation that it runs as expected.

I still think when we actively develop on RN Tester on this repo, we should have asan on to catch any issue.

I still think when we actively develop on RN Tester on this repo, we should have asan on to catch any issue.

Sounds good. That's what Anand was saying too. In that case I'll add it to the Debug builds themselves

/azp run


Vengeful wizard that spawns boss bloon (tewity video)

Hello DatJaneDoe, I wanted to ask something. Can you send me download link to your vengeful wizard that summons boss bloon pls? i spend a lot of time trying to find the mod but i can't. Thanks

Hi DatjaneDoe I wonder if you can send me a download link to your vengeful wizard that summons boss bloon please.


RUMM-2042: Fix E2E test

What does this PR do?
Follow-up for #920. Apparently numbers used in branches of sendRandomLog were not the same as actual values of Log priorities.
Review checklist (to be filled by reviewers)

[x] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[x] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
[x] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

Codecov Report

Merging #922 (179262f) into develop (9677ec1) will decrease coverage by 0.07%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop     #922      +/-   ##
===========================================
- Coverage    82.86%   82.79%   -0.07%
===========================================
  Files          263      263
  Lines         8977     8977
  Branches      1449     1449
===========================================
- Hits          7438     7432       -6
- Misses        1144     1146       +2
- Partials       395      399       +4

Impacted Files
Coverage Δ

...n/kotlin/com/datadog/android/timber/DatadogTree.kt
50.00% <0.00%> (-5.56%)
:arrow_down:

...droid/rum/tracking/FragmentViewTrackingStrategy.kt
82.61% <0.00%> (-4.35%)
:arrow_down:

...g/internal/domain/event/DdSpanToSpanEventMapper.kt
96.08% <0.00%> (-3.92%)
:arrow_down:

...android/rum/internal/ndk/DatadogNdkCrashHandler.kt
86.78% <0.00%> (-1.15%)
:arrow_down:

.../src/main/kotlin/com/datadog/android/log/Logger.kt
95.93% <0.00%> (-0.07%)
:arrow_down:

.../kotlin/com/datadog/android/ktx/rum/ClosableExt.kt
100.00% <0.00%> (ø)

...om/datadog/android/rum/webview/RumWebViewClient.kt
100.00% <0.00%> (ø)

.../android/webview/internal/rum/WebViewRumFeature.kt
100.00% <0.00%> (ø)

...tadog/android/fresco/DatadogFrescoCacheListener.kt
100.00% <0.00%> (ø)

...ndroid/core/internal/persistence/file/EventMeta.kt
80.00% <0.00%> (ø)

... and 2 more


project doesn't read the compiled CSS file

The compiled CSS file is not regester in the project!
After it compile the CSS file and runs application I have to close it and open the CSS file and save it (ctrl+s)
then the project recognize the CSS file
Note: if I modify the CSS file on the first run or even save it ( the project still not recognize it) i have to stop the app save the CSS file and run the app again to make it work. That's why I think it's not registered in the project.

Hi there - yes I believe the CSS files should be ignored, because it's replaced with SASS files.
The *.css files will get replaced after compiling its *.scss file - so don't think the CSS file should be touched at all.


Caching a trajectory

We need to design a way to cache and load various types of trajectories so that we can save redundant planning/retiming.
For example, OpenRAVE supports serialization/deserialization which we utilized in prpy and had "waving" trajectories in herbpy that could be directly executed.
I think we should discuss which features to support or improve from the OpenRave API.

Planner fills the trajectory class with timestamps, interpolation methods, and waypoints. It should be up to user to select trajectory class that will best execute this data.
Users can create, append, retime, and serialize trajectories both in C++ and Python.
Store arbitrary animations of an environment. Support for any configuration space similar to PlannerParameters so that multiple bodies and affine transformations are supported. For example, a robot opening door requires the robot joints and the door to move together.
Sample a trajectory at any time. Easily set the scene as the trajectory dictates it. How would this affect robot controllers?
It should be possible to play back the trajectory classes without loading any robots or any environment data. A real controller, on robot side, can link with openrave-core and use the trajectory class for interpolating incoming trajectory data.

Here are potential discussion points:

Does it make sense for us to give flexibility to the user to select trajectory class?
I think we should support the C++ version. Shall the serialization be in yaml format?
Maybe we can defer this for now and support only single robot, and leave it as future feature.
Not sure what it means by "easily set the scene as the trajectory dictates it"
This may be a neat feature. We should be able to directly send a cached timed trajectory to a real-robot through ros controller.

@siddhss5 @brianhou @aditya-vk @sniyaz  Please join the discussion.

Is there any reason why we should not copy-exact the OpenRAVE format? Do we need to invent something new?

We could, it supports features that we may not need or re-think, which is why I raised questions above. I'd like to make the first version as minimal as possible instead of supporting potentially unnecessary (or incorrect) things.

I do like the concept of (5), of being able to send trajectories straight to ros control. Combined with easy recording of teleop trajectories, this can allow us to quickly experiment with things.

I think one other question to ask as users is whether we want to assume any conventions about the serialized trajectories. It seems that rogue executes the serialized trajectories immediately, without any retiming/further postprocessing. Should we only serialize timed trajectories, or is there some value in having unprocessed paths? What about smoothed trajectories? (Maybe timed+unsmoothed would be easier to read/modify by hand, if we feel like that's a thing people do.)

For AIKIDO, "trajectory class" currently refers to either Interpolated (perhaps with a non-GeodesicInterpolator) or a Spline, right? I think we're basically making this decision for the user by saying that it should always be a spline by the time it's sent to an executor, and I'm not convinced we have a need for anything else in the near future. That said, I guess it doesn't particularly hurt if we leave that as a field in whatever serialization format we decide on.

I'm not especially familiar with OpenRAVE's format, but it seems to only include positions (not velocities). Is that sufficient?
XML seems slightly verbose to deal with, although I'm sure a library would take care of that for us. I think we'd probably want to mock up what the format might look like if we were to use YAML, just to make it a fair comparison.

I think if we do it "right", it might not be that hard to get arbitrary object animations for free. Maybe if we just store the DART joint/DOF names? I don't think this is a feature that would get use all that regularly though.

We already have "sampling a trajectory at any time". The rest of this bullet also makes no sense to me.

Agree that this would be nifty! Seems like it shouldn't be that hard: all we'd have to do is convert the serialized format into a ROS trajectory message, and it should be all the same to the controller.

Can we converge on the Minimum Viable Product (MVP) here, and assign a worker? It’s a choice that we can definitely iterate on (it’s a two-way door, rather than a one-way door) so it’s good to put something out there quickly :).

@brianhou To get MVP, how about this?
Just serialize timed trajectories, only supporting Spline, and keep the format as close to OpenRAVE's version. Let's not worry about feature 5, and have the task be a minimal demo code that loads the robot and do a series of trajectories (e.g. waving) by directly executing a sequence of deserialized trajectories without retiming or collision checking. In terms of the file format, I'm more inclined to use yaml just because we already use it in aikido. I agree we should keep its contents as close to OpenRAVE's xml for a fair comparison.

I'm not especially familiar with OpenRAVE's format, but it seems to only include positions (not velocities). Is that sufficient?

I think if we specify delta time, positions, and the interpolation method, it should be sufficient? e.g. herb's cached trajectory.

Sounds good to me!

I think if we specify delta time, positions, and the interpolation method, it should be sufficient? e.g. herb's cached trajectory.

Oops, I meant trajectories that have nonzero initial velocity. I don’t think it matters though!

Cool! As another example, here’s what RobowFlex as its trajectory representation. I know it’s pretty verbose but hey it works :).

Resolved by #541.


Overflow issue using full width

Hello,
I have discovered a little issue when I was trying to make a full width layout.
If you check my codepen --> http://codepen.io/andresgl/full/xZEyXR/ you can see a extra tittle right margin.
I have fixed it  by myself changing the "margin-right" on .#{$toast-grid-column-namespace}
(codepend SCSS line 187 and 188)
margin-right: -.3125em;
instead of
margin-right: -.25em;
(5px) instead of (4px).

Maybe you can solve it  in another way.
Thank you!

There is another way of fixing the inline-block whitespace issue and that is to apply the font-size: 0 hack to the parent which in this case would be the .grid wrapper. The only issue is that an explicit font-size must then be set on the columns so as to not hide the text but should not be such a major problem.

There is a gap under the image, how about that I add style.
vertical-align: top;


Unable to shutdown k3os by using 'shutdown' in PVE

Version (k3OS / kernel)
k3os version v0.20.11-k3s1r1
5.4.0-84-generic #94 SMP Sun Sep 19 04:06:53 UTC 2021
Architecture
x86_64
Describe the bug
I'm using Proxmox Virtual Environment (PVE) to manage k3os.
When I try to shutdown k3os by using "shutdown" menu of PVE, the k3os doesn't shutdown as expected. It still running as well.
I'm not sure whether k3os had integrated acpid.
To Reproduce
Click "shutdown" in PVE
Expected behavior
The k3os had been gracefully shutdown.
Actual behavior
The k3os ignore the event.
Additional context
n/a

If the default configuration for the QEMU Guest Agent is off for your setup it will just stop running. Take a look at /var/log/qemu-ga.log for some hints at what might be going wrong. Additionally, take a look at /etc/init.d/qemu-guest-agent to see what values it defaults to. You may attempt to run it yourself in the foreground to get a better idea of what is failing.


Unable to parse ISO-8859-1 XML

Describe the bug
I'm not able to use dasel to parse an XML file that is ISO-8859-1 encoded.
To Reproduce
Steps to reproduce the behavior:

Create a file with the example XML from below
Execute dasel -f /path/to/example.xml -p xml
The command will fail with the following message:

Error: could not load input: could not unmarshal data: xml.Decoder.Token() - xml: encoding "ISO-8859-1" declared but Decoder.CharsetReader is nil

<!-- example.xml -->
<?xml version="1.0" encoding="ISO-8859-1"?>
<response>
</response>

Expected behavior
I would expect to be able to use dasel with these files
Desktop (please complete the following information):

OS: MacOS 10.15.7
Version: 1.20.0

Hi @cgardner,
I'm away from home for a couple of days but will check this out when I'm back

Hit this myself when using dasel Go's API directly, and found a simple fix inside mxj :) Opened a PR, hope it helps!

Thanks to @brenol - this was fixed in https://github.com/TomWright/dasel/pull/165
I'll release this shortly under v1.20.1.

This issue is now solved.
$ cat test.xml
<!-- example.xml -->
<?xml version="1.0" encoding="ISO-8859-1"?>
<response>
</response>

$ dasel -v
dasel version v1.20.1

$ dasel -f test.xml .
<response/>

That worked!  Thank you!


fix: Removed sentinel 2 index from dag because 'Google's geo team wil…

…l be updating sentinel2 data. We only need to update landsat (the landsat_index step in the DAG) moving forward.

This is no longer required because it was fixed in a new PR for deployment to the new environment.


Webhook Secret not working

Controller Version
0.20.2
Helm Chart Version
0.25.2
CertManager Version

Deployment Method
Helm
cert-manager installation
yes
Checks

[X] This isn't a question or user support case (For Q&A and community support, go to Discussions. It might also be a good idea to contract with any of contributors and maintainers if your business is so critical and therefore you need priority support
[X] I've read releasenotes before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
[X] My actions-runner-controller version (v0.x.y) does support the feature
[X] I've already upgraded ARC (including the CRDs, see charts/actions-runner-controller/docs/UPGRADING.md for details) to the latest and it didn't fix the issue

Resource Definitions
...
githubWebhookServer:
  enabled: true
  replicaCount: 1
  useRunnerGroupsVisibility: false
  secret:
    enabled: true
    create: false
    name: "github-webhook-server"
...

To Reproduce
Create github-webhook-server secret with key: github_webhook_secret_token
install ARC + Runner
Set githubWebhookServer.secret.enabled to true
In the webhook settings, add a **different** token

Describe the bug
Everything is working fine with  githubWebhookServer.secret.enabled = false
I set githubWebhookServer.secret.enabled to true
=> I was expecting the github webhook to fail (tokens did not match)
The webhook was still working ok.
Describe the expected behavior
The Github webhook should not be able to connect to the Webhook server and return a 401 error
Controller Logs
-

Runner Pod Logs
-

Additional Context
No response

I just had to rebuild my cluster and it's now working.
Not sure why redeploying the Helm chart wouldn't pick up the webhook token though.
Closing the issue


Support sending request trailers

Add support for sending trailing headers (rfc7230-4.1/4.4) in a request.
Currently trailers are supported for Response objects but there is no way to set trailers on a request.

Request is reusable in OkHttp.  So Call.setRequestTrailers(Headers)?

Seems like the point of trailers is for things discovered while sending the request. Otherwise they would just be normal headers. So it's probably something like a callback that's invoked after the entire body has been written to produce them.

Presumably useful to checksum the request body?

Presumably useful to sign or checksum the request body?

Yeah the primary motivation I'm aware of is checksums. This ended up not being necessary for us (we do chunked encoding with ability to checksum without trailer support).  It would still be good feature for completeness sake.


refactor: use typed patch instance for platform config updates

See #485.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>8
Details

15 of 15 (100.0%)  changed or added relevant lines in 4 files are covered.
4 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.01%) to 90.823%

Files with Coverage Reduction
New Missed Lines
%

components/renku_data_services/base_api/auth.py
1
90.91%

components/renku_data_services/users/db.py
1
93.77%

components/renku_data_services/storage/blueprints.py
2
93.18%

Totals

Change from base Build<PHONE_NUMBER>5:
-0.01%

Covered Lines:
11124

Relevant Lines:
12248

💛  - Coveralls


Constant console/log spam on 1.34.2

Tried the version for 1.31 in 1.34.2 since I wanted to get around to updating the game from 1.29.1, and MenuPillars constantly spams something about a color function upon the mod loading.
2<IP_ADDRESS>.12.14.log

I unfortunately don't have any plans for updating MenuPillars for 1.34 as I still personally use 1.29.1, I'll be updating it whenever I move to latest.


fix procedure syntax

procedure syntax is deprecated https://github.com/scala/scala/commit/1d4d901fcea0a162cd139836b246e85cc0130a6b

looks good, thanks.


Small fixes in some editor dialogs

Small esthetics fixes in some editor dialogs.
MeshInstaceEditor outline dialog and 2D editor snap dialog:

MultiMeshEditor populate surface dialog:

I also have done a small fix on create new animation dialog and rewrite the 3D editor snap dialog.

I think the MultiMesh was a little easier on the eyes with some whitespace between the last field and the buttons - when all the rows are that close together, it feels cluttered. Apart from that, looks a lot better. Especially that first screenshot! :+1:


Plugin is available for Rider and unusable

Hi All,
I found this plugin in Rider - Preferences - Plugins - Marketplace, and I installed it, but can't do anything with it. I can't even set it up. Please, find the attached screenshot below.
Any plans to make this plugin usable in Rider?

Hello. I'd insist (😏) that the plugin is usable in Rider, we're actively testing it in both IDEA and Rider.
It may be unclear how to set it up properly, I'm ready to answer your questions.
Usual workflow is to either clone the repository via plugin (VCS → Get From Version Control → Choose Azure DevOps Git / Azure DevOps TFVC) or to enable the version control in an existing repository (I think that's VCS → Enable Version Control).
Please state your issues more clearly: which plugin features you're interested in?


libsql-ffi build failed on Windows

cargo new demo
cd demo
cargo add libsql
cargo check

Output
error: failed to run custom build command for `libsql-ffi v0.4.0`

Caused by:
  process didn't exit successfully: `C:\Users\...\target\debug\build\libsql-ffi-845dd5bc7ddd4d05\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-changed=bundled/src/sqlite3.c

  --- stderr
  thread 'main' panicked at C:\Users\...\.cargo\registry\src\index.crates.io-6f17d22bba15001f\libsql-ffi-0.4.0\build.rs:48:10:
  called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

https://github.com/tursodatabase/libsql/blob/807794891f2a3b9a60711bffdd0c9afdc0195135/libsql-ffi/build.rs#L42-L48
cp is sometimes not available on Windows.

Windows 11 rustc 1.80.0 libsql = "0.5.0"

I have the same issue

Hi, were you able to solve the problem? I have the same error

Hi, were you able to solve the problem? I have the same error

You can temporarily use the older version v0.4, which doesn't have this issue.
libsql = "0.4.0"

Hi, were you able to solve the problem? I have the same error

No. The only solution is to use libsql 0.4.0

The reason this occurs is because in the build.rs script the developers have put the Linux cp command for copying. I created my own copycat of cp, rust_cp. The repository has compiled binary, put this in any location you want on your windows system, and add Path environment variable, restart the system, and it should work.