onChange

im super new to flutter, but where do i put onChange function for example on RadioPickerSettingsTile? thank you

You can retrieve values and react to changes exactly where you need them using onStringChanged and other "on..Changed" functions as they return a StreamBuilder.
More info about using StreamBuilders itself.


Nanoseconds

Using nanoseconds module and allowing to pass in nanoseconds.
Let me know if this looks good.

yeah it looks great, thanks! ton of unit tests :) feel free to merge and publish, I'll make sure you're added


Multi Horizontal lists.

i have Tried a ton of layouts and widgets each time new exception message, basically i aim to have Multi horizontal lists under each other;
note: can not use listview.builder because the index is not known. or the items to be loaded after 6 seconds, where the list will through index not known.
  @override
  Widget build(BuildContext context) {
    return
      ListView(
        shrinkWrap: true,
        scrollDirection: Axis.horizontal,
        children: store.coins.map((coin) => ListTilWidgetFirst(coin)).toList(),
      );
      }

class ListTilWidgetFirst extends StatelessWidget {
  ListTilWidgetFirst(this.coin);
  final Channel coin;
  @override
  Widget build(BuildContext context) {
    return Container( height: 300.0,
      child: Card(
              child:
              ListTile(
                  leading: new Image.network(
                    coin.img,
                    fit: BoxFit.fill,
                    width: 150.0,
                    height: 40.0,
                  ),
                  title: new Text(
                    coin.name,
                    style: new TextStyle(
                      fontSize: 14.0,
                    ),
                  ),
                  subtitle: new Text(
                    coin.name,
                    style: new TextStyle(fontSize: 11.0),
                  ),

              ),

      ),
    );
  }
}

// to be views in anotehr class

class HomeScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(),
        body:Column(
          children: <Widget>[
            CategorySecond()
          ],
        )
    );
  }

Please consider asking support questions in one of the other channels listed at http://flutter.io/support .

tried the gitter, first but no one replied, maybe will do stackoverflow,
flutter doctor -v
[✓] Flutter (Channel beta, v0.7.3, on Linux, locale en_US.UTF-8)
    • Flutter version 0.7.3 at /home/saddam/flutter/flutter_linux_v0.7.3-beta/flutter
    • Framework revision 3b309bda07 (2 weeks ago), 2018-08-28 12:39:24 -0700
    • Engine revision af42b6dc95
    • Dart version 2.1.0-dev.1.0.flutter-ccb16f7282

[!] Android toolchain - develop for Android devices (Android SDK 28.0.1)
    • Android SDK at /home/saddam/Android/Sdk/
    • Android NDK at /home/saddam/Android/Sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.1
    • ANDROID_HOME = /home/saddam/Android/Sdk/
    • Java binary at: /home/saddam/Android/android-studio-ide-162.4069837-linux/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    ✗ Android license status unknown.

[✓] Android Studio (version 3.1)
    • Android Studio at /home/saddam/Android/android-studio-ide-162.4069837-linux/android-studio
    • Flutter plugin version 28.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[!] IntelliJ IDEA Ultimate Edition (version 2018.1)
    • IntelliJ at /home/saddam/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/181.4668.68
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[✓] IntelliJ IDEA Ultimate Edition (version 2018.2)
    • IntelliJ at /home/saddam/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/182.4129.33
    • Flutter plugin version 28.0.4
    • Dart plugin version 182.4129.13

[✓] VS Code (version 1.25.1)
    • VS Code at /usr/share/code
    • Flutter extension version 2.18.0

[✓] Connected devices (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)

! Doctor found issues in 2 categories.

No need to wast resources on this, i created a stackoverflow question, will consider this too in future howtos. Thanks.


long screenshot

Description of the new feature / enhancement
I think a long screenshot feature should come out, especially when trying to take a screenshot of a very long document.
Scenario when this would be used?
take a screenshot of a very long document.
Supporting information
No response

/dup https://github.com/microsoft/PowerToys/issues/3388


Fix sdist

Previous sdist was incomplete and I forgot about it T.T. Fixes

Codecov Report

Merging #29 (fc001c1) into main (f264a9c) will not change coverage.
The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@           Coverage Diff           @@
##             main      #29   +/-   ##
=======================================
  Coverage   11.11%   11.11%
=======================================
  Files           3        3
  Lines          18       18
  Branches        2        2
=======================================
  Hits            2        2
  Misses         16       16

Flag
Coverage Δ

unittests
11.11% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Can not convert to tflite model

I download your crnn_30.h5 and crnn_15.h5 file from baidu pan, but there has some errors when convert to tflite model, why?

What error did you get？


Update python compatibility tags to 3.11+

As I tried to test-run module with older ubuntu releases in https://github.com/mortencombat/stretchable/issues/102#issuecomment-2409870959 , noticed following incompatibility with Ubuntu-22.x (and earlier):
 > [6/6] RUN _venv/bin/python -c 'import stretchable':
0.353 Traceback (most recent call last):
0.353   File "<string>", line 1, in <module>
0.353   File "/test/_venv/lib/python3.10/site-packages/stretchable/__init__.py", line 11, in <module>
0.353     from .node import Box, Edge, Node
0.353   File "/test/_venv/lib/python3.10/site-packages/stretchable/node.py", line 5, in <module>
0.353     from enum import StrEnum, auto
0.353 ImportError: cannot import name 'StrEnum' from 'enum' (/usr/local/lib/python3.10/enum.py)

Afaict issue is due to enum.StrEnum available in python-3.11+ stdlib only:
https://docs.python.org/3/library/enum.html#enum.StrEnum
Simplest fix seem to be updating pyproject.toml tags to reflect reality, which is what this trivial PR does.
Alternative fixes might be to import a compatibility enum module from pypi somewhere, or to reimplement or not use StrEnum, if compatibility with older pythons is useful to maintain in newer module releases.
Thanks.

Thanks for discovering and reporting this. I've applied some relatively minor code changes to enable Python 3.8+ support in #107 which is being released in v1.1.3.


Enable black formatter

The first step is to figure out what raiden-services is doing with black.

https://github.com/raiden-network/raiden-services/blob/master/Makefile has these lines:
CODE_DIRS = src/ tests/
BLACK_PARAMS = --line-length 99

black --check $(BLACK_PARAMS) $(CODE_DIRS)


The crux 101 15/06/2020

Pros:

the game works well

Recommendations:

refactor the code to be more organized

Thank you for your feedback man. we will refactor it as mentioned


transparent background

Is that posible to set the transparant of  backgound?

Hey, i had to solve the same problem. Not sure if there is a better solution but i could to get it work by:
:backgroundOptions="{ color: 'rgba(50,50,50,0)'


feat(collateral, treasury): Subscribe to balance updates

Also constrains set accounts to be of type IKeyringPair instead of AddressOrPair, to remove ambiguity and ensure transactions can be signed with it. While not being very significant, this change touches many files.
I'm thinking of removing the setAccount pattern entirely and having the signer passed as a parameter. This would remove the is-account-set checks (e.g. here https://github.com/interlay/polkabtc-js/blob/master/src/parachain/issue.ts#L132) which are thrown if a transaction call is copy-pasted to a place where the API account isn't already set.
I haven't upgraded the version in package.json as I hope to release it together with the recent M2M. This PR adds breaking changes too, and that M2M increased the minor version
edit: I noticed that the UI sets the account using strings only, so the IKeyringPair approach doesn't work. I'll still look into simplifying the way accounts are set, but by using strings only. Marking this as Draft for now

I looked some more into how transaction signing is done and I believe we should keep using AddressOrPair instead of narrowing the type. AddressOrPair allows for either signing transactions with a KeyringPair object (which has a sign method because it has the private key), or specifying a string address that should sign and then doing signing via the wallet extension.
To remove duplication, however, I made all classes that send transactions inherit from TransactionAPI. This way, checking if the account is set and setting the account are only done in one place.


[Carousel]: When tapping the previous/next buttons multiple times it triggers page zoom

Hello from the Embla side, I hope you're all doing well 👋!
Issue description
When tapping the carousel previous and next buttons multiple times on an iOS device, it sometimes triggers an unwanted page zoom.
Steps to reproduce

Browse to the carousel page on an iOS device like an iPhone.
Tap on the next button twice or more to scroll through the carousel slides.
See the page gets zoomed which probably isn't what you wanted to do.

Suggested solution
I believe adding touch-action: manipulation; here and here solves the problem. As MDN describes it:

Enable panning and pinch zoom gestures, but disable additional non-standard gestures such as double-tap to zoom. Disabling double-tap to zoom removes the need for browsers to delay the generation of click events when the user taps the screen.

Thank you for your time!
Best,
David

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

@shadcn I think this issue will improve the UX a lot and shouldn’t be closed. The related PR is also finished and is only awaiting approval.
Best,
David

@shadcn reopen this? PR is not merged yet.


rapidxml.hpp -W-sign-compare

in
 void xmlns_lookup(Ch *& xmlns, size_t &xmlns_size, Ch * prefix, size_t prefix_size) const

//......
//......
//......
freeme = attrname = new Ch[prefix_size + 7];
const char * p1="xmlns";
while (*p1) *attrname++ = *p1++;
Ch * p = prefix;
*attrname++ = Ch(':');
while (*p) {
    *attrname++ = *p++;
    if ((attrname - freeme) >= (prefix_size + 6)) break;
}

the culprit line is
if ((attrname - freeme) >= (prefix_size + 6)) break;

This can of course be ignored with compiler flags but in projects/environments where compiler flags can't be changed this won't work.
casting (prefix_size + 6) also fixes but is probably not ideal (or if this is not true feel free to close).

@phansen01  You are quite correct! I commented this line.
To figure out whether compiler optimization flag makes a difference, I tried gcc with -O0 and -Os:

By the way, the latest version supports Mac OS X now.
@phansen01  @ztdwu
Thanks @ZupIT (ZUP IT Innovation) from Brazil!

Thanks, I'll close the issue now then.


Update Posts “protonvpn-killswitch-woes-in-ubuntu”

Automatically generated by Netlify CMS

👷 Deploy Preview for ltcblog processing.

Name
Link

🔨 Latest commit
7b07f1952ef6d5927d5c9b56c68636d3c41e142d

🔍 Latest deploy log
https://app.netlify.com/sites/ltcblog/deploys/64ebb1f100389c0008941f70


Add environment() as bicep parameter file function

Is your feature request related to a problem? Please describe.
The Bicep Linter is complaining about a disallowed host that cannot be resolved from the bicepparam file.
Describe the solution you'd like
Currently there are 2 functions available in bicepparam files, see https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-parameters-file
I would like to see environment() supported as well to resolve this issue and I can apply the fix that is suggested by the Linter.

We shouldn't be flagging this in .bicepparam files, so I've submitted #13608 to address this.

With the addition of environment() function in the bicepparam you also benefit from the available suffixes so you can construct an endpoint to a keyvault or storageaccount for example.


[ROCm][XLA]Provide support for creation of AMDGPU kernels

Provide utility that can create both AMDGPU/NVPTX kernels

@thomasjoerg, Thanks for the comments. I have incorporated both the suggestions.


[WSL 2] WSL 2 cannot access windows service via localhost:port

Is your feature request related to a problem? Please describe.
although now windows can access wsl service with localhost:port via "localhostForwarding", but wsl cannot access windows service via localhost:port, please fix it, Thank you.
Describe the solution you'd like
When WSL 2 try to connect to localhost:port and be refused, try to connect to windows again.

is there any update?

solved   https://github.com/microsoft/WSL/issues/4793#issuecomment-577232999

@numeric-lee that's not really solved - that's a workaround. In WSL1 you could hit:
localhost:port

From the WSL environment and that would access the windows service directly without having to:

Script extraction of a magic IP address
Disable a firewall interface which freaks people (including me) out and doesn't persist on reboot

Use cases are common including:

X11 Service running on windows host
Shared database access like postgres
Access docker on windows host from WSL client

A different IP address, I could live with, though I would suggest that WSL should expose it via WSL_HOST or something like it does for WSL_DISTRO_NAME. There are a lot of quite similar issues but I'm hoping this is now the central one that will get done, ideally before this gets widespread release.

This is because despite the name (WSL=Windows Subsystem for Linux), WSL2 is not a Windows subsystem like WSL1 and Interix were. WSL2 is an entire Hyper-V virtual machine with its own separate network interfaces, IP addresses, etc. Localhost and <IP_ADDRESS> are host local references and having more than one host, they refer to different things in Windows host and Linux guest host.
WSL2 already supplies some sort of special casing including accessing the Linux guest console/login for Windows terminal access to the Linux guest and means of accessing both the Windows host and Linux guest filesystems from both sides ("9p" Linux mounts vs. IFS redirector and UNC "\wsl$"). The best solution would be to generalize this to allow a configured list of port forwarding options. Then one could forward the server socket to the Linux guest allowing the guest to then believe and refer to the server as if it were local to the Linux guest host. For security and performance reasons, it would be good to use virtual machine specific socket system like that used by wslbridge2 (hvsocket).

To anyone needing a workaround, run this on the Windows side:
adb -a -P 5037 nodaemon server

and this on WSL2:
adb kill-server
export ADB_SERVER_SOCKET=tcp:<IP_ADDRESS>:5037
adb devices

Replace the IP with your windows IP.

To workaround this on selenium+chromedriver, I´m running a socat on wsl2 relaying requests to localhost:port to windows-host:port. This workaround can be used in a lot of other cases. :)

Every time that I go back to wsl2 and try to give it a try, the smae happens again. After updating windows, I'm not able to access localhost:port. Not event using wsl internal ip:port. Looks like it is a recurrent problem. Why we need to face it every update?

@andreialecu That only works for one particular service related to Android Debug Bridge.
@raelmax Yes, that is sort of what I suggesting by my comment about using WSL interop sockets. I had envisioned something with ncat (from nmap) but netcat and socat probably can also work. I thought about ncat because there should be both Windows and Linux versions available (sadly Windows Security identifies this as a "hacker tool" potential threat and quarantines it unless specifically allowed) so it was not too big of a stretch to just use pipes and depend on WSL interop to allow such to automatically cross the host-guest boundary.
What commands are you using? How do you handle the Windows host side of things? Which Linux distribution are you using that has socat or did you compile that yourself? Providing the commands you are using would be helpful. Thank you.
@jordaofranca I believe WSL1 is still available in later versions of Windows 10 but you do need to set the WSL version for each distribution (and you can set the default version for new distributions too). Obviously moving back to WSL1 is also just a workaround and not a solution.

@Uzume I´m using Ubuntu 18.04 and I´ve installed socat via apt-get. :)
My use case is as follow:

I need to use chromedriver(and chrome) running on Windows(host) and I need to control the chromedriver via selenium running on my Ubuntu(via wsl2).

Since I can´t update my code to access chromedriver via an IP address, he always tries access chromedriver via the localhost. So to put chromedriver to run on localhost, I´m using the following command to relay requests from LOCALHOST:PORT to WINDOWSHOST:PORT.
Command: socat -d -d  TCP-LISTEN:9515,reuseaddr,fork TCP:$(cat /etc/resolv.conf | tail -n1 | cut -d " " -f 2):9516
So each request that I did from my wsl2 machine to "localhost:9515" is relayed to "ipaddress:9516".  On the windows side, I just need to open the 9516 port on my firewall.
If I can help you with anything else, reach me out! :)

@raelmax It seems you are not using WSL interop sockets at all and instead just using socat to forward Linux guest client (selenium) accesses to a localhost port to a Windows host IP and port (which also requires that the chromedriver server allows connections from IPs other than its own localhost).
I imagine you could have just as easily used netcat or ncat (from nmap package). Thank you, I appreciate the feedback.

still same issue as of end of March 2020 ... WSL2 [Ubuntu 18.04] on WINDOWS 10 Pro cannot access a defined DISPLAY (no matter how I define it if via localhost:0, or the WSL2 vEthernet adapter IPv4 address) on X-Server (neither Xming nor VcxSrv with and without -ac parameters) running on WINDOWS host system to display any graphic apps (eg xeyes or xclock).

I added some documentation for the issues that I found while trying to get DISPLAY working with WSL 2:
https://github.com/cascadium/wsl-windows-toolbar-launcher#troubleshooting
Ideally though, yes localhost would work and no firewall exceptions would be required (which I would suggest this ticket is primarily for).

WSL2 networking really is a clusterfuck.

@fquinner I created some scripts, which can be run either when boot or from WSL or from Administrator Powershell.
They launch, in a transparent manner. a windowed KDE, using VcXsrv and the accompanying Xlaunch. It works very well and has no problems with reboots or shutting it down and back again
A working version has been uploaded at:
https://github.com/famelis/wsl2-x11

@Uzume I´m using Ubuntu 18.04 and I´ve installed socat via apt-get. :)
My use case is as follow:

I need to use chromedriver(and chrome) running on Windows(host) and I need to control the chromedriver via selenium running on my Ubuntu(via wsl2).

Since I can´t update my code to access chromedriver via an IP address, he always tries access chromedriver via the localhost. So to put chromedriver to run on localhost, I´m using the following command to relay requests from LOCALHOST:PORT to WINDOWSHOST:PORT.
Command: socat -d -d TCP-LISTEN:9515,reuseaddr,fork TCP:$(cat /etc/resolv.conf | tail -n1 | cut -d " " -f 2):9516
So each request that I did from my wsl2 machine to "localhost:9515" is relayed to "ipaddress:9516". On the windows side, I just need to open the 9516 port on my firewall.
If I can help you with anything else, reach me out! :)

Hey thanks for this solution. What should I change on the code side to get it to use port 9516?

@craigloewen-msft - Am I wrong in saying that the cause of this problem is that Windows Defender Firewall rules is blocking access (see https://github.com/microsoft/WSL/issues/4139)? If so, then either this issue, or the other can be closed.
I had similar troubles and the only way I could get it working was to excluding vEthernet (WSL) from my list of Windows Defender public protected network connections. Ideally I would like to have a firewall rule that allows access to all Windows ports from my WSL instance but it does not appear to work.

@smcenlly The cause for this problem is that WSL 2 has a virtualized ethernet adapter with a different IP address, and as of right now we don't relay connections from localhost in the guest VM to the host machine. This is different than the firewall issue, as there even if you use the IP address of the host you can still be blocked by default firewall settings. So for us on the team it's valuable to have both of these issues open so we can track them.

This is an important use case that 'just worked' in WSL1. I'm running a service in a docker container that I'd like to access from WSL2, but I can't connect to it, and it's not clear where any of the network stack is configured for the WSL2 VM. I've completely disabled the Windows Defender Firewall, but that doesn't change anything.
There is also an issue when running a VPN on the host and accessing Internet from WSL2 described here. The combination of these two issues are preventing me from adopting WSL2, and I'll have to switch back to WSL1 for the time being.
I'd like to (1) be able to access localhost: from WSL2 without having to jump through config hoops, and (2) be able to run a VPN on the host and not lose Internet connectivity in the WSL2 guest.

@aressler38

This is an important use case that 'just worked' in WSL1. I'm running a service in a docker container that I'd like to access from WSL2, but I can't connect to it, and it's not clear where any of the network stack is configured for the WSL2 VM. I've completely disabled the Windows Defender Firewall, but that doesn't change anything.

I believe your docker issue can be solved by enabling "Experimental WSL 2 based engine"

Did anyone find a proper solution yet?

This gist worked for me https://gist.github.com/matthiassb/9c8162d2564777a70e3ae3cbee7d2e95 in order to get WSL2 connecting to the network when Windows is connected to a VPN. I also shared the network adapter as described here: https://github.com/Microsoft/WSL/issues/416#issuecomment-619857497

How is this going on ? Windows 10 2004 is in the way at the end of this month, this issue is definite a key problem should be solved in advance .

Solution as we speak

Check your WSL2 network adapter
copy the ipv4 address in the details
add the ipv4 address in your host files

I found  it  due to windows firewall. Exclude the wsl.exe didn't work,  I saw several cases include me had to shutdown firewall to make wsl can access windows service .
Isn't this a big problem ?

Solution as we speak

Check your WSL2 network adapter
copy the ipv4 address in the details
add the ipv4 address in your host files

On host files on both Windows and Linux or just one of them? I guess I have to make the ipv4 static on the wsl adapter, it changes every reboot.

This article helped me out.
Key steps:

set windows firewall defender, add a new in bound rule.
use netsh to add portproxy.

My case is to access mysql on windows from wsl2, so my netsh command would be:
netsh interface portproxy add v4tov4 listenport=3306 listenaddress=<IP_ADDRESS> connectport=3306 connectaddress=<IP_ADDRESS>

It worked.
It did not work, but I solved it by "restart"....
Now today, it suddenly does not work again, and the "restart" couldn't fix it.
What's wrong ?

http://realtechtalk.com/iptables_how_to_forward_localhost_port_to_remote_public_IP-1788-articles
This article helped me forwarding ports to windows host.
To get windows ip I used $(cat /etc/resolv.conf | tail -n1 | cut -d " " -f 2) from https://github.com/microsoft/WSL/issues/4619#issuecomment-601429273
One caveat here, if your windows app is listening on <IP_ADDRESS> interface instead of <IP_ADDRESS>, you'll need to do a port forwarding on Windows too:
netsh interface portproxy add v4tov4 listenaddress=<IP_ADDRESS> listenport=3306 connectaddress=<IP_ADDRESS> connectport=3306 (or whatever port and listenaddress you need).
You'll also need to add a firewall rule for WSL: https://github.com/microsoft/WSL/issues/4585#issuecomment-610061194

Can anyone summarize this? All I want to do is display an X program in WSL on my Windows machine (I'm using vcxsrv). So just connect from WSL process to Windows port 6000. This was trivial in WSL1, and in WSL2 -- well I can't even figure out what the recommendation is.

I eventually got X11 working: turns out already vcxsrv adds firewall rules, and (sensibly) prohibits public access. But somehow WSL2 is considered "public"! Once I deleted those rules, X11 connections started working. I had to use this to get the WSL2 bridge address (can't just use the actual IP addr of Windows, that would be too simple): export WSL_HOST_IP=$(ipconfig.exe | awk '/WSL/ {getline; getline; getline; getline; print substr($14, 1, length($14)-1)}')
So from WSL at <IP_ADDRESS>, have to connect to <IP_ADDRESS> (same subnet, it's a /20), which somehow gets to Windows at <IP_ADDRESS>.
At the risk of seeming stupid, if WSL2 is really just a VM, couldn't it just get a DHCP address from my DCHP server? Then it'd be on my subnet and things would at least be semi-normal.

@garyo - regarding getting real IP from DHCP into WSL2, check this one -- https://github.com/microsoft/WSL/issues/5368#issuecomment-645296635

I got it working by allowing common ports that my ASP.NET apps use on windows host through the windows firewall. A blunt way is to turn firewall off for public networks, but that is risky.
WSL2 on Windows 10 2004

Hi,
I cant get it to work.
/etc/resolve.conf is showing the DNS server IPs.

do ipconfig on your cmd and you will get the IPV4 address. Instead of localhost:port try :port
This worked when I was trying to access a server started on windows through another app started from WSL system

same problem
when I run vagrant wanting to connect virtualbox which installed on the windows, the ssh would connection refused.

cmd command make it

but wsl2 fail，even through I use hostip and close firewall

So why there isn't a way to make the network static?
Why windows IP for WSL changes every reboot?
Why WSL update resolv.conf on boot but not just edit /etc/hosts?

Having the same issue with WSL2 accessing localhost:1433 of MSSQL running on Windows.
Running my Node.js app producing these errors:
TypeORM connection error:  ConnectionError: Failed to connect to localhost:1433 - Could not connect (sequence)
or running sqlcmd:
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2749.
I've managed to partially solve it by using the port of WSL virtual network adapter (f.e. <IP_ADDRESS>), but got the deprecation warning:
(node:472) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.
, what is definitely is not ok.

Networking changes in WSL2 are really a big pain in the ass, for me WSL is not usable anymore. Can we expect any comprehensive solution, not only a workarounds?

The same issue this is a big reason in order to not use wsl2. Just for more details I'm running IIS in port 80 and I can't curl from wsl2 to localhost. I hope one earlier solution...

me too

I just wanted to say THANK YOU to garyo: All I wanted to do was to connect to a SQL Server running on Windows using WSL2. This was a breeze using WSL1. Never in a million years I'd've expected WSL2 to be considered "public". Prior to this issue I was also trying to run X11 (Xming). My solution was very similar:
Until MS WSL2 comes up with a better way to connect to Windows apps
export WSL_HOST_IP=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}')
For X-server (Xming) to work
export DISPLAY=$WSL_HOST_IP:0.0
Anyway, once I allowed for "public" access (Windows firewall) for the default SQL Server port (1433), my python scripts were able to access the SQL Server successfully!!

export WSL_HOST_IP=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}')

The cat + grep + awk chain can be replaced with a single grep invocation:
export WSL_HOST_IP=$(grep -Po '(?<=nameserver ).*' /etc/resolv.conf)

Downgrade WSL2 to WSL1 worked.
Powershell : wsl --set-version Ubuntu 1

If you use Docker Desktop, which I'd highly recommend since it automates the entire WSL2 install from scratch, for each VM you enable docker integration for, it adds the host IP to /etc/hosts as per here, so you can use:
export DISPLAY=host.docker.internal:0.0

I'm not sure if Docker keeps it up to date, I'm sure it does.

If you want use windows service in WSL2
Run this
netsh interface ip add address "vEthernet (WSL)" <IP_ADDRESS> <IP_ADDRESS>
This will set new ip <IP_ADDRESS> for WSL 2. You can save this in bat file and run when the machine starts using windows task scheduler.

You can use this ip from WSL2 to access windows service.
It worked for me.

Just lost my morning trying to understand why I couldn't reach my local MongoDB Instance, because of this... Rolled back to V1 on my Debian and now everything works flawlessly.

@wbkang That's an interesting approach thanks - one that seems surprisingly resilient too. You can avoid the need for a wsl1 distro too by running one of the socat ports for windows directly instead too, e.g.
socat UNIX-LISTEN:/tmp/.X11-unix/X0,fork EXEC:"/mnt/d/Downloads/socat-<IP_ADDRESS>-1-x86_64/socat.exe - TCP\:localhost\:6000"

So yes this is a noteworthy workaround... until we get a proper fix.

Thank you guys, I tried to download an unofficial socat-for-windows and run:
socat tcp-listen:5555,fork exec:"/mnt/c/ProgramData/my-programs/socat/socat.exe - tcp\:localhost\:7890"

Then I can access the proxy server running on Windows at port 7890 easily by connect to localhost:5555 on WSL.
I'll try to get back to WSL2 if it works well with all the proxy stuffs. XD

It will be a very important feature for us, waiting for.

@wbkang That's an interesting approach thanks - one that seems surprisingly resilient too. You can avoid the need for a wsl1 distro too by running one of the socat ports for windows directly instead too, e.g.

I just tested the WSL2 direct to Windows path by using the cygwin socat v<IP_ADDRESS>, thinking that it might be even better to cut out WSL1, but this was visibly substantially slower.
WSL1 is doing some optimization here which causes, at least on my setup, socat from WSL2 via WSL1 to X410 to be significantly faster than the exact same use-case (Emacs) from WSL2 directly to Windows.

still PITA, can confirm

This is a showstopper issue for me. The time sync thing can be worked around without too much hassle, but lack of a stable, accessible IP address on my subnet is just impossible to deal with in a general way. The workarounds here are clever but are all just more things to break when you're trying to get a product out. I could not recommend WSL2 at this point just due to this issue.

honestly - seriously how on earth is this not working out of the box ? im running an application on my windows host on port 7888 - and i want to connect to that port from within a ubuntu bash running WSL 2, and i get to this discussion ? i dont understand any of the solutions giving here it seem to be the other way around from windows to WSL 2 ? totally blows my mind that this has to be a problem, what use is WSL for if you cannot interact with the 2 systems ?

Tried all described above options during 2 days. Neither of them worked for me

export WSL_HOST_IP=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}')

The cat + grep + awk chain can be replaced with a single grep invocation:
export WSL_HOST_IP=$(grep -Po '(?<=nameserver ).*' /etc/resolv.conf)

I meet a strange problem here.
On WSL:
$ 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 fe80::1
nameserver fec0:0:0:ffff::1

On Windows:
Wireless LAN adapter Wi-Fi 3:

   Connection-specific DNS Suffix  .

Both windows' and WSL's DNS is set to my windows' wireless router.

That has come up in other posts. Conditions under which it happens remain unexplained. It is particularly problematic since the docs suggest using the /etc/resolv.conf address. Use the default gateway address from route -n. [If you can't ping the default gateway either that's a separate thing.]

Does Microsoft have any plans to fix this soon??? Or fix it at all????? It is utterly ridiculous that windows can access ports in WSL2 with localhost:port but the same does not work if WSL wants to access a port in windows......

If you want use windows service in WSL2
Run this in Admin privilage:
netsh interface ip add address "vEthernet (WSL)" <IP_ADDRESS> <IP_ADDRESS>
This will set new ip <IP_ADDRESS> for WSL 2. You can save this in bat file and run when the machine starts using windows task scheduler.
You can use this ip from WSL2 to access windows service.
It worked for me.

Could you explain more details about it?

This is very painful for my WebApp development.
Its a huge hassle connecting my Localhost hosted mongodb server from wsl2.

Same issue here. We have a corporate proxy listening on <IP_ADDRESS>. So with wsl1, it is not difficult to use it, but sadly it is another story with wsl2 😭

Same issue here. We have a corporate proxy listening on <IP_ADDRESS>. So with wsl1, it is not difficult to use it, but sadly it is another story with wsl2 😭

For proxy, check this work around https://github.com/microsoft/WSL/issues/4619#issuecomment-679000718

For proxy, check this work around #4619 (comment)

Then I can access the proxy server running on Windows at port 7890 easily by connect to localhost:7890 on WSL.

@escape0707 - How should I connect from WSL2? I ran the following command from windows:
wsl -- socat tcp-listen:7890,fork exec:"/mnt/c/socat/socat.exe - tcp\:localhost\:7890"

@alarya All this comment do is like forward requests and responses between Windows local host:7890 and WSL(2) local host:7890. If you do have the same configuration like mine, which is a proxy server running in Windows and listening at local host:7890, then you can just access the same local potato in WSL(2), too. Such as you set HTTP_PROXY etc to local host:7890, then start a download. On Linux, how should you configure for proxy depends on which software you want to apply the proxy. But the point is that you can treat the port opened by so at as the proxy server’s listening port.
Of course, this proxy server process should be running in the background when you want to use a proxy, that’s why a added a & at the end of the command.

Hope my comment from other reported issue (which I guess is the same) helps you: https://github.com/microsoft/WSL/issues/5211#issuecomment-727606459

I personally ended up running containers with the WSL2 integration for services that can run on Docker (Mongo for example)

What I ended up doing, is running this in my .bashrc
Add routing rules for the windows processes I need.
# enable packet forwarding
sysctl -w net.ipv4.ip_forward=1 > /dev/null

# enable routing of packets generated by localhost
sysctl -w net.ipv4.conf.all.route_localnet=1 > /dev/null

# get the ip address of windows machine
winip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')

# remove exisiting iptables rules
iptables -t nat -D OUTPUT -p tcp -d <IP_ADDRESS> --dport 8000 -j DNAT --to-destination $winip:8000

# setup port forwarding and packet masquerading
iptables -t nat -A OUTPUT -p tcp -d <IP_ADDRESS> --dport 8000 -j DNAT --to-destination $winip:8000
iptables -t nat -A POSTROUTING -p tcp -d $winip --dport 8000 -o eth0 -j MASQUERADE

This solution suggested and created by RedaAouad

It would be good to know what the WSL team thinks of this issue. Accessing a local port on a local system shouldn't require running complicated bash scripts on startup or disable firewalls. Are there any plan to fix this issue?

Chiming in to say yes we are investigating fixing this issue! One of our overall goals is to improve the networking story in WSL 2, and we agree you should be able to access a local port on Windows without complicated bash scripts. We don't yet have a timeline for this feature but I'm keeping up to date on these threads and I'll be sure to post here when we have any news.

What I ended up doing, is running this in my .bashrc
Add routing rules for the windows processes I need.
# enable packet forwarding
sysctl -w net.ipv4.ip_forward=1 > /dev/null

# enable routing of packets generated by localhost
sysctl -w net.ipv4.conf.all.route_localnet=1 > /dev/null

# get the ip address of windows machine
winip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')

# remove exisiting iptables rules
iptables -t nat -D OUTPUT -p tcp -d <IP_ADDRESS> --dport 8000 -j DNAT --to-destination $winip:8000

# setup port forwarding and packet masquerading
iptables -t nat -A OUTPUT -p tcp -d <IP_ADDRESS> --dport 8000 -j DNAT --to-destination $winip:8000
iptables -t nat -A POSTROUTING -p tcp -d $winip --dport 8000 -o eth0 -j MASQUERADE

This solution suggested and created by RedaAouad

Small details to improve:
winip="$(grep nameserver /etc/resolv.conf | grep -v ':' | awk '{ print $2 }' | sort | uniq | head)"

Also, sysctl needs root permissions, how did you get it to run on your user?

I've tried out a way to simply access Window from WSL2
after I tried ping with all the ip address from the ipconfig of the Windows, I tried ping with Windows' device name. and it works!
My Windows was named to Moca, and inside the WSL2, ping Moca exactly pinged to my windows, and services are also accessable
frodoluo@Moca:~$ ping Moca
PING Moca.localdomain (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from Moca.localdomain (<IP_ADDRESS>): icmp_seq=1 ttl=128 time=0.212 ms
64 bytes from Moca.localdomain (<IP_ADDRESS>): icmp_seq=2 ttl=128 time=0.216 ms
64 bytes from Moca.localdomain (<IP_ADDRESS>): icmp_seq=3 ttl=128 time=0.212 ms
64 bytes from Moca.localdomain (<IP_ADDRESS>): icmp_seq=4 ttl=128 time=0.176 ms
^C
--- Moca.localdomain ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 0.176/0.204/0.216/0.016 ms
frodoluo@Moca:~$

@Uzume I´m using Ubuntu 18.04 and I´ve installed socat via apt-get. :)
My use case is as follow:

I need to use chromedriver(and chrome) running on Windows(host) and I need to control the chromedriver via selenium running on my Ubuntu(via wsl2).

Since I can´t update my code to access chromedriver via an IP address, he always tries access chromedriver via the localhost. So to put chromedriver to run on localhost, I´m using the following command to relay requests from LOCALHOST:PORT to WINDOWSHOST:PORT.
Command: socat -d -d TCP-LISTEN:9515,reuseaddr,fork TCP:$(cat /etc/resolv.conf | tail -n1 | cut -d " " -f 2):9516
So each request that I did from my wsl2 machine to "localhost:9515" is relayed to "ipaddress:9516". On the windows side, I just need to open the 9516 port on my firewall.
If I can help you with anything else, reach me out! :)

After running your socat command it just stays there frozen. I can't get it to ever complete.

Looking for a solution aswell.
Currently (I use wsl for only 2 days) I have only the use case with curl and I'm using this workaround , maybe it can help someone too https://superuser.com/questions/1527835/windows-10-wsl-curl-cant-access-localhost-with-error-failed-to-connect-to-loca

Looking for a solution aswell.
Currently (I use wsl for only 2 days) I have only the use case with curl and I'm using this workaround , maybe it can help someone too https://superuser.com/questions/1527835/windows-10-wsl-curl-cant-access-localhost-with-error-failed-to-connect-to-loca

To workaround this on selenium+chromedriver, I´m running a socat on wsl2 relaying requests to localhost:port to windows-host:port. This workaround can be used in a lot of other cases. :)

Could I ask how do you connect to selenium webdriver on WSL 2? I kept failing and get message 'Can not connect to the Service chromedriver'

To workaround this on selenium+chromedriver, I´m running a socat on wsl2 relaying requests to localhost:port to windows-host:port. This workaround can be used in a lot of other cases. :)

Could I ask how do you connect to selenium webdriver on WSL 2? I kept failing and get message 'Can not connect to the Service chromedriver'

installed WSL2, installed vcxsrv, disabled access control on the last config tab, allowed all firewall access and was able to launch:
'''
sudo apt-get install net-tools traceroute
DISPLAY=<IP_ADDRESS>:0.0 xeyes
'''
My debian WDL2 system and the windows system have different IP addresses. Traceroute shows that the system is running a little network mshome.net.

installed WSL2, installed vcxsrv, disabled access control on the last config tab, allowed all firewall access and was able to launch:
'''
sudo apt-get install net-tools traceroute
DISPLAY=<IP_ADDRESS>:0.0 xeyes
'''
My debian WDL2 system and the windows system have different IP addresses. Traceroute shows that the system is running a little network mshome.net.

installed WSL2, installed vcxsrv, disabled access control on the last config tab, allowed all firewall access and was able to launch:
sudo apt-get install net-tools traceroute x11-apps
sudo ifconfig
traceroute google.com
DISPLAY=<IP_ADDRESS>:0.0 xeyes

My debian WDL2 system and the windows system have different IP addresses. Traceroute shows that the system is running a little network mshome.net.

Thank you for response! I believe that's the cause of my problem, I forgot that WSL 2 could not show windows if no third-party tools like vcxsrv. Others had suggest to install that, but it's not easy to install new software on my workplace PC, so I just set webdriver options to headless, then everything works fine.
Thank you anyway!

installed WSL2, installed vcxsrv, disabled access control on the last config tab, allowed all firewall access and was able to launch:
sudo apt-get install net-tools traceroute x11-apps
sudo ifconfig
traceroute google.com
DISPLAY=<IP_ADDRESS>:0.0 xeyes

My debian WDL2 system and the windows system have different IP addresses. Traceroute shows that the system is running a little network mshome.net.

Thank you for response! I believe that's the cause of my problem, I forgot that WSL 2 could not show windows if no third-party tools like vcxsrv. Others had suggest to install that, but it's not easy to install new software on my workplace PC, so I just set webdriver options to headless, then everything works fine.
Thank you anyway!

Yeah, this is a showstopper for me, to the point I might have drop out of Windows entirely and use Linux natively. I'm using Ansible and testing deployments on VirtualBox VMs, and Ansible requires WSL (it won't run on Windows at all) and after being nagged to update, I finally did, only to find that all the networking is borked. I get that a NAT-type model is more secure, but nobody is going to be using WSL as a security layer, so this is just outright frustrating. Since I'm attempting to connect to a range of ports on VMs, the bash scripting method really isn't viable, and I'll attempt to back out of WSL2 until there's a working solution to this problem.

I had to switch back to WSL2 for performance.
So I had to treat this problem as a network issue. First I need to have a convention, if I want to access the HOST ports, It should be thru "winhost" instead of "localhost".
Then, that's why my .bashrc right now
# wsl get windows host ip
export winhost=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
if [ ! -n "$(grep -P "[[:space:]]winhost" /etc/hosts)" ]; then
	printf "%s\t%s\n" "$winhost" "winhost" | sudo tee -a "/etc/hosts"
fi

Having this support natively would be nice for a temporary/remedy solutions for this issue.

I had to switch back to WSL2 for performance.
So I had to treat this problem as a network issue. First I need to have a convention, if I want to access the HOST ports, It should be thru "winhost" instead of "localhost".
Then, that's why my .bashrc right now
# wsl get windows host ip
export winhost=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
if [ ! -n "$(grep -P "[[:space:]]winhost" /etc/hosts)" ]; then
	printf "%s\t%s\n" "$winhost" "winhost" | sudo tee -a "/etc/hosts"
fi

Having this support natively would be nice for a temporary/remedy solutions for this issue.

run ping winhost timeout

I had to switch back to WSL2 for performance.
So I had to treat this problem as a network issue. First I need to have a convention, if I want to access the HOST ports, It should be thru "winhost" instead of "localhost".
Then, that's why my .bashrc right now
# wsl get windows host ip
export winhost=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
if [ ! -n "$(grep -P "[[:space:]]winhost" /etc/hosts)" ]; then
	printf "%s\t%s\n" "$winhost" "winhost" | sudo tee -a "/etc/hosts"
fi

Having this support natively would be nice for a temporary/remedy solutions for this issue.

run ping winhost timeout

@theprimone delete the winhost line from your /etc/hosts file and then reload your terminal. This will update the winhost entry to be the most recent host IP.

I had to switch back to WSL2 for performance.
So I had to treat this problem as a network issue. First I need to have a convention, if I want to access the HOST ports, It should be thru "winhost" instead of "localhost".
Then, that's why my .bashrc right now
# wsl get windows host ip
export winhost=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
if [ ! -n "$(grep -P "[[:space:]]winhost" /etc/hosts)" ]; then
	printf "%s\t%s\n" "$winhost" "winhost" | sudo tee -a "/etc/hosts"
fi

Having this support natively would be nice for a temporary/remedy solutions for this issue.

run ping winhost timeout

@theprimone delete the winhost line from your /etc/hosts file and then reload your terminal. This will update the winhost entry to be the most recent host IP.

It still timeout after I delete winhost line and reboot my computer _(:3J∠)_

I had to switch back to WSL2 for performance.
So I had to treat this problem as a network issue. First I need to have a convention, if I want to access the HOST ports, It should be thru "winhost" instead of "localhost".
Then, that's why my .bashrc right now
# wsl get windows host ip
export winhost=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
if [ ! -n "$(grep -P "[[:space:]]winhost" /etc/hosts)" ]; then
	printf "%s\t%s\n" "$winhost" "winhost" | sudo tee -a "/etc/hosts"
fi

Having this support natively would be nice for a temporary/remedy solutions for this issue.

run ping winhost timeout

@theprimone delete the winhost line from your /etc/hosts file and then reload your terminal. This will update the winhost entry to be the most recent host IP.

It still timeout after I delete winhost line and reboot my computer (:3J∠)

Try:
Check your /etc/hosts if winhost has the correct ip.
Try to check if you have tee installed.
and/or
Update your windows build to 20H2,
Update wsl2 to 5.4.72-microsoft-standard-WSL2 or higher

@nivranaitsirhc Try to update kernel to 5.4.91-microsoft-standard-WSL2, still failed..., it's so hard _(:3J∠)_

@nivranaitsirhc Try to update kernel to 5.4.91-microsoft-standard-WSL2, still failed..., it's so hard _(:3J∠)_

Try this.

Does restarting wsl ask for one-time sudo password?

If no. Then something is wrong.

Try to run those script in wsl terminal see if it will update the /etc/hosts winhost entry.

This will narrow down the problem.

/etc/hosts has changed, but not work

@craigloewen-msft Hello, is there any update news?

I installed the OpenSSH Server on my host, then I forward ports as I like to my wsl box.
From wsl:
 ssh `cat /etc/resolv.conf | awk '/nameserver/ { print $2 }'` -L 9222:<IP_ADDRESS>:9222

/etc/hosts has changed, but not work

Sorry for the late reply, hope this is still relevant.
If winhost reflects on your /etc/host
Try:

Pinging winhost
or
Pinging the IP address of the reflected winhost.

If 1 fails but 2 does not. Your host file changes has not been read by the system yet.
If both 1 & 2 fails.
-It might be a routing error.
-The IP read by the command is not valid.
-Firewall issue.

I had to switch back to WSL2 for performance.
So I had to treat this problem as a network issue. First I need to have a convention, if I want to access the HOST ports, It should be thru "winhost" instead of "localhost".
Then, that's why my .bashrc right now
# wsl get windows host ip
export winhost=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
if [ ! -n "$(grep -P "[[:space:]]winhost" /etc/hosts)" ]; then
	printf "%s\t%s\n" "$winhost" "winhost" | sudo tee -a "/etc/hosts"
fi

Having this support natively would be nice for a temporary/remedy solutions for this issue.

This is great! However it seems that password must be provided for sudo after every reboot, because WSL generates /etc/hosts every time by default. This behavior can be disabled, as it suggests, by adding the following two lines to /etc/wsl.conf
[network]
generateHosts = false

Then I slightly modified the script as follows, for updating the existing winhost.
export winhost=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
old_winhost=$(grep -P "[[:space:]]winhost" /etc/hosts | awk '{ print $1 }')

if [ -z $old_winhost ]; then
    echo "write winhost to /etc/hosts"
    echo "$winhost\twinhost" | sudo tee -a "/etc/hosts"
elif [ $old_winhost != $winhost ]; then
    echo "update winhost in /etc/hosts from $old_winhost to $winhost"
    sudo sed -i "s/$old_winhost\twinhost/$winhost\twinhost/g" /etc/hosts
fi

If you're running Insider builds, don't do this stuff from your .bashrc. Anything with sudo in .bashrc will cause you headaches later. Instead, create/edit /etc/wsl.conf (See docs) and add a distro startup script in there. That will run as root. As of build 21286 /etc/wsl.conf supports boot.command to run any command on wsl2 startup.

/etc/hosts has changed, but not work

Sorry for the late reply, hope this is still relevant.
If winhost reflects on your /etc/host
Try:

Pinging winhost
or
Pinging the IP address of the reflected winhost.

If 1 fails but 2 does not. Your host file changes has not been read by the system yet.
If both 1 & 2 fails.
-It might be a routing error.
-The IP read by the command is not valid.
-Firewall issue.

Yes, I think so, I'm working on it now

@nivranaitsirhc Thanks for your help, I resovled firewall issue by https://github.com/microsoft/WSL/issues/4139#issuecomment-732067409
@function2-llx Something wrong with "\t"? resolved by https://stackoverflow.com/a/525875/8335317
export winhost=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
old_winhost=$(grep -P "[[:space:]]winhost" /etc/hosts | awk '{ print $1 }')

if [ -z $old_winhost ]; then
    echo "write winhost to /etc/hosts"
-   echo "$winhost\twinhost" | sudo tee -a "/etc/hosts"
+	echo -e "$winhost\twinhost" | sudo tee -a "/etc/hosts"
elif [ $old_winhost != $winhost ]; then
    echo "update winhost in /etc/hosts from $old_winhost to $winhost"
    sudo sed -i "s/$old_winhost\twinhost/$winhost\twinhost/g" /etc/hosts
fi

In the end, if somebody use Qv2ray, Sharing Proxy over Local Network (LAN) can help you.

@theprimone Thanks for pointing this out. Seems because I'm using zsh, the issue does not exposed.

In my case, the problem just happens sometimes and returns to work when I reboot the whole Windows, which is quite annoying. Does anyone know what it might be?

I'm using WSL for Java develpment projects. Some of these projects require access to a database via localhost running in Vagrant/Virtualbox VM's on the Windows host.
With WSL1 I had no problems in setting up such a development environment but it's impossible with the current behavior of WLS2.
I think this is a show stopper for many scenarios that would otherwise be ideal for using WSL2 with its performance benefits.
Are there any plans to change this behavior?

Was using WSL2 for an Vue project , I was trying to connect to a Java API using axios but it's giving me a network error I guess wsl is unable to access the windows localhost .
Hope there is a solution to this.

@AkikJana This comment above is useful.

Sorry if this has already been posted but I found a workaround using sshd running on WSL and reverse tunnelling a port so
that I could expose a windows hosted proxy to WSL.
Running this in windows creates the reverse tunnel:
ssh -R 3128:localhost:3128 mark@localhost
I was then able to set my WSL proxy to localhost:3128 and it all worked.
See https://www.howtogeek.com/428413/what-is-reverse-ssh-tunneling-and-how-to-use-it/

Does anyone know why I'm getting:
xclock
No protocol specified
Error: Can't open display: <IP_ADDRESS>:0

Hit on this bug on WSL2, while using curl to send a request to a local WepApi

Every virtual machine has some way of forwarding a port from a virtual fixed address back to localhost on the host, but not wsl.
I call bull$hit on this. They probably need this feature themselves to develop WSL itself.
IMHO Microsoft idea here is to let people use Linux programs from Windows. Not to allow them to build hybrid applications or empower Linux code in any way.

I was able to bypass this by replacing localhost:port with:
hostname.local:port
You can retrieve your hostname by writing hostname in WSL or PowerShell.

it works for me, thx so much

I had to switch back to WSL2 for performance.
So I had to treat this problem as a network issue. First I need to have a convention, if I want to access the HOST ports, It should be thru "winhost" instead of "localhost".
Then, that's why my .bashrc right now
# wsl get windows host ip
winhost=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
if [ ! -n "$(grep -P "[[:space:]]winhost" /etc/hosts)" ]; then
	printf "%s\t%s\n" "$winhost" "winhost" | tee -a "/etc/hosts"
fi

Having this support natively would be nice for a temporary/remedy solutions for this issue.

An update to this approach and to reduce the annoyance of typing the sudo password every startup.
In the spirit of Linux!
What we a aspire to do: "run this script on boot & and run as root"
Method 1. (Not yet for everyone, the easy way. REQ: Windows 10 Insiders program or Win11)

Utilize the /etc/wsl.conf boot config.

[boot]
command=""

Steps:

wrap the host script and store anywhere (reco: /etc/) and make sure to have it execution attribute and permissions.

#!/usr/bin/bash
# wsl get windows host ip
winhost=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
if [ ! -n "$(grep -P "[[:space:]]winhost" /etc/hosts)" ]; then
	printf "%s\t%s\n" "$winhost" "winhost" | tee -a "/etc/hosts"
fi

add the command inside the wsl.conf to execute the script. e.g. command="bash /etc/winhost.sh"
Verify

a. ping winhost
b. cat /etc/hosts look for winhost

Enjoy & Relax!

Method 2. ( The hard-way, This is Linux we can do things a lot of ways and maybe break things most of the time)
(🔺) Warning! Do not proceed unless you know what you are doing! (🔺)
Most of us will think of crontab. But wsl does not support systemd out of the box.
Thanks to @arkanesystems  for genie. We can now run this script as a one shot service inside a bottle where systemd exist.
systemd-genie:

I strongly recommend you read everything in the wiki before proceeding with this method.
https://github.com/arkane-systems/genie/wiki

Steps:

Refer to Method 1 step 1 above.
install systemd-genie

sudo apt update
sudo apt install -y systemd-genie

exit & shutdown the wsl.

wsl --shutdown

start the wsl inside a bottle wsl genie -s
create a new service file at /etc/systemd/system/* and name with anything you like. (reco: winhost.service)
use vim to copy this code below sudo vim /etc/systemd/system/winhost.service

[Unit]
Description=Map windows localhost IP to local winhost

[Service]
Type=oneshot
ExecStart=/etc/winhost.sh
RemainAfterExit=false

[Install]
WantedBy=multi-user.target

useful ref: https://manpages.ubuntu.com/manpages/cosmic/man5/systemd.service.5.html
7. save and shutdown wsl.
8. start a new wsl shell and start a bottled shell wsl genie -s
9. Verify

a. ping winhost
b. cat /etc/hosts look for winhost
c. run systemctl status check if the winhost.service was executed.

If you have read the genie wiki above you can now Relax and Enjoy!

Method 2 is an overkill but at least we have systemd running

I was able to bypass this by replacing localhost:port with:
hostname.local:port
You can retrieve your hostname by writing hostname in WSL or PowerShell.

@WilliamViktorsson thanks for this suggestion. I'm getting strange errors when trying to use *.local hostname:
user@myhost:~$ nc -vv myhost.local 80
myhost.local: forward host lookup failed: Unknown server error : Resource temporarily unavailable

However when I run ping command hostname seems to resolve to correct IP as expected (host actually does not reply to ping, but I can see the IP).
Do you have any ideas what may cause errors in such case?

After uncounted hours of frustration reverting to wsl1 was the only thing that worked for me:
wsl --set-version Ubuntu 1

I'm still facing this issue in WSL 2 in WSL 1 the issue was not found , don't know why this is happening 😢

It's been 3 years, why hasn't it been fixed already :/.

Use $(hostname).local to access host machine is ok. But something else should be noted:

https://github.com/microsoft/WSL/issues/5575 Maybe you should use command like netsh int ipv4 set dynamicport tcp start=49152 num=16384 to fix host machine dynamicport range.
https://github.com/microsoft/WSL/issues/4171 Maybe you should update firewall settings like https://github.com/microsoft/WSL/issues/4171#issuecomment-929858850 to fix ping failed.
https://github.com/microsoft/WSL/issues/4139 Maybe you should remove the vEthernet (WSL) connection in which profile you use like https://github.com/microsoft/WSL/issues/4139#issuecomment-732067409 to make you can access to host machine.

It's awkward that firewall settings of vEthernet (WSL) connection maybe restore by the system, so access failed you should check the firewall settings firstly.
In the end, you can access windows services, and vice versa. Hope this is useful for someone (At least for me _(:з」∠)_

More info? My Chinese artical about this

I just saw that microsoft has labeled this as feature. This is DEFINITELY a horrible bug, not an optional feature!

After hours of frustration reverting to wsl1 was the only thing that worked for me:
wsl --set-version Ubuntu 1

it worked thanks :)

Just encountered this issue myself. $(hostname).local doesn't work from inside dotnet.
I'm surprised that WSL2 doesn't have a hostname common across all environments in the same way the Docker has host.docker.internal.
There should really be a host.wsl2.internal or similar.

To anyone needing a workaround, run this on the Windows side:
adb -a -P 5037 nodaemon server

and this on WSL2:
adb kill-server
export ADB_SERVER_SOCKET=tcp:<IP_ADDRESS>:5037
adb devices

Replace the IP with your windows IP.
Edit: I may have commented on the wrong issue. It was one on the same error but related to Android studio.

I made 2 scripts so I can invoke them whenever I "login" to my development session.
On windows:
Create a ps1 file somewhere in C:/ drive, in my case it's located in C:/Android/make_adb_server.ps1:
# C:/Android/make_adb_server.ps1
taskkill /f /im adb.exe

Start-Process -FilePath adb.exe -ArgumentList "-a -P 5037 nodaemon server" -WindowStyle hidden

timeout 5

adb connect localhost:58526

On WSL2:
Create a shell script that would call the aforementioned file and then define the socket as well. In my case I placed it at ~/start_adb_server.sh:
# ~/start_adb_server.sh
powershell.exe "C:/Android/make_adb_server.ps1"

windows_ip_address=$(grep nameserver /etc/resolv.conf | awk '{print $2}')

export ADB_SERVER_SOCKET="tcp:${windows_ip_address}:5037"

# Verify it works:
adb devices

Then you can setup your adb server directly from WSL2 by calling
source ~/start_adb_server.sh

@gthvidsten

Just encountered this issue myself. $(hostname).local doesn't work from inside dotnet. I'm surprised that WSL2 doesn't have a hostname common across all environments in the same way the Docker has host.docker.internal. There should really be a host.wsl2.internal or similar.

Apparently Microsoft must've listened to you. I just tried host.docker.internal and it worked! ChatGPT suggested it as well.

Hi folks, we have put out a new update that aims to fix this issue in WSL. In your .wslconfig file you can set experimental.networkingMode=mirrored, as well as some other key settings that should improve your network compatibility! With this you will be able to access Windows servers via localhost. Please try them out and let us know what you think.
More info on this release and the changes can be found here in the blog post.
Please note: You need to be on a Windows Insiders version to use the new networking settings (Any channel of Windows Insiders will do, including release preview). If you see the "These are not supported" messages it means that your current Windows version doesn't have support, and you will need to upgrade. These features will eventually be coming to Windows 11 22H2.

These new networking features are now available on the latest version of Win11 22H2!
Please make sure you're on the latest build to get these features, you can do that by clicking "Check for Updates" in Windows settings. You can check you have the right build by either ensuring you have KB5031354 installed, or run cmd.exe /c ver and ensure that your build number is 22621.2428 or higher (Including the minor build number which is after the . as this was a backport!)

Are there any chances for the fixes to be backported to Win10? 🙏

FYI, latest update, 2.0.14, comes with the fix. Confirmed that it works for me on Win11 22H2.

I installed the version 2.0.14 on my Windows 10. Unfortunatelly the network fix does not work there. So hoping here that it will be available for Windows 10 as well and soon (Company is not ready yet to update to W11 I'm afraid)

@craigloewen-msft
The .wslconfig edit to set networkingMode=mirrored  is not working for me using Microsoft Windows [Version 10.0.22631.3007]
I am trying to port forward Sublime with RemoteSubl  using ssh -R 52698:localhost:52698 user@remote-server.
I can see <IP_ADDRESS>:52698 listening on the Windows side through powershell but looking for ports on the WSL Ubuntu terminal with netstat I don't see my port. What does networkingMode=mirrored do? How can I validate its working?

I'm observing the same behaviour specifically with pocketbase embedded http server, so I'm not sure if it's the PB or WSL side that's causing it.
This can simply be tested running the prebuilt linux and windows binaries for PB under WSL2 and seeing that linux works fine while windows is not accessible.
https://github.com/pocketbase/pocketbase/issues/4365

@craigloewen-msft @amahpour what is the minimal .wslconfig for using mirrored mode? i'm unable to access localhost:3000 for my next.js app. using wsl2 without docker-desktop. but docker run --rm -ti -p 80:80 nginx works fine & i can see nginx on localhost.
is this config enough?
.wslconfig
[wsl2]
localhostforwarding=true
networkingMode=mirrored
firewall=true

do i have to restart my pc too? or is wsl --shutdown enough?

@deadcoder0904 Oddly enough I've got nothing configured except for systemd. What version of Windows and kernel version of WSL are you running?
For windows type winver in the command shell
For WSL go to a command shell and type in wsl --version
Also, I presume your nginx test is Docker via the Windows command shell (not within a bash WSL 2 shell)?

winver showed this:

wsl --version showed this:
Kernel version: <IP_ADDRESS>-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.3155

I presume your nginx test is Docker via the Windows command shell (not within a bash WSL 2 shell)?

i'm using powershell 7. but i'm going into wsl by typing wsl on windows terminal (powershell 7) & then typing that docker run command. i'm using wsl2 without docker desktop bdw.

Yeah, you're certainly up to date. So with older versions of WSL 2 (or maybe it was WSL 1) you had to create tunnels or address the IP of the WSL instance (just like you would with a VM). Not sure when the switch happened but Microsoft now defaults WSL to NAT mode. This means that if you've got a a Node app running in WSL (i.e. the example you gave), addressing it via localhost on the Windows side should bring it up.
Some follow up questions:

What distro are you using?
Did you install it via the Microsoft Store?
What happens when you remove all those config options in .wslconfig (and completely restart the computer)?
Are you 100% sure there's no firewall policy in your WSL distro?
Have you tried address your Node app using the IP of the WSL instance (instead of localhost) just like the old days with VMWare or VirtualBox?

What distro are you using?

Ubuntu.

Did you install it via the Microsoft Store?

I don't remember. But I think I did wsl --install

What happens when you remove all those config options in .wslconfig (and completely restart the computer)?

Haven't tried it yet.

Are you 100% sure there's no firewall policy in your WSL distro?

I am not sure. I did check & add or removed but don't remember what I did. Is there a way to reset it?

Have you tried address your Node app using the IP of the WSL instance (instead of localhost) just like the old days with VMWare or VirtualBox?

For some reason, my IP never worked. The one I got when I did ipconfig & at the end, there is a WSL IPv4 IP but yeah I couldn't ever get IP working when all answers on the internet say that it will work. It just never did for me.
Bdw, I changed my Dockerfile to use ENV HOSTNAME '<IP_ADDRESS>' & it works for now but ENV HOSTNAME localhost doesn't.
What's your suggestion? Do I try removing .wslconfig & restarting? Should I also reset firewall?

What version of Ubuntu?
One sure bet way of doing it is install a new distro via the Microsoft Store (you can have many WSL distros at the same time just like your would VMs) and make sure there's no firewall set up. Make sure your .wslconfig is empty as well. Give that a shot and see what happens. I've done this countless times on new machines and, with the latest version of Windows 11 + WSL 2, it's always worked.

Regarding localhost versus <IP_ADDRESS> I can't really comment on how Windows handles all of that. To be honst I've completely forgotten. WSL matured to a point that I develop strictly in it now (versus in Windows, separate Linux machine, or VM)...

What version of Ubuntu?

I tried lsb_release -a & got this:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

Alright, I'll try it again.
Did you remove localhostforwarding too?
I'm just unsure because I've only recently installed WSL because I wanted to try Docker & Docker doesn't work without WSL but yeah, still some weird errors.

I definitely do not have localhostforwarding set. I highly recommend removing it and/or starting from scratch like I proposed above.
Regarding Docker: that's the beauty of Docker for Desktop. WSL 1 with Docker for Desktop was pretty lackluster but Microsoft did a phenomenal job integrating it with WSL 2. You just need to make sure you enable WSL 2 in the General settings and your distro (in this case Ubuntu 22.04) in Resources > WSL Integration.

@amahpour so i removed everything in .wslconfig, restarted my pc & it works for now.
the only thing i had to change is use <IP_ADDRESS> instead of localhost in dockerfile.
for some reason, wsl2 without docker for desktop works much better for me. docker for desktop spins a lot of fans for no reason. it doesn't help i'm using a low-end pc for now. but for low-specs pc, wsl2 without docker desktop is the way.
thanks for the help bdw.
would love to know why localhost as hostname doesn't work? it should because all default templates use localhost. you can try one yourself by cloning a next.js example from https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile (i guess they are using <IP_ADDRESS> now but i still think its a bug in wsl2)
you can see countless examples here (i'm assuming they are on linux/mac but their windows colleagues will face issues) -> https://sourcegraph.com/search?q=ENV+HOSTNAME+localhost+file%3Adockerfile&patternType=standard&sm=0

I've recently been experimenting with bridging in WSL2.  I've tried this many times in the past and had limited and random success.
I've recently worked out why this is and why there is so much said on the subject.
##Simply put
The Win10/11 GUI leaves bits of config inside the hidden network layers, which break later invocations.
##Resolution
However if you use PowerShell, (I know, sadly....), then you can make config that always works!!
Note: I found I had to install some PowerShell helper modules and make sure I'm using an up to date version of PowerShell as it seems Win10 got left behind in that at some point.
##Root cause
What is happening is that, e.g. you have an unused adapter interface on the host machine.  When you try and re-configure networking in WSL2, if certain protocol extensions are installed in that adapeter - even if it is disabled and not attached - then WSL2 silently fails to configure the interface(s).  If you look under the hood, the extension required on the various interfaces are missing.  This explains the random things I've seen.  And I found it by issuing the commands in the wrong order.
But in PS I was able to see the obtuse messages that are being kept quiet.  e.g. "A protocol on the network adapeter prevented it from binding to the virtual network."  or  "Ethernet Adapter XYZ is already bound to Microsoft Virtual Switch Protocol"  or (and I laughed at this one) "ERROR: Failed whilemodifying virtual switch - Reason: Failed while modifying virtual switch settings" (lol)
I find the old Control Panel Networking view is better than the newer Win10/11 in that you can see things sometimes don't look right...  E.g. Things like Up thing being Down, TWO or ZERO copies of "vEthernet (WSL)"  I've even seen them with - yep - The same UUID
The properties should look something like this....

I've not got time to document this properly and concisely, but I found the following commands (cut and paste from my notebook) provided the answers...   Don't say I did not warn you and tell you I take no responsibility for what happens.....
** BTW: Some of these won't work without local Administrator rights
Get-NetAdapterBinding | where-object -property Description -like -value '*switch*' | format-table
get-NetAdapter | where-object -Property Name -Like -value '*RJ45*' | get-NetAdapterBinding
get-NetAdapter | where-object -Property Name -Like -value '*RJ45*' | get-NetAdapterBinding | Where-Object -Property ComponentID -eq -value 'vms_pp'
get-NetAdapter | where-object -Property Name -Like -value '*RJ45*' | get-NetAdapterBinding | where-Object  -Property ComponentID -eq -value 'vms_pp'  | Set-NetAdapterBinding -Enabled $False
# OK lets try changing something....
get-NetAdapter | where-object -Property InterfaceDescription -Like -value '*Thun*' | select-object Name | Set-Variable -Value 'Thunderbolt'

# Use Install-Module if the command you need are missing....
Get-Module -All -ListAvailable | Where-Object -Property ModuleType -eq -Value 'Manifest'

Install-Module # (...I did not write the rest of that down)
help module

Get-VMSwitch | Get-VMSwitchExtension | format-table
Get-NetAdapter -IncludeHidden
Get-VMSwitch | select-object -Property Name, Extensions | format-table
Get-NetAdapterBinding
Get-VMSwitchExtension
Get-VMSwitchExtensionSwitchFeature
help Enable-VMSwitchExtension -full
Add-VMSwitchExtensionPortFeature
hvc -v list
hcsdiag list
wsl --system
Get-VM -ComputerName PC | Where-Object {$_.State -eq '*'}
hcsdiag read -uvm 383890C3-1FEE-4E38-B328-B63A87D37A46 \etc\shadow     # Would have been rather jolly if that had worked... :|
Get-NetAdapterAdvancedProperty
Get-help Add-VMSwitchExtensionSwitchFeature -full
# It seems wildcards work
help get-vm*
help vm

With these I was able to see what was happening and clear out any cruft and create the correct switch bound to the correct adaprter with the correct name/settings etc.
I also used the Virtual Switch manager from Hyper-V
I also found that in .wslconfig you can write the following to bind WSL2 to a bridged network called 'Bridge'
But then found you did not even need the actual bridge !!
A VMSwitch alone is enough.  I now have a VM (Centos) + WSL + Host all attached to the same LAN network right back over a VPN to the office....
[wsl2]
networkingMode = bridged
vmSwitch = Bridge

Next, see if I can use a bridge and some sort of VLAN or other multiplexing to get more than one adapter and more than one concurrent network.
I think Open vSwitch may be useful...

Oh yes, I have the same issue, but after trying so many configurations from the issue or other issue. still not work.
And I found out it's very easy to connect to windows service from WSL. you just change the IP address from <IP_ADDRESS> to your windows ip address, which works for me.
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
async def root():
    return {"message": "Hello World"}

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="<IP_ADDRESS>", port=8010)

This is a simple example. Then I run on window, normally, we will connect by <IP_ADDRESS>:8010. This works when you were in your windows environment. But from WSL, it's not work. by changing the IP address to your_windows_ip:8010, then you should connect.
~$ curl <IP_ADDRESS>:8010
~$ {"message":"Hello World"}

<IP_ADDRESS> is my windows IP, change to yours.
Vice Verse
If you start your service on WSL, you want to connect from windows, you will need the ip of your wsl
ifconfig

and your could check from PowerShell
> curl <IP_ADDRESS>:8010

StatusCode        : 200
StatusDescription : OK
Content           : {"message":"Hello World"}
RawContent        : HTTP/1.1 200 OK
                    Connection: keep-alive
                    Keep-Alive: timeout=4
                    Proxy-Connection: keep-alive
                    Content-Length: 25
                    Content-Type: application/json
                    Date: Fri, 19 Apr 2024 03:14:39 GMT
                    Server: uvicorn
                    ...
Forms             : {}
Headers           : {[Connection, keep-alive], [Keep-Alive, timeout=4], [Proxy-Connection, keep-alive], [Content-Length
                    , 25]...}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 25

It's working for me here, I hope this will help you too.


PC wish import methods not working

URL not present in output_log.txt anymore
Can't seem to copy the table from ingame
URL can still be found in the webCache file though

For the gist file on method 1, can be fixed by changing the version on
$cachefile = "$gamedir/webCaches/<IP_ADDRESS>/Cache/Cache_Data/data_2"
to

I'm gonna go on a whim and say that something changed again in 4.0 like it did in 3.0

The Method 1 is not working.

Resolved by 1d11599ab709f44c590b3aec3231ef39804c97ba


fix androidX bug

Thank you for the PR!
Could you please remove the pubspeck.lock from the PR?
Since we did not change anything in pubspec.yaml, it's better to keep the version of pubspec.lock.

sure


Feature | Profile page for user

Build a profile page like this

The profile should be accessible from the url like this
xyz.com/@username
Features:

User posts
User personal information (edit option)

Following and Followers is out of scope of this PR and can be ignored for now.

hey @aadeshkulkarni can i try tackling this?


Add css rule for left menu arrows

Added css rule that will change the left menu arrows to up and down on multilevel menu on open and  close state.

Can you please run it so we can include the modified minified app.css file?

i dont have master version of Voyager, and cant run it, I add this in  my 0.11.14 version

Okay, I will take a look at it then

I'll merge this in and then do a build with this style in another PR 👍


Hitting the @ starts the prompt, but doesn't add the @ to the property

This is very strange, as this has only popped up in the last week or two, and you haven't updated the module in a month so I genuinely don't know what has happened, but essentially when I type in a damage field say, 1d10 + @mod, when I hit the @ symbol the prompt comes up giving me the list of all the possible things I might attach, like traits or classes or mod or whatever. If I then type out mod and hit enter, it doesn't add the @ symbol anymore.
So I might type 1d10 + @mod, but what comes out is 1d10 + mod. Foundry doesn't register this, and the dice don't roll. Very strange!

Thanks for the report, I’ll take a look as soon as possible.


Upstream for uadk engine

The problem is the uadk will return error if the iv is zero in XTS mode. But this is a bug for XTS. So I think fix the parameters for XTS in one patch is better, and can wait to merge this pull request after uadk fix it.

"and can wait to merge this pull request after uadk fix it."
do we still need uadk patch?

Yes，I'm verifying uadk's patch and upsteam the patch today. I'll at you when I send the pull request.


feat(clustering) lax version checks

Summary
Incompatibility checks on control plane were loosened. Previously data plane was considered incompatible when:

data plane kong major version is different to control plane major version
data plane minor version is greater than control plane minor version
data plane minor version is behind more than two minor versions of control plane
data plane missed plugin that control plane had (whether it was configured or not)
data plane has different major.minor version of the plugin that control plane had
(whether it was configured or not)

This commit changes that. With this commit the data plane is considered incompatible when:

data plane kong major version is different to control plane major version
data plane misses configured plugin
data plane plugin major version is different to configured plugin major version on control plane

This also makes the logging on these configuration issues on control plane more uniform and contains
information about the data plane which caused the incompatibility.
It still misses features such as data plane reporting import errors back to control plane or dao checks,
but let's leave that to other future pr.

let's also update the e2e tests in spec/02-integration/09-hybrid_mode/01-sync_spec.lua

Looks good. We also need to add tests for this change.

Superseded by https://github.com/Kong/kong/pull/7488.


Initial implementation of a CWP server manager

Reopening PR #910,  I was hoping to get feedback on the code before merging as this is my first time dealing with API functionality.
Also, I think we should resolve issue https://github.com/boxbilling/boxbilling/issues/922 before merging. If that is intended behavior, then I can update the server manager to throw new Server_Exception when something doesn't work. But the behavior I saw seems wrong

We still falsely have a requirement to the old travis-ci integration @fordnox @timothygwebb

I consider this ready for a review and then merge if nothing is brought up in the review

We still falsely have a requirement to the old travis-ci integration @fordnox @timothygwebb

@BenNottelling This has been rectified.

Does anybody have anything to comment on this or am I good to merge?

Good to merge.
On Thu, Aug 12, 2021 at 1:25 AM Benjamin Aerni @.***>
wrote:

Does anybody have anything to comment on this or am I good to merge?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/boxbilling/boxbilling/pull/923#issuecomment-897358622,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AD24K7MTQIWUER5C53IV2RDT4NLMVANCNFSM5BVLZE3A
.

RedBeanPHP Install to get your php8 working. https://www.redbeanphp.com/index.php?p=/install

Can we merge this to the source anyhow so everyone can use it?

Can we merge this to the source anyhow so everyone can use it?

Yes, we have RedBeanPHP here: https://github.com/boxbilling/boxbilling/blob/master/src/rb.php
It hasn't been updated since 2014

Can we merge this to the source anyhow so everyone can use it?

Yes, we have RedBeanPHP here: https://github.com/boxbilling/boxbilling/blob/master/src/rb.php
It hasn't been updated since 2014

ik, I was talking about updating it.

@BenNottelling @evrifaessa There is a whole branch related to readbean https://github.com/boxbilling/boxbilling/tree/update/redbean

@BenNottelling @evrifaessa There is a whole branch related to readbean https://github.com/boxbilling/boxbilling/tree/update/redbean

It seems to be 400 commits behind the master branch. It would be good if someone works on it, because it seems like the only barrier between us and PHP 8.


Token.position.end.line super slow?

While profiling scalafmt I was surprised to find out that an innocent call to Token.position.end.line triggered a call to scala.meta.inputs.Point$Offset.x$1$lzycompute which occupied 10% of precious CPU time, see screenshot:

Any idea what might be the bottleneck here? I use that method to format only a subset of lines instead of the whole file.

Looks like it's very slow, because it scans the entire file: https://github.com/xeno-by/scalameta/blob/master/scalameta/tokens/src/main/scala/scala/meta/inputs/Position.scala#L54. Any idea how we could improve here?

Allright, I think we could probably precache this info somehow while parsing. How important is this for you?

Not important at all for now at least. I only use it for formatting a subset of lines, and that feature is half-broken anyways. In the end, I might even implement the feature without using that method.

Should be fixed now in 0.1.0-SNAPSHOT. Could you verify please?

I can confirm the speed improvements are significant, using token.position.end.line on a hot path in scalafmt:
0.1.0-SNAPSHOT
[info] Benchmark           Mode  Cnt     Score    Error  Units
[info] GenJsCode.scalafmt  avgt   10  1520.984 ± 92.267  ms/op
0.1.0-RC1
[info] Benchmark           Mode  Cnt      Score     Error  Units
[info] GenJsCode.scalafmt  avgt   10  13500.775 ± 233.179  ms/op

That's more than 10x 👍 👍 👍 This will be vital for incremental formatting in scalafmt, thank!


2.26 例行上线

2.26 例行上线

Pull Request Test Coverage Report for Build 910

0 of 0   changed or added relevant lines in 0 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.005%) to 94.587%

Files with Coverage Reduction
New Missed Lines
%

src/util/event-action.js
2
97.91%

Totals

Change from base Build 893:
-0.005%

Covered Lines:
3702

Relevant Lines:
3835

💛  - Coveralls

Pull Request Test Coverage Report for Build 930

0 of 0   changed or added relevant lines in 0 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.005%) to 94.587%

Files with Coverage Reduction
New Missed Lines
%

src/util/event-action.js
2
97.91%

Totals

Change from base Build 893:
-0.005%

Covered Lines:
3702

Relevant Lines:
3835

💛  - Coveralls


KeyError: 'quantization_range_init_args'

This error occurs when i quantize FP32 pretrained model，is this a bug?
Traceback (most recent call last):
File "/home/mechmind/projects/nncf_pytorch/nncf/quantization/algo.py", line 961, in init_range
range_init_args = self.quantization_config.get_extra_struct(QuantizationRangeInitArgs)
File "/home/mechmind/projects/nncf_pytorch/nncf/config.py", line 56, in get_extra_struct
return self.__nncf_extra_structs[struct_cls.get_id()]
KeyError: 'quantization_range_init_args'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 381, in
main(sys.argv[1:])
File "main.py", line 81, in main
start_worker(main_worker, config)
File "/home/mechmind/projects/nncf_pytorch/examples/common/execution.py", line 99, in start_worker
main_worker(current_gpu=config.gpu_id, config=config)
File "main.py", line 152, in main_worker
compression_ctrl, net = create_model(config, resuming_model_state_dict)
File "main.py", line 239, in create_model
compression_ctrl, compressed_model = create_compressed_model(ssd_net, config.nncf_config, resuming_model_sd)
File "/home/mechmind/projects/nncf_pytorch/nncf/model_creation.py", line 126, in create_compressed_model
compression_ctrl = compressed_model.commit_compression_changes()
File "/home/mechmind/projects/nncf_pytorch/nncf/nncf_network.py", line 416, in commit_compression_changes
return self._builders[0].build_controller(self)
File "/home/mechmind/projects/nncf_pytorch/nncf/quantization/algo.py", line 200, in build_controller
self._hw_precision_constraints)
File "/home/mechmind/projects/nncf_pytorch/nncf/quantization/algo.py", line 816, in init
self.initialize_quantizer_params()
File "/home/mechmind/projects/nncf_pytorch/nncf/quantization/algo.py", line 893, in initialize_quantizer_params
self.init_range()
File "/home/mechmind/projects/nncf_pytorch/nncf/quantization/algo.py", line 964, in init_range
'Should run range initialization as specified via config,'
ValueError: Should run range initialization as specified via config,but the initializing data loader is not provided as an extra struct. Refer to NNCFConfig.register_extra_structs and the QuantizationRangeInitArgs class

@adamantboy please post exact command lines you used to launch the NNCF sample and the NNCF config file.

@adamantboy please post exact command lines you used to launch the NNCF sample and the NNCF config file.

I solved this problem.


fix script argument regression, add process.argv.lsc

In commit 03c6e6a, removing the code that mutated process.argv also removed a side effect that prevented all arguments to lsc from being handled as scripts to compile and run. This caused a regression when running lsc script-file.ls arg1 arg2 that would result in a crash when no arg1.ls file could be found.
The regression is fixed by reintroducing the side effect to remove all but the first positional argument from the array containing the scripts to compile and run, but only when lsc is running scripts—batch compilation commands involving multiple input files should remain unaffected.
This commit also adds a process.argv.lsc property, present only when a script is being interpreted by lsc, which is an array holding the name of the script being invoked along with any extra arguments not consumed by lsc. The intent here is to provide a way to get script arguments that's simpler and more reliable than picking through process.argv and skipping over elements like node, the lsc compiler itself, and any CLI options being provided to either.

Fixes #1013. This is both a bug fix and an experimental feature (the process.argv.lsc part), so I would like to hear some feedback on whether this mild alternative to the original process.argv mutation that I nuked back in #959 is reasonable—if not, it wouldn't be hard to remove that part and just make this the bug fix.

Crickets and thumbs up, so I'm issuing final call for comments on this. Will merge on or after Friday, March 23 if nobody has anything to say.

Passing process.argv.lsc to command line argument parsers (e.g. commander) results in an error since these in fact expect the node executable to be the first argument. So I have to do something like:
opts.parse (if process.argv.lsc then ['', ...process.argv.lsc] else process.argv)

@corwin-of-amber, that's an interesting point. Part of why I wanted to add the .lsc property instead of continuing to mutate process.argv itself was that I didn't think there was a good way to uniformly adhere to the various expectations that different libraries placed on process.argv; this feels like another one of those. But maybe there's little harm in adding a dummy entry to the start of process.argv.lsc just so that it can easily be used as a substitute in this particular use case. It strikes me as a hack, but maybe it's worth it?

Sounds to me like process.argv.lsc[0] should be lsc itself – as it is the interpreter running the current script (similar to bash, python, node etc.).


How to show the bubble always without animating

Is there any way to show the bubble always? and show it in the buttom instead of top?

Hi @shahidcodes
There isn't a way always to display the bubble. But you can patch the code, as it requires changing only a few lines of code to disable the animation and set the default opacity to 1 instead of 0
As for the bubble Y translation, you can set its translateY using bubbleTranslateY but you also need to patch the package and rotate the triangle to point upward.

I did exactly that


add "despiking" noise component

this requires access to rmsd

Following discussion with @htwangtw, we decided not to implement.
We'll only support scrubbing as a main strategy.


pagination

Update response object for pagination features
Update params object for pagination features
Add the ability to get all pages

coverage: 96.41% (-1.4%) from 97.802%
when pulling bf91a8729e42ce3bd42db71862c8d85c0f8f1c86 on pagination
into 806a8afd829fa94e9c769b5ebcb931aa90d7f062 on master.


Add CONTRIBUTING.md

This PR:

Brought over https://github.com/fastai/nbdev/blob/master/CONTRIBUTING.md
Grammar and spelling improvements
Will allow me to iterate on the other community part(s) of the docs with nice encouragement without getting bogged down in basic contributing Q&A

Question: It says to run nbdev_install_hooks which is different from the prep alias I got from @pydanny:
# nbdev alias to clean Jupyter notebooks before committing
alias prep='nbdev_export && nbdev_clean && nbdev_trust'

Should I update that section with instructions on creating prep?

@johnowhitaker thanks for the guidance on prep in Discord 🙏 updated!


loading hub.js does not consider base href

When building a Flutter web project with --base-href set to a different path, the following line does not consider it and fails as the file is supposed to be in the different path.
https://github.com/cunarist/rinf/blob/d8e012ca89eb53722f24c2f94489266bdc413746/flutter_ffi_plugin/lib/src/load_web.dart#L23
building a flutter project with flutter build web --release --base-href /new/ will set the base element to <base href="/new/"> in the index.html file.
I have not tested it because I am now a little busy, but perhaps making the /pkg/hub.js path relative pkg/hub.js will resolve the problem.

Hello, @ArinFaraj , thanks for leaving your opinion.
Yeah, it would be very nice to support subpaths on the web. As you said, it doesn't seem to be so hard to implement. I will look into this when I have time later. Meanwhile, any PR is welcome :)


Correction for raw affiliation Univ Lyon, ENS de Lyon, Univ Claude Bernard, CNRS UMR 5239, INSERM U1210, Laboratory of Biology and Modelling of the Cell, 46 allée d’Italie Site Jacques Monod, F-69007, Lyon, France

Correction needed for raw affiliation Univ Lyon, ENS de Lyon, Univ Claude Bernard, CNRS UMR 5239, INSERM U1210, Laboratory of Biology and Modelling of the Cell, 46 allée d’Italie Site Jacques Monod, F-69007, Lyon, France
raw_affiliation_name: Univ Lyon, ENS de Lyon, Univ Claude Bernard, CNRS UMR 5239, INSERM U1210, Laboratory of Biology and Modelling of the Cell, 46 allée d’Italie Site Jacques Monod, F-69007, Lyon, France
new_rors: 04zmssz18;029brtt94;02feahw73;02vjkv261;01bj4fd12
previous_rors: 04zmssz18;029brtt94;02feahw73;02vjkv261
works_examples: W2570629027
contact: 8aeb231c1218491a1338cf17e7c03c15:e999149b983287f8d1a5f579b722 @ ens-lyon.fr

This issue was accepted and ingested by the OpenAlex team on 2024-11-01. The new affiliations should be visible within the next 7 days.


Publish to Modrinth

Thanks again for reaching out to me and making me aware of this fork
Though as I am planning to publish my modpack to Modrinth once I figured Branding out I would like to ask you to publish it there as then I would not need to add the file to my overwrites
Thanks in advance and have a nice day

This mod was on modrinth but got taken down for some reason

Hmm I have a guess what happened
Modrinth staff might thought this is a hostile multiloader fork or something try appealing and talking to me Modrinth staff

Hmm I have a guess what happened
Modrinth staff might thought this is a hostile multiloader fork or something try appealing and talking to the Modrinth staff

yeah so basically I did this, but the original dev started trying to cease and desist me because his "assets were ARR," which they aren't, and we were able to prove this. But Modrinth started leaning on their "significant changes required to publish a fork unlike Curseforge, so I'm going to try republishing every version I make changes with.

why dont you make a pull request to the original repostitory?

why dont you make a pull request to the original repostitory?

Well man has finished PRs on the mod that've been sitting since December which is why I made the unofficial fork in the first place, but frankly at this point the entire treatment of the situation just annoys me especially when he has multiple mods he's just straight abandoned like extended flywheels

Upstream has actually been updated thanks for your work anyways @Alastors

Terrific


Improve sass configuration

Fix a deprecation warning; use HTML style for self-closing tags.

Thanks @noniq, I was already wondering how to get rid of them!


Incorrect display of uploaded tracks

If a track that is manually uploaded to Yandex is turned on, then the discord shows the track that was played before and playback time is wrong.
Repetition

Add "your" track to the queue with the next track
Switch from the current one to the next "own" one

In the previous version, everything seemed to be showing correctly.
Maybe the problem is related to the fact that the new version added links to the playing track? Maybe u can make some kind of stub for manually uploaded files.
Screenshots
Correct display:

Switching to a track uploaded manually:

Hello. Thanks for your report.
Are you sure that you are using the latest version of the modification? Looks like this issue may be related to the #1 issue.

Is "your" track published? Could you share a link to it?

Maybe the problem is related to the fact that the new version added links to the playing track? Maybe u can make some kind of stub for manually uploaded files.
Modification checks if link is exists. So this shouldn't be the problem

I make some changes. Could you try install this patch manually and check if this fixes issue?

download file app.zip
press Win + R
insert this %localappdata%/Programs/YandexMusic/resources
Unpack the zip archive in the folder with file replace.

I make some changes. Could you try install this patch manually and check if this fixes issue?

download file app.zip
press Win + R
insert this %localappdata%/Programs/YandexMusic/resources
Unpack the zip archive in the folder with file replace.

Yes, now is shown correctly.
gj

Is "your" track published? Could you share a link to it?

No, the tracks are not published, of course) The links lead to 404. But now its works correctly.

I make some changes. Could you try install this patch manually and check if this fixes issue?

download file app.zip
press Win + R
insert this %localappdata%/Programs/YandexMusic/resources
Unpack the zip archive in the folder with file replace.

Yes, now is shown correctly.
gj

Good. The thing I changed that cover image is optional now.
I'll create a release with the fix and close this issue as complete tomorrow.
Thanks for your bug report.

Fix released


Avoid throwing and catching InvalidGroupException over and over when consumer don't use any consumer group id

The zio-kafka consumer was trying to always get consumer group metada even if the consumer wasn't using any id.
This was fine because it was doing into a Try but this wasn't good for performance!

@strokyl Isn't your title+comment in this PR weird compared to what you're working on? 🤔

@strokyl Isn't your title+comment in this PR weird compared to what you're working on? thinking

I don't see what you are talking about? ;)
No seriously I thought I did a commit but didn't so I amend previous comment on cdk-master therefore the weird message and etc.. etc..
All of that is fixed now