series of errors in FreeBSD (FreeNAS) jail

I got a series of errors I can't figure out how to deal with in a FreeBSD/FreeNAS jail.  They have to do with

sysctrl command trying to disable the ipv6 thing that apparently doesn't exist.
There is no 'ip' command, and none also in the pkg repository.
Something with tun06?  I don't understand the output.  I think my openvpn normally uses tun0

I think the other errors are cascades from those.  Obviously I am less advanced than most git-hubbers.
Some things I hardcoded into run_setup.sh to avoid tedium while testing:
PIA_USER=''
PIA_PASS=''
export PIA_USER
export PIA_PASS
protocol="tcp"
encryption="standard"
PIA_AUTOCONNECT="openvpn_${protocol}_${encryption}"
export PIA_AUTOCONNECT
PIA_DNS="false"
export PIA_DNS
PIA_PF="true"
export PIA_PF
MAX_LATENCY=0.05
export MAX_LATENCY
run_setup.sh:
sysctl: unknown oid 'net.ipv6.conf.all.disable_ipv6'
sysctl: unknown oid 'net.ipv6.conf.default.disable_ipv6'
. . .
./connect_to_openvpn_with_token.sh: line 40: ip: command not found
The tun06 adapter already exists, that interface is required
for this configuration.
sysctl: unknown oid 'net.ipv6.conf.all.disable_ipv6'
./connect_to_openvpn_with_token.sh: line 69: [: -ne: unary operator expected
sysctl: unknown oid 'net.ipv6.conf.default.disable_ipv6'
./connect_to_openvpn_with_token.sh: line 70: [: -ne: unary operator expected
Trying to write /opt/piavpn-manual/pia.ovpn...
. . .
Confirming OpenVPN connection state...
cat: /opt/piavpn-manual/route_info: No such file or directory
The VPN connection was not established within 10 seconds.
./connect_to_openvpn_with_token.sh: line 194: kill: (89709) - No such process

This is not the first time I see reports of troubles with FreeBSD. The best thing I can do now is to add a note in the README specifying that FreeBSD will require some tweaks to make everything work.
As a long term solution, we will have to create a fork or a branch dedicated to FreeBSD.

Thanks.  Can you suggest what tweaks might work.  Like the sysctrl command and a substitute for ‘ip’?

On Nov 1, 2020, at 7:59 AM, goonix<EMAIL_ADDRESS>wrote:
This is not the first time I see reports of troubles with FreeBSD. The best thing I can do now is to add a note in the README specifying that FreeBSD will require some tweaks to make everything work.
As a long term solution, we will have to create a fork or a branch dedicated to FreeBSD.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/pia-foss/manual-connections/issues/30#issuecomment-720110377, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNZ5QPZSDDTB2XVCYPCOHLSNWAULANCNFSM4TGEA3KQ.

Can you suggest what tweaks might work

I am not a FreeBSD user, but I did see comments from other FreeBSD users that made it work: @dundunn @abraithwaite @mstargard
I hope you guys don't mind me tagging you. I know you all use FreeBSD and I think it would make sense to work together to create a fork that works out of the box on FreeBSD.

Thanks I did see some of their posts but nothing that would help me edit the script so far.
I did work out one thing related to the ip command and using the result in an if statement.  In connect_to_openvpn_with_token.sh, lines 40 and 41 can be deleted, and line 43 replaced with
if ifconfig tun06; then
It just uses the return value of the command instead of creating a couple of variables and comparing them.  I'm guessing the same could be done with the ip command.
Sorry I don't know how to fork and stuff; hopefully one of the brighter FreeBSD users can do that.

I use Wireguard so I didn't run into that issue but it's same for me. OpenVPN can't establish a connection.
The sysctl errors don't matter. You can delete that part from connect_to_openvpn_with_token.sh because you disable IPv6 via /etc/rc.conf on FreeBSD.

Thanks dundunn, that's good info to me about sysctl.
I made some further progress - FreeBSD can't make a tun06 connection.  I changed that to tun1 in
wherever-you-put-the-scripts/openvpn_config/standard.ovpn (or strong if you're using that one)
and that error doesn't occur anymore.
But at the end, I'm still getting
`The OpenVPN connect command was issued.
Confirming OpenVPN connection state...
cat: /opt/piavpn-manual/route_info: No such file or directory
The VPN connection was not established within 10 seconds.
./connect_to_openvpn_with_token.sh: line 193: kill: (45987) - No such process`
The last few lines of /opt/piavpn-manual/debug_info are
Sun Nov  1 14:41:55 2020 TUN/TAP device /dev/tun1 opened Sun Nov  1 14:41:55 2020 /sbin/ifconfig tun1 <IP_ADDRESS> <IP_ADDRESS> mtu 1500 netmask <IP_ADDRESS> up add net <IP_ADDRESS>: gateway <IP_ADDRESS> Sun Nov  1 14:41:55 2020 /opt/piavpn-manual/openvpn_up.sh tun1 1500 1560 <IP_ADDRESS> <IP_ADDRESS> init Sun Nov  1 14:41:55 2020 WARNING: Failed running command (--up/--down): could not execute external program Sun Nov  1 14:41:55 2020 Exiting due to fatal error

@glorious1 out of curiosity, why can't FreeBSD use tun06? (never used it myself)

I don’t know, it just gives an error.  Probably tun6 would work, but I know tun1 does.  The default tun that used to be created in the PIA-OpenVPN good old days, when all these scripts were not needed, was tun0.

On Nov 1, 2020, at 3:18 PM, iPherian<EMAIL_ADDRESS>wrote:
@glorious1 https://github.com/glorious1 out of curiosity, why can't FreeBSD use tun06? (never used it myself)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/pia-foss/manual-connections/issues/30#issuecomment-720167542, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNZ5QMZFTCBWYBCKILKC2TSNXUCVANCNFSM4TGEA3KQ.

Is there any way to manually get these pieces of information so I can run the script for port forwarding?
PF_GATEWAY - the IP of your gateway
PF_HOSTNAME - name of the host used for SSL/TLS certificate verification
PIA_TOKEN - the token you use to connect to the vpn services

@Mannekino

PF_GATEWAY

OpenVPN: https://github.com/pia-foss/manual-connections/blob/master/connect_to_openvpn_with_token.sh#L189
WireGuard: https://github.com/pia-foss/manual-connections/blob/master/connect_to_wireguard_with_token.sh#L159

PF_HOSTNAME

For PF you can use -k, or get the hostname of the server you connected to as it can be seen here: https://github.com/pia-foss/manual-connections/blob/master/get_region_and_token.sh#L118-L125

PIA_TOKEN

This is how you get a token: https://github.com/pia-foss/manual-connections/blob/master/get_region_and_token.sh#L149-L154
If you already connected to the VPN, the meta API can be used via <IP_ADDRESS> to get a token via https://<IP_ADDRESS>/authv3/generateToken

@Mannekino

PF_GATEWAY

OpenVPN: https://github.com/pia-foss/manual-connections/blob/master/connect_to_openvpn_with_token.sh#L189
WireGuard: https://github.com/pia-foss/manual-connections/blob/master/connect_to_wireguard_with_token.sh#L159

PF_HOSTNAME

For PF you can use -k, or get the hostname of the server you connected to as it can be seen here: https://github.com/pia-foss/manual-connections/blob/master/get_region_and_token.sh#L118-L125

PIA_TOKEN

This is how you get a token: https://github.com/pia-foss/manual-connections/blob/master/get_region_and_token.sh#L149-L154
If you already connected to the VPN, the meta API can be used via <IP_ADDRESS> to get a token via https://<IP_ADDRESS>/authv3/generateToken

Thank you, this seems a bit beyond my understanding unfortunately. I haven't switched over yet to the nextgen servers because I can't get the port forwarding to work with that. I'm still using an older script that sets port forwarding and automatically changes the incoming port on Transmission. That script no longer works when I switch to the nextgen servers.
I did have to add a setting to my OpenVPN configuration file after updating my FreeNAS Jail to OpenVPN 2.5. I had to add data-ciphers BF-CBC but now I'm getting warnings this might be insecure and vulnerable to SWEET32 attacks or something.

@Mannekino

It sounds like you need a standalone script that will enable port forwarding on FreeBSD when you are already connected via OpenVPN. This should get a separate ticket so we can properly track the progress.
OpenVPN 2.5.0 is not supported on all servers currently. We will deploy it to NextGen as soon as possible. please see #28

Someone on the TrueNAS has been extremely helpful so far. See:

https://www.truenas.com/community/threads/fn11-3-iocage-jails-plex-tautulli-sonarr-radarr-lidarr-jackett-transmission-organizr.55502/page-47#post-612984
https://www.truenas.com/community/threads/fn11-3-iocage-jails-plex-tautulli-sonarr-radarr-lidarr-jackett-transmission-organizr.55502/page-47#post-613086

I've managed to get a OpenVPN 2.5 connection established with the nextgen servers using the PIA configuration files. The person who helped me has made his own port forwarding script which worked for me, it can be found here:
https://github.com/dak180/TrueNAS-Scripts/blob/master/pia-port-foward.sh
Unfortunately it's not working quite as expected. I think when using the nextgen servers IPv6 is enabled somehow. I have very little understanding of this but I'm getting the following error messages in the log and after a couple minutes the port is no longer open on Transmission.
Errors after starting OpenVPN:
Nov  3 12:55:34 transmission2 openvpn[99294]: GDG6: problem writing to routing socket: No such process (errno=3)
Nov  3 12:55:34 transmission2 openvpn[99294]: TUN/TAP device /dev/tun0 opened
Nov  3 12:55:34 transmission2 openvpn[99294]: /sbin/ifconfig tun0 xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx mtu 1500 netmask <IP_ADDRESS> up
Nov  3 12:55:34 transmission2 openvpn[99294]: WARNING: OpenVPN was configured to add an IPv6 route. However, no IPv6 has been configured for tun0, therefore the route installation may fail or may not work as expected.
Nov  3 12:55:34 transmission2 openvpn[99294]: add_route_ipv6(2000::/3 -> :: metric -1) dev tun0

And these error keep repeating a lot:
Nov  3 12:26:18 transmission2 transmission-daemon[21795]: Couldn't connect socket 53 to 2001:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx, port xxxxx (errno 49 - Can't assign requested address) (/wrkdirs/usr/ports/net-p2p/transmission-daemon/work/transmission-3.00/libtransmission/net.c:340)
Nov  3 12:26:21 transmission2 transmission-daemon[21795]: Couldn't connect socket 50 to 2001:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx, port xxxxx (errno 49 - Can't assign requested address) (/wrkdirs/usr/ports/net-p2p/transmission-daemon/work/transmission-3.00/libtransmission/net.c:340)
Nov  3 12:26:22 transmission2 openvpn[96198]: AEAD Decrypt error: bad packet ID (may be a replay): [ #808615 ] -- see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings
Nov  3 12:26:22 transmission2 openvpn[96198]: AEAD Decrypt error: bad packet ID (may be a replay): [ #808616 ] -- see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings

Not sure how to proceed. I think I would like to enable IPv6 as I am not using it but I tried to find ways how to disable this in the OpenVPN configuration file but haven't been able to find anything.

I've managed to get a OpenVPN 2.5 connection established with the nextgen servers using the PIA configuration files.

At this point, 25% of the fleet has support for OpenVPN 2.5.0, so you probably got lucky and hit a server that already got upgraded.

The person who helped me has made his own port forwarding script which worked for me, it can be found here:
https://github.com/dak180/TrueNAS-Scripts/blob/master/pia-port-foward.sh

This scripts does what it should do, however it could use some refactoring. :smile:

Unfortunately it's not working quite as expected. I think when using the nextgen servers IPv6 is enabled somehow.

Please try to shut IPv6 down on OS level.

At this point, 25% of the fleet has support for OpenVPN 2.5.0, so you probably got lucky and hit a server that already got upgraded.

I'm using the Berlin location that I've been using for a while now.

Please try to shut IPv6 down on OS level.

I'm trying to figure out how to do this, preferably on the Jail level, but maybe it has to be for my entire FreeNAS server.

I'm using the Berlin location that I've been using for a while now.

I checked now. Half the servers from Berlin support 2.5.0.

I'm trying to figure out how to do this, preferably on the Jail level, but maybe it has to be for my entire FreeNAS server.
You can disable it via rc.conf or you rebuild the kernel without the IPv6 feature. The latter might have other side effects.
https://forums.freebsd.org/threads/completely-disable-ipv6-in-freebsd-10.50569/

You can disable it via rc.conf or you rebuild the kernel without the IPv6 feature. The latter might have other side effects.
https://forums.freebsd.org/threads/completely-disable-ipv6-in-freebsd-10.50569/
In /etc/rc.conf I added WITHOUT_IPV6="YES" and I edited ipv6_activate_all_interfaces="YES" to say "NO".

I restarted the jail, and netstat -nr still shows a bunch of ipv6 stuff:
Internet6:
Destination                       Gateway                       Flags     Netif Expire
::/96                             ::1                           UGRS        lo0
::1                               link#1                        UH          lo0
::ffff:<IP_ADDRESS>/96                 ::1                           UGRS        lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%lo0/64                     link#1                        U           lo0
fe80::1%lo0                       link#1                        UHS         lo0
ff02::/16                         ::1                           UGRS        lo0
ifconfig still shows one thing that appears to be ipv6:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet <IP_ADDRESS> netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
Does this mean ipv6 is still enabled somehow?

@glorious1 I haven't been able to figure it out either. I've been trying to disable IPv6 inside my FreeNAS Transmission Jail for 3 hours now trying everything I could find. There seems to be a couple of configuration options also on the Jail level, namely:

"defaultrouter6": "auto" (tried setting this to none)
"ip6": "new", (tried setting this to disable)

I'm giving up for the time being. Maybe I should try and get IPv6 to work instead but I have no idea how to go about that. I don't even know if I have IPv6 ability from my ISP.

I didn't know the building process can be that exhausting but I think that would be the only way to disable IPv6 entirely. You would have to build FreeBSD first with WITHOUT_INET6=yes in the src.conf and then build FreeNAS on top of it. But I'm not sure if that's even possible without further tweaks.
Those addresses are loopback addresses so they shouldn't be available anywhere outside the FreeNAS system. I'm not sure if that's entirely true but the explanation of the user kpa, on why you shouldn't worry too much about those addresses still being active, strengthens my assumption that disabling IPv6 by rc.conf should be sufficient to advert leaks.
But I'm not an expert and I didn't understand every part of his post. I also have to learn more about networking and especially IPv6 to understand on how to test if a device leaks private addresses, so it might be better if someone with more knowledge can give a better explanation on that particular issue.
But I also think a GIthub repository for PIA users is not the place to discuss this kind of issue. The iXsystems forums might be a better place for that.

I managed to fix all the issues I was having with the update to OpenVPN 2.5. Hopefully the solutions are solid. I will check the logs tomorrow. So far, so good. I'm running FreeNAS-11.3-U5 and my Jails are at 11.4-RELEASE.
Here is what I did to solve everything:
I used the PIA 4th generation strong encryption configuration file
https://www.privateinternetaccess.com/helpdesk/kb/articles/where-can-i-find-your-ovpn-files
In particular I'm using the Berlin server to connect to.
For port forwarding I used the following script
https://github.com/dak180/TrueNAS-Scripts/blob/master/pia-port-foward.sh
I made some minor changes because I'm using authentication for my Transmission instance. So I added a transUser and transPass variable at the top after the other variables:
transUser=[username]
transPass=[password]

And everywhere in the script where transmission-remote is invoked I added the following right after transmission-remote :
--auth "${transUser}":"${transPass}"

To get rid of the IPv6 errors I changed the OpenVPN configuration file
Thanks to another user on the TrueNAS forums I solved the IPv6 problems: https://www.truenas.com/community/threads/pia-and-openvpn-v2-5.88459/#post-613168
Right before the line that starts with <crl-verify> I added the following two lines:
pull-filter ignore "ifconfig-ipv6"
pull-filter ignore "route-ipv6 "

To get rid of a cipher warning I changed this
I still got some warning about the ciphers. The solution was in the warning itself. Right after the cipher line in the configuration file I added this line:
data-ciphers aes-256-cbc

To make sure the port stays forwarded I added a cronjob to FreeNAS
Using the GUI of FreeNAS I added a cronjob that runs the above mentioned script every 10 minutes to refresh the port forwarding. I noticed the port closed after 15 minutes in Transmission.
iocage exec [jailname] [path_to_script]/pia-port-foward.sh

If I did anything wrong, or if I can improve on anything please let me know.

Wow, congratulations @Mannekino !  Your post is a lot to process.  For starters, is the ovpn configuration file for UDP or TCP? Or maybe it doesn't matter.  I'm also curious how these configuration files differ from the ones included with the pia-foss/manual-connection scripts.
It looks like you took a big departure from these manual-connection scripts.  I was trying to use them while making necessary modifications, but my favorite approach is doing what works!

@Mannekino Here is my personal point of view on what you should do next:

create a repo for enabling PF on FreeNAS
make everything you discovered work as part of one script that feels like a magical automation
refactor the script till it is easy to ready for everybody
enjoy the stars you get on github

I really hope you will have time to do that. We are also looking internally at providing improved support for FreeBSD. We would like to see FreeBSD get more market share and having bad automation for FreeBSD is not setting a good example. That being said, time is also limited so I don't know when we will get to this. It will definitely happen in the future, but I don't know when.

Thanks for this @Mannekino. Took a couple extra tweaks, but this works for me as well.

@g00nix I'm not very good at writing scripts. Also, in the end it took quite some time but the fixes itself aren't that complicated. But I really have very little understanding how I fixed it. I just tried stuff other people suggested. The port forwarding script is not mine either.

@g00nix , I'm working on a fork at glorious1/manual-connections. I wanted to stick with your scripts as much as I could.  It's still a bit messy, but I finally got it working!  The last problem was in the config file I was trying to specify a tun number as it originally did (tun06 to tun 1) but I saw in the config files that Mannekino linked to, they just say 'tun', and that worked.  Also needed to install base64 (not built in).  Had to abandon the date-time conversion for the expiration date - it doesn't work in FreeBSD date and I'm not sure what it's even doing.
I haven't yet tried to connect transmission to it, but everything reports success!  Thanks to @Mannekino also for the tip about those pull-filter things in the config file.
FYI, I commented out most everything in run_setup.sh and just hardwired everything (except user/pass) like a setup config file.  So much easier!

@glorious1 thanks for this! I was just starting to redeploy for NextGen on my FreeNAS box and came upon this issue by chance :o) One question - FreeBSD uses tcsh by default (or at least mine does?) - did you alter your Transmission jail to use bash instead to be able to run these scripts?

pretty simple i just installed bash in my jail

Ok cool, thanks for the confirmation.

@dr-diem you can just do pkg install bash curl jq base64 to get everything needed for the scripts (assuming you already have openvpn and transmission).
I recently added a command to port_forwarding.sh to send the port number to transmission so it gets synced up.  But I'm just realizing that should probably go inside the 15 minute port-refresh loop so it gets resent in case transmission gets rebooted.
Actually I'm thinking about separating out that 15-minute loop as a separate script that gets called after the rest of port_forwarding.sh runs, but thereafter by a cron job every 15 minutes so the script doesn't have to keep running forever. @g00nix do you think that would be OK?

@glorious1 I agree with your approach, on the basis that I prefer to run OpenVPN as service (for all the usual reasons) and so I want to set up the port only once connected. I played with using the 'up' script but didn't get much success (this might be a Gentoo issue to be fair) so I am instead working on a separate script that will work post-connection, that obtains a token and uses it to request then set up a port, with the intent to configure Transmission thereafter. Testing on Gentoo, but will migrate it to FreeBSD once it's working.
Side note - I cannot raise issues at your repo - did you disable the feature or is it just me?

@dr-diem Looks like Issues were turned off by default so I just turned that on.  I went ahead and separated out the 15-minute stuff in refresh_pia_port.sh and that's all working now, at least for me.  I don't quite follow what you mean by running OpenVPN as a service, and setting up the port after being connected.  For me OpenVPN will be running all the time, and whether the port gets assigned before or after starting OpenVPN doesn't really matter.

Nice! Your question concerning instantiating OpenVPN as a service has served to focus my mind, and made me realise that my end goal differs somewhat from that of these scripts. Simply put, I want to use an OS-integrated method - services (BSD init.d scripts or Linux rc.d scripts) - to start and stop the connection, then custom scripting only to set up the port forwarding and configure Transmission.
To set up a port we need an auth token. The set of scripts in this repo obtain the authentication token before connecting the VPN, whereas in my case the VPN is already up by the time I want to configure the port. @g00nix very helpfully mentioned earlier in this thread that the meta-services server is available at <IP_ADDRESS> once connected.
I'm working on a set of scripts that leverage what these (plus your FreeBSD insights!) have taught me. When they're in a fit state I'll see whether they deserve pull requests to these repos or have diverged so much as to be published separately.

Maybe you'll be interested in this iPherian fork that talks about making it a service.  Frankly that stuff is beyond me and I don't know how those scripts work.  But maybe you could take that and make the BSD modifications if needed.

Thanks for the pointer. As it goes iPherian is targeting systemd, which is the 'modern Linux' way of running services, and wholly incompatible with BSD. Mine should be a nice complement, in that it'll target BSD and the prior Linux approach, since they were broadly similar.

So, after a long process of developing the algorithm and rearranging the elements of the PIA scripts to make a single cron-callable script that can handle re-authentication to obtain a token, payload and signature when these items expire, then set up the port and configure Transmission, I realised that dak180's script discovered by @Mannekino does everything necessary, including restarting the VPN if it has disconnected. Even when the port expires in two months it would be detected and a new port configured. Even better, the only pre-configured variables it needs are the PIA username and password stored in a root-readable file, and the username that Transmission starts up with.
For a FreeBSD server implementation I find dak180's script to be more appropriate and robust. One can use run_setup.sh one time to generate an ovpn file, configure Openvpn to use that file to connect, then configure the script as a cron every 15 minutes as @Mannekino wrote, and PIA is configured indefinitely.

For a FreeBSD server implementation I find dak180's script to be more appropriate and robust. One can use run_setup.sh one time to generate an ovpn file, configure Openvpn to use that file to connect, then configure the script as a cron every 15 minutes as @Mannekino wrote, and PIA is configured indefinitely.

@dr-diem thanks; the general goal of my script is to not care about the Openvpn connection as long as it is up and to run off of a cron script, though you could easily run it as often as every 2 minutes and it should still do the right thing.

I added a section to the README with the repos you guys created: https://github.com/pia-foss/manual-connections#3rd-party-repositories

This issue has been quiet for a while now. Are you guys happy with the 3rd Party repos? Do you think we can close this issue at this point?

That’s fine with me, thank you.

On Dec 2, 2020, at 4:21 PM, goonix<EMAIL_ADDRESS>wrote:
This issue has been quiet for a while now. Are you guys happy with the 3rd Party repos? Do you think we can close this issue at this point?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/pia-foss/manual-connections/issues/30#issuecomment-737576102, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNZ5QJWBDJXBGX36FS5CRDSS3KXZANCNFSM4TGEA3KQ.


no "install.zsh" file

source zsh-snap/install.zsh
fatal: destination path 'zsh-snap' already exists and is not an empty directory.
source: no such file or directory: zsh-snap/install.zsh

any way to fix this?

Don't delete the bug report template when filing a bug. It says so explicitly.


Nan for pricing over 999

Hello,
The pricing for over 999 is Nan, please note I DOWNLOADED (1.1.4) the Latest Update and I looked at the release log it said its been fixed in this version: v1.1.0-beta.3 but it hasn't been fixed!

I can confirm this bug. Especially in the cart...


⚠ Bofrost.de has degraded performance

In 71aec6e, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1140 ms

Resolved: Bofrost.de performance has improved in b00e65e after 14 minutes.


keepassxc doesn't persist properly

I am not sure what would cause this behaviour, but if you upgrade from KeepassXC 2.4.0 to 2.4.1 with scoop, your persisted ini keepassxc.ini will be renamed to keepassxc.ini.original (but it will remain as keepassxc.ini in the persist/keepassxc folder), and a new keepassxc.ini will be installed.
The manifest is clearly asking to persist the ini, so I'm not sure what's going on here (is it KeepassXC itself managing the settings?)

This is correct behaviour.
Persist flow on installing update is following:

Everything is installed / extracted
There is check if something like $env:SCOOP\persist\keepassXC\keepassxc.ini exists

If yes

Check if same file exists inside installation directory

If yes; Move that file to filename.original To not lose default configuration shipped with app
Move that file from persist directory into installation directory
Link again to persist directory.

Is there some problem with this configuration file after update?

Yes, I lost all settings in the app after upgrade (on the two machines I tested so far).
Moreover, as I look in the actual ini in the persist/keepassxc folder, I notice none of my settings pre-update are there (it is a vanilla untouched copy that ships with keepass).

I suspect that Keepass do not edit the file, but they remove and create new one on change. There is need to investigate.

I suspect that Keepass do not edit the file, but they remove and create new one on change. There is need to investigate.

https://github.com/keepassxreboot/keepassxc/issues/1724
Both safe saving and unsafe saving use file transaction.

That

I suspect that Keepass do not edit the file, but they remove and create new one on change. There is need to investigate.

keepassxreboot/keepassxc#1724
Both safe saving and unsafe saving use file transaction.

That is related to the actual password database. I'm speaking about just the configuration settings of the app, stored in keepassxc.ini.

That

I suspect that Keepass do not edit the file, but they remove and create new one on change. There is need to investigate.

keepassxreboot/keepassxc#1724
Both safe saving and unsafe saving use file transaction.

That is related to the actual password database. I'm speaking about just the configuration settings of the app, stored in keepassxc.ini.

😂
The configuration settings of KeePassXC use QSetting class in which atomic saving is the default behavior.
Also, KeePassXC doesn't disable it by setAtomicSyncRequired.

So, upstream bug then? :) Sorry, not that familiar with QT stuff (and workarounds to get file writes like we need them).

This still appears to be a problem 6 months later, is Scoop Pull 3212 still in progress?
In the meantime, I'm going to submit a workaround that follows the pattern of #2756.


DEV - this new "Tasks" config style is terrible.

 Just sayin.
Old Config style, 1 Variable per line, Y or N to activate/deactivate, all options listed. Much simpler.

For more context as to why we are making this change, and the things it provides down the road, please check out the proposal for this structure: https://github.com/PokemonGoF/PokemonGo-Bot/issues/142

I like this new style. Avoid conflicts. You can easily change the order. The only downside is it's more complex.


scalr get-plan-log returns invalid character error

When I attempt to fetch the plan log for a plan, I get an error.
❯ scalr get-plan-log -plan plan-[redacted]
invalid character '\x02' looking for beginning of value

I am able to perform other operations, such as scalr get-plan.

Sorry for late reply! Please try the latest version 0.15.5 and see if that one solves your issue. Thanks!

Sorry for late reply! Please try the latest version 0.15.5 and see if that one solves your issue. Thanks!

Thank you, @buzzy! I updated to 0.15.5 and can confirm that I now see the plan logs as I expect 🙌🏼  I appreciate it!


qpaeq: init at unknown

Motivation for this change
Fixing the binary
See https://github.com/NixOS/nixpkgs/issues/8384
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Notify maintainers
cc @lovek323

https://github.com/NixOS/nixpkgs/issues/8384#issuecomment-568592308

Maybe we should suggest upstream to move qpaeq to a separate project/repo. Also https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/260

Dunno. For now it seems like fixing the binary is a step in the right direction.
Adding the desktop file, how can that be done properly?

Added desktop, removed unnecessary patch. Let's get this merged ^^

I've pushed this against staging because it's doing a mass rebuild, now it seems to fail

It seems the build failures are all releated to the staging branch itself
Fixed the collision, don't see anything more to do.

@GrahamcOfBorg eval


Changed codepoints file save to synchronous call

There is/was a strange file save occurrence where the defined
codepoints.json file was being written into a blank file.  Changing the
save to a sync file write seems to fix the symptom, so until I better
understand the problem this seems to best course of action.
This is in reference to: https://github.com/sapegin/grunt-webfont/issues/283
and the change was tested using @ajb's test repository https://github.com/ajb/grunt-webfont-283
The suggested change to the saveCodepointsToFile function:
		/**
		 * Saves the codespoints to the set file
		 */
		function saveCodepointsToFile(){
			if (!o.codepointsFile) return;
			var codepointsToString = JSON.stringify(o.codepoints);
			try {
				fs.writeFileSync(o.codepointsFile, codepointsToString);
				logger.verbose('Codepoints saved to file "' + o.codepointsFile + '".');
			} catch (err) {
				logger.error(err.message);
			}
		}

Thank you very much!


[v1.5.3] Crashing again once connection to HA is lost (e. g. after restore from hibernate)

The previous error of the application crashing once the connection to HA has been interrupted and should be fixed according to https://community.home-assistant.io/t/home-assistant-desktop-macos-windows-and-linux-quick-and-easy-access-to-ha/196191/87 is now back with v1.5.3.
Click on "Reconnect" (e. g. after restoring the OS from hibernation) --> the app crashes and closes/exits.
Windows 10 x64 22H2

How to finally get rid of this annoyance?

Error after connection loss:
[2023-02-20 22:23:05.601] [error] Response error: [object Object]
Error after crash from pressing restart:
[2023-02-20 22:27:43.792] [error] Unhandled Exception TypeError: Object has been destroyed     at Timeout._onTimeout (C:\Users\User\AppData\Local\Programs\homeassistant-desktop\resources\app.asar\app.js:645:37)     at listOnTimeout (node:internal/timers:559:17)     at process.processTimers (node:internal/timers:502:7)

I see the same on GNU/Linux.  When connection is lost, and I click the reconnect button, the app crashes, and I get:
11:41:29.853 › Unhandled Exception UnhandledRejection Error: ERR_FAILED (-2) loading 'file:///tmp/.mount_Home-AE0J6YN/resources/app.asar/web/index.html'
at rejectAndCleanup (node:electron/js2c/browser_init:165:7506)
at EventEmitter.stopLoadingListener (node:electron/js2c/browser_init:165:7881)
at EventEmitter.emit (node:events:527:28)
(node:2287891) UnhandledPromiseRejectionWarning: UnhandledRejection Error: ERR_FAILED (-2) loading 'file:///tmp/.mount_Home-AE0J6YN/resources/app.asar/web/index.html'
at rejectAndCleanup (node:electron/js2c/browser_init:165:7506)
at EventEmitter.stopLoadingListener (node:electron/js2c/browser_init:165:7881)
at EventEmitter.emit (node:events:527:28)
(Use homeassistant-desktop --trace-warnings ... to show where the warning was created)
(node:2287891) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

BTW, I'm surprised the reconnection isn't automatic.  I need to manually reconnect (well, restart due to the crash) whenever I suspend/resume my laptop.  Other apps automatically reconnect when they detect that network is up again, this one should be able to too, right?

Same for me on Windows 11 after hibernate. Reconnect just exits the program, restart throws error then restarts as normal,

Here is the text from the error in searchable format.
A JavaScript error occurred in the browser process
TypeError: Object has been destroyed
at Timeout._onTimeout (C:\Users\Cole\AppData\Local\Programs\homeassistant-desktop\resources\app.asar\app.js:645:37)
at listOnTimeout (node:internal/timers:559:17)
at process.processTimers (node:internal/timers:502:7)

I have the same error when i resume Windows (10 & 11) after sleep or hibernate, if you click reconnect it crashes

I keep running into this error on ubuntu 22.04.2 Plan was to run this on a old MS surface mounted to the wall. Would be awesome if the app didn't keep crashing so often.  App working very well thank you for it, but i need every time restart when wake up from hibernate or sleep.


PDF margins?

I'm trying to work out why the position of the text doesn't match the position on paper and that given in GIT, it seems there are margins and if yes, what are they and how to I get access to read them?
This is the height and width returned by pdf.js for an A4 document:
    width: 37.188, height: 52.625

I am internally scaling this to mm, based on an A4 being 210mm wide and 297 mm high
My scaling:
    scale factor X = 210 / 37.188 = 5.646982897708938
    scale factor Y = 297 / 52.625 = 5.643705463182898

I then apply this to each x and y coordinate in each text object:
  text x = text x * scale factor X
  text y = text y * scale factor Y

Whilst the calculated results look correct, there is a difference between what I see in GIMP using mm and what I'm calculating.  It looks like there is a fixed offset.

@SPlatten could you post a link for an example pdf document and explain what you are comparing? What program are you using to print the pdf? Screenshots from pdf.js and Gimp could help show the offset or difference also.
If it is not a problem with pdf.js (You might compare with Acrobat Reader), then the "page boundaries" section in the pdf spec may explain what you are seeing in terms of printed region versus on-screen display: https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf#page=962

Here is a sample PDF I've been using to test my code:
sample.pdf
Screen shot from gimp, showing highlighted top right coordinates of text item:

The coordinates as returned from the script for this item are:
{ topleft: { x: 25.420588235294122, y: 29.463669833729206 }
, botright: { x: 44.77588235294118, y: 33.69644893111638 }
, text: 'LINE START' },

Closing for now, since without a runnable example it's unfortunately somewhat difficult to assist here; please note https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (emphasis mine):

If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us in the Matrix room -- keep in mind that just code snippets won't help us troubleshoot the problem.


Markdown formatting error in webaudioapi/readme.md

Github markdown parser wants an empty newline around code blocks, apparently

@hraban Thanks mate!


bugfix: fixed inability to build Executor when using mariadb driver

[ ] I have registered the PR changes.

Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?

fixes #3697
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

Merging #4326 (f93d2ca) into develop (2c6e647) will decrease coverage by 0.08%.
The diff coverage is 33.33%.

:exclamation: Current head f93d2ca differs from pull request most recent head c98f6e6. Consider uploading reports for the commit c98f6e6 to get more accurate results

@@              Coverage Diff              @@
##             develop    #4326      +/-   ##
=============================================
- Coverage      48.52%   48.44%   -0.09%
- Complexity      3798     3800       +2
=============================================
  Files            725      725
  Lines          24306    24281      -25
  Branches        2984     2932      -52
=============================================
- Hits           11795    11763      -32
+ Misses         11261    11251      -10
- Partials        1250     1267      +17

Impacted Files
Coverage Δ

...a/io/seata/rm/datasource/exec/ExecuteTemplate.java
5.55% <0.00%> (-0.33%)
:arrow_down:

...n/java/io/seata/rm/datasource/DataSourceProxy.java
47.05% <100.00%> (+1.60%)
:arrow_up:

...obuf/convertor/BranchRegisterRequestConvertor.java
90.47% <0.00%> (-9.53%)
:arrow_down:

...otobuf/convertor/BranchReportRequestConvertor.java
90.90% <0.00%> (-9.10%)
:arrow_down:

...obuf/convertor/BranchRollbackRequestConvertor.java
92.00% <0.00%> (-8.00%)
:arrow_down:

...otobuf/convertor/GlobalBeginResponseConvertor.java
92.59% <0.00%> (-7.41%)
:arrow_down:

...otobuf/convertor/GlobalCommitRequestConvertor.java
93.75% <0.00%> (-6.25%)
:arrow_down:

...otobuf/convertor/GlobalStatusRequestConvertor.java
93.75% <0.00%> (-6.25%)
:arrow_down:

...obuf/convertor/GlobalRollbackRequestConvertor.java
93.75% <0.00%> (-6.25%)
:arrow_down:

...protobuf/convertor/RegisterTMRequestConvertor.java
94.73% <0.00%> (-5.27%)
:arrow_down:

... and 33 more


Upgrade to Gatsby 5

Hello there,
Vitaliy (Senior Engineering Manager) from Gatsby here. Thank you for creating this great starter! Since your starter is listed on our official library (https://www.gatsbyjs.com/starters/), it is important to keep it on the latest major release of Gatsby. Doing so ensures your starter will continue to be listed in the library.
If you haven’t seen the news already, we have released a beta version of Gatsby 5 and are on track to release the GA version in November. It would be great if you can upgrade this starter from v4 to v5 by then. Here are the docs on how to migrate: https://v5.gatsbyjs.com/docs/reference/release-notes/migrating-from-v4-to-v5/
Let us know if you have any questions. Thanks again!

Hey! Thanks for pointing that out. I will take a look at upgrade the starter 👍

@vitaliy-at-gatsby Done -> https://github.com/konstantinmuenster/gatsby-starter-portfolio-minimal-theme/commit/d395c01984f39ce3a22402b87c1bd77731b43e2a 😊


Many old draft versions missing from Datatracker

Describe the issue
This issue appears to be related to #4898.
Several versions of older drafts do not appear in the Data Tracker UI. While they appear in the timeline diagram, they do not appear in the list of versions right above it, and clicking on the timeline to open the missing versions redirects to the latest publication instead.
This is a problem because some old drafts are still widely in use, such as SFTP version 3.
Examples:

https://datatracker.ietf.org/doc/draft-ietf-secsh-filexfer/
https://datatracker.ietf.org/doc/rfc3696/

Note that not all Internet Drafts are affected, such as https://datatracker.ietf.org/doc/rfc8989/
Workaround: Access the draft through https://www.ietf.org/archive/id/[name]-[version].txt

Code of Conduct

[X] I agree to follow the IETF's Code of Conduct

This is a long standing issue rooted in there being a lack of information needed to create DocHistory objects for the revisions in question without making up information that the DocHistory should hold out of whole cloth. Specifically, the content of any of the metadata to be shown about the document reflecting the state it was in at the time (such as who the shepherd was, if there was one, and whether there was WG state and what it was, etc.)
There are many older documents affected by this, and any repair would require significant manual effort, and making up history that was never really true is almost unavoidable.

Can we detect these cases and add an alert to the page?

Yes, but it will cost time to do the computation - is it worth the extra lag?
(The computation is to check that there's a DocHistory record matching each NewRevisionDocEvent. There's a loop already that may be doing most of it where the revisions variable is assembled.)

This particular draft is annoying enough people (curious to know why now?) that an effort, preferably coordinated by the right AD,  to synthesize appropriate DocHistory records may be worth it.

Per discussion at the tools team meeting, we will be continuing to investigate what we can do here without making up history. It may be that the fix will come with a general rework of the main document view at /doc/draft-.... to provide access to versions where the raw text exists but make it clear that there is no historical metadata available for that version.

I was unable to get back to https://github.com/ietf-tools/datatracker/issues/4936 in time, but i want to make sure its clear that the links in that issue and mentioned here (https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-02) used to work not too long ago. We have a handful of docs that reference this link because it is the most widely supported SFTP spec and they are all broken. I created the bug issue when we first noticed, it is unclear how long ago this was changed, but it is not decades or even years, a more recent change broke this.

If its copy of draft-ietf-secsh-filexfer-02 has been deleted then perhaps it could at least stop returning draft-ietf-secsh-filexfer-13 instead, when asked for -02 (as described in #5518). The current behavior is actively misleading.

This particular draft is annoying enough people (curious to know why now?)

Why now: because it only just broke. It was working fine in October 2022.

https://web.archive.org/web/20221007230001/https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-02
https://web.archive.org/web/20230104084838/https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-02

Yes, and there are (as touched lightly on above) several courses of action we can take, all of which have trade-offs.
The main doc page behavior is not different as far as I can reconstruct (or find in the wayback machine). If I'm right, here this became problematic is in the re-implementation of the /doc/html views. If we focused there and allowed those views to point to versions of drafts we have, but don't have the metadata for, would the majority of the irritation the change is causing be alleviated?

I couldn't say what the biggest source of trouble for anyone else is. Still, I note that the SFTP draft links in Wikipedia are currently broken too, so I think the #5518 variant of the issue is practical issue for more than just me.
(It's a shame that SFTP is specified only in expired drafts; but we're not going to solve that here.)

I mined the code deeply, and the main document page has never returned anything but a redirect to version 13 for version 12 of this document. What changed is the behavior of the htmlized view at /doc/html/ behavior for documents missing DocHistory. I think we should work towards a fix to that, cleaning the places in the new htmlization views that care about the metadata of the version being asked for.

I'm not entirely clear what's been changed - https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-02 still returns the -13 version for instance.

A PR has been merged to main, but not yet released to production. I expect that release to happen towards the end of this week.

That looks right now!


Multilanguage requests

@jagreenwood I hope your in a mood for another pull request, I promise this is the last one I have pending.
Here I made some changes to request the weather information in another language than the primary one configured. With that I can use the library in a backend where clients with multiple language configurations connect to.
I hope you'll find that useful.

Thank you for the contribution!


fix pepperbot thinking embeds are always delicious

Problem:

sandwich() inspects the first 7 characters (0-6) of the input
but it only drops the first 6 if it detects an embed (hash[6] = 0 or 1)
this results in every substring passed in the recursive call starting with 0 or 1
as a result, if a sandwich is embedded in another sandwich, pepperbot always
things the outer sandwich is delicious

Solution:

drop the first 7 characters so there is no overlap between the characters inspected
in the original and recursive calls

I mean, maybe embeds are always delicious?


2-of-2 Multisig Timelock decaying to single

Upon my first discovery of the photon-sdk, the keyserver architecture reminded me a bit of the way Blockstream Green's standard account functions.
One major difference between the two is Blockstream's CSV timelock, where utxos received in the wallet decay to a single sig after a year, permitting recovery of funds in the event of loss of user access to their wallet/device. I understand that this would mean that the keyserver would need to play a much more active role during wallet usage, since it would then be required to sign any transactions made inside the timelock period, but I am curious to know whether this is something that has been considered for Photon and hear more thoughts from others on whether this might be a beneficial additional possible wallet setup as part of this project.

I agree this is a good feature and could fit the scope of Photon. The only question in my mind is the priority of this vs. other initiatives, such as:

Providing native APIs for Kotlin/Android and Swift/iPhone
Security audit/more eyeballs on the code to gain confidence in using it in production at scale
Adding support for multi-sig wallet backup data (pubkeys)
Adding support for LN wallet backup data


[Words/What I feel] In exercises 8, in the "repeat" mode, when you click on the word "недоверчивость", the matrix of words is shifted.

Precondition:
Log in with an existing user. Open: Groups / Speech Exercises / Words / What I feel
Exercise 8: http://<IP_ADDRESS>/groups/2/series/1/subgroup/20/exercise/609/task/609
Steps:

Select exercise 8.
Press "play".
Select the "repeat" mode.
Click on the word "недоверчивость".
Actual result: The word matrix is shifted.
Expected Result: The word matrix is not shifted.


Handle missing helm information better when installing/upgrading apps

This relates to https://github.com/rancher/dashboard/issues/8841, however does not resolve it (they need to successfully get to the page... rather than see error messages or a blank page)

When a user visits the install chart page (shell/pages/c/_cluster/apps/charts/install.vue) there's some initialisation that happens before a value is created. If an error occurs during that initialisation there is no value and we show a blank page.
https://github.com/rancher/dashboard/pull/9440 brings in some debug logging to ensure we know why / where that initialisation fails, however still results in a blank page.
We need to understand which errors are fatal to the install flow and should result in an appropriate message to the user.... and which are ok to swallow because the rest of the flow can handle it. With 9440 all errors are swallowed.
Some cases to consider

The user specifies a junk version - this currently works, it looks like we default to the latest available version
The user upgrades a chart it's current version, however the current version is invalid given changes to the cluster (chart has a max rancher or kube version which is now invalid. This results in a blank page (pre 9440)
The user specifies junk as repo-type, repo or chart params results in the wizard loading but with no chart context. what does this do if we proceed to install it? should we show an error here?

The error bar which is shown in one case during the initialisation process... and normally on failed install... is hidden. See https://github.com/rancher/dashboard/issues/9454

We should also, as part of this if appropriate and if not capture in a new issue, look at making async requests all together up front instead of sequentially through the fetch function.

We should probably wait until https://github.com/rancher/dashboard/issues/8841 is understood more, as that will affect what happens here


Verify our tables have correct formatting - for consistency

For those of us who are more AR than others :-)
Signed-off-by: Doug Davis<EMAIL_ADDRESS>

LGTM

Agree with @pmorie. If that is going to be part of this PR I'll wait to LG it.

that is part of the PR already - unless I'm not following

Wow, I did somehow miss the checker.

LGTM

could use another round of reviews.

lgtm

LGTM

@angarg12 your re-l.g.t.m is needed

LGTM


Update SA1608 to handle included documentation

The issue described in #1603 applies to SA1608 as well.

Grabbing this.


Error while trying to use composite

I'm trying to use composite like this:
const sharpFile = this.electronService.sharp(null, options);

const pagePhotos = page.allPhotos.map(photo => {
  return {
    input: photo.photo.sizes[0].localPath,
    top: Math.round(photo.y),
    left: Math.round(photo.x)
  };
});

console.log(pagePhotos);

const pageBuffer = sharpFile.composite(pagePhotos).toBuffer();

// localPath is something like this
// "/Users/username/Library/Application Support/projectname/projects/PKTFB45BW/photos/FKYCARH45MQ-1000.jpg"

I'm getting this error
Unhandled Promise rejection: Input buffer contains unsupported image format ; Zone: <root> ; Task: null ; Value: Error: Input buffer contains unsupported image format Error: Input buffer contains unsupported image format

Error: Input buffer contains unsupported image format

What am I doing wrong?

Hi, I might need a more complete code sample. What is options set to?

Options is set to this:
const options: SharpOptions = {
  create:
    {
      width: Math.floor(page.width * page.zoom),
      height: Math.floor(page.height * page.zoom),
      channels: 3,
      background: ColorUtil.hex2rgb(page.backgroundColor)
    }
  };

Thanks. Is photo.photo.sizes[0].localPath a string? Are you able to provide an image that fails in this manner?

Yes. As I previously said, it is a string like this:
/Users/username/Library/Application Support/projectname/projects/PKTFB45BW/photos/FKYCARH45MQ-1000.jpg
All images fail, to be precise. I don't understand why, since the path is absolute.

Please can you provide a complete, standalone code sample/repo that exhibits this behaviour.

The code I just provided is as complete as it can be, but I'll write it all together and make some adjustments to be a working one.
const options: SharpOptions = {
  create:
    {
      width: 2000,
      height: 1000,
      channels: 3,
      background: {r:0,g:0,b:0}
    }
  };

const photos = [
'/Users/username/Library/Application Support/projectname/projects/PKTFB45BW/photos/A.jpg',
'/Users/username/Library/Application Support/projectname/projects/PKTFB45BW/photos/B.jpg',
'/Users/username/Library/Application Support/projectname/projects/PKTFB45BW/photos/C.jpg'
];

const sharpFile = this.electronService.sharp(null, options);

const pagePhotos = photos.map((photo, index) => {
  return {
    input: photo,
    top: 100 + 100 * index,
    left: 100 + 100 * index
  };
});

const pageBuffer = sharpFile.composite(pagePhotos).toBuffer();

I'm not sure if this will do the trick.

I'm unable to reproduce this problem using the provided code snippet.
The original report was an "Unhandled Promise rejection" so I can only suggest you add some error handling to your code to help narrow down exactly where the problem is occurring.
Perhaps there's some code not shown here that also uses sharp? What is pageBuffer (which is a Promise, not a Buffer) used for?

It was thenned, after that and then the buffer would be injected in sharp again.
I was initially trying to change this snippet (which works all fine)
const pageBuffer: Promise<Buffer> = page.allPhotos.reduce<Promise<Buffer>>((bufferPromise: Promise<Buffer>, framePhoto) =>
      bufferPromise.then((buffer => this.electronService.sharp(framePhoto.photo.sizes[0].localPath)
        .rotate(undefined, {
          background: { r: 0, g: 0, b: 0 }
        })
        .resize(
          Math.round(framePhoto.width - framePhoto.borderThickness * 2),
          Math.round(framePhoto.height - framePhoto.borderThickness * 2))
        .extend({
          top: framePhoto.borderThickness,
          left: framePhoto.borderThickness,
          right: framePhoto.borderThickness,
          bottom: framePhoto.borderThickness
        })
        .toBuffer()
        .then(frameBuffer => this.electronService.sharp(buffer).overlayWith(
          frameBuffer,
          {
            top: Math.round(framePhoto.y),
            left: Math.round(framePhoto.x)
          }).toBuffer())
      ) as any)
      , sharpFile.jpeg().toBuffer() as any as Promise<Buffer>);

to composite method, which didn't work at all and threw that error. I tried to catch the error and the message was unclear, anyway. Here it is:
Error: Input buffer contains unsupported image format

Thank you for providing a more complete code sample.
If you've used create to create a new, blank image but have not specified any output format e.g. via png() etc. then the data returned by toBuffer() will be raw, uncompressed pixel data.
It looks like you might be feeding the resolved value of pageBuffer back into a new sharp instance, so you'll need to describe that raw data.
sharp(rawBuffer, { raw: { width, height, channels }})...

Thank you for your help!
It solved the issue! :)


Send secure messages from welcome screen

Add possibility to send the send secure messages method from the SDK
using the Environment. Success and error handling will come in the
next PR, as well as tests.
I am making this PR so that some common functionality that will be used by Igor is already present in the feature branch. Also, that way the PRs are concise and easier to read. All TODOs are in place not to forget stuff.
MOB-1698

!merge


MDC context does not propagated to circuitbreaker threadpool

Describe the bug
As a developer, I'd like to see tracing context from MDC during executing requests. Now if I enable circuit-breaker context disappears from logs.
Sample
Example project: https://github.com/v-v-y/demo
Java: 17
Spring boot: 2.7.6
spring-cloud-starter-circuitbreaker-resilience4j: 2.0.2
spring-cloud-starter-openfeign: 3.1.5
application.yaml
spring:
  application:
    name: demo-application
  profiles:
    active: dev
  cloud:
    open-feign:
      client:
        config:
          default:
            loggerLevel: BASIC
feign:
  circuit-breaker:
    enabled: true

resilience4j:
  scheduled:
    executor:
      corePoolSize: 10
      contextPropagators:
        - com.example.demo.MdcContextPropagator
  circuit-breaker:
    configs:
      default:
        slidingWindowType: TIME_BASED
        failureRateThreshold: 50
        minimumNumberOfCalls: 3
        slidingWindowSize: 60
        waitDurationInOpenState: 30s
        permittedNumberOfCallsInHalfOpenState: 3
        recordFailurePredicate: com.example.demo.ErrorPredicate
        registerHealthIndicator: true

The difference in logs during calling example controller GET /v1/discovery
if feign.circuit-breaker.enabled: true
[2022-12-18 14:25:36.569] [pool-2-thread-1] com.example.demo.GoogleClient             []  DEBUG: [GoogleClient#discovery] ---> GET https://docs.googleapis.com/$discovery/rest?version=v1 HTTP/1.1
[2022-12-18 14:25:37.077] [pool-2-thread-1] com.example.demo.GoogleClient             []  DEBUG: [GoogleClient#discovery] <--- HTTP/1.1 200 OK (506ms)

if feign.circuit-breaker.enabled: false
[2022-12-18 14:26:09.812] [http-nio-8080-exec-1] com.example.demo.GoogleClient             [1f143097-3f5e-467d-9038-aa6d511c1895]  DEBUG: [GoogleClient#discovery] ---> GET https://docs.googleapis.com/$discovery/rest?version=v1 HTTP/1.1
[2022-12-18 14:26:10.333] [http-nio-8080-exec-1] com.example.demo.GoogleClient             [1f143097-3f5e-467d-9038-aa6d511c1895]  DEBUG: [GoogleClient#discovery] <--- HTTP/1.1 200 OK (518ms)

Look like ContextAwareScheduledThreadPoolExecutor created, but never used. I've also tried to provide specific contextPropagator but it didn't help too

I only see context propagators being used within bulkheads with a thread pool not circuit breakers.  @RobWin is that true?

Yes, correct.
A CircuitBreaker is not spawning any threads, but a TimeLimiter schedules a thread when a timeout occurs.
The thread name pool-2-thread-1 also doesn't match the name of threads spawned by resilience4j ThreadPoolBulkhead or ContextAwareScheduledThreadPoolExecutor.
See: https://github.com/resilience4j/resilience4j/blob/master/resilience4j-core/src/main/java/io/github/resilience4j/core/ContextAwareScheduledThreadPoolExecutor.java#L35
or
https://github.com/resilience4j/resilience4j/blob/master/resilience4j-bulkhead/src/main/java/io/github/resilience4j/bulkhead/internal/BulkheadNamingThreadFactory.java#L12

Is it posible to propagate MDC context to resilience4j requests?

@v-v-y can you try setting spring.cloud.circuitbreaker.resilience4j.disableThreadPool=false?

spring.cloud.circuitbreaker.resilience4j.disableThreadPool=false

checked, it doesn't help

Could you please provide a Java project?  I am having trouble getting the Kotlin project to run.

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Here is java project https://github.com/v-v-y/demo-java

Please use the Spring Boot BOM as well as the Spring Cloud BOM you have mismatched versions because you are trying to manage the versions yourself.  After using the latest Spring Boot 2.7.x release and Spring Cloud 2021.0.x release please try the property I suggest above.  If that does not work please correct your sample with the updated versions.

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@v-v-y can you try setting spring.cloud.circuitbreaker.resilience4j.disableThreadPool=false?

This works for me in version 2.1.4, but now the whole timelimiter is disabled, since the calls are now only executed with the circuitBreaker (see Resilience4JCircuitBreaker), because there will be no executorService provided when creating an instance in the Factory in Resilience4JCircuitBreakerFactory

Can you try creating a Customizer bean for Resilience4JCircuitBreakerFactory which sets the Executor?
@Bean
public Customizer<Resilience4JCircuitBreakerFactory> slowCustomizer() {
	return factory -> {
		ContextAwareScheduledThreadPoolExecutor executor = ContextAwareScheduledThreadPoolExecutor.newScheduledThreadPool().corePoolSize(5).contextPropagators(new TestContextPropogator())
			.build();
		factory.configureExecutorService(executor);
	};
}

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@ryanjbaxter Thanks a lot, this approach works as expected.
Actually we do not need to specify TestContextPropogator because ContextAwareScheduledThreadPoolExecutor propagate MDC context at all
For me solution
@Bean public Customizer<Resilience4JCircuitBreakerFactory> slowCustomizer() { 	return factory -> { 		ContextAwareScheduledThreadPoolExecutor executor = ContextAwareScheduledThreadPoolExecutor.newScheduledThreadPool().corePoolSize(5).contextPropagators(new TestContextPropogator()) 			.build(); 		factory.configureExecutorService(executor); 	}; }
Circuit breaker and timelimiter works well with such approach with proper MDC context

Can you try creating a Customizer bean for Resilience4JCircuitBreakerFactory which sets the Executor?
@Bean
public Customizer<Resilience4JCircuitBreakerFactory> slowCustomizer() {
	return factory -> {
		ContextAwareScheduledThreadPoolExecutor executor = ContextAwareScheduledThreadPoolExecutor.newScheduledThreadPool().corePoolSize(5).contextPropagators(new TestContextPropogator())
			.build();
		factory.configureExecutorService(executor);
	};
}

@ryanjbaxter can I configure with circuit-breaker-properties-configuration like this ?
resilience4j.scheduled.executor.core-pool-size=10
not worked

No we use a different executor service


TypeError: Cannot read property 'end' of undefined

new BundleAnalyzerPlugin({ generateStatsFile: true, statsFilename: 'xxx.json' })

./node_modules/.bin/webpack-bundle-analyzer ~/online5/build/public/xxx.json -p 8888
Could't analyze webpack bundle:
TypeError: Cannot read property 'end' of undefined

Problem appears in production build of our application, which have no build-in server. In dev-mode all good.

Not sure if it helps, but we get the same error when running the CLI tool against a stats.json file as well. Managed to get it running by disabling the DedupePlugin.

Same here. And disabling Dedupe plugin helped as well. Although it won't be the same as real bundle in my understanding.

@Diokuz do you use Dedupe plugin for your production build as well?

@th0r and I tried to run production build with minification, but analyzer still shows unminified sizes (in megabytes).

I did some research on this bug, I am using code splitting in my project , so I have the chunk files  those are loaded using  webpackJsonp , following code is used to calculate the size of those chunks
if (_.get(node, 'callee.name') === 'webpackJsonp') {
  state.sizes = getModulesSizesFromFunctionArgument(args[1]);
   return;
}

function getModulesSizesFromFunctionArgument(arg) {
  if (arg.type === 'ObjectExpression') {
    const modulesNodes = arg.properties;

    return _.transform(modulesNodes, (result, moduleNode) => {
      const moduleId = moduleNode.key.name || moduleNode.key.value;
      const moduleBody = moduleNode.value.body;

      result[moduleId] = moduleBody.end - moduleBody.start;
    }, {});
  }

  if (arg.type === 'ArrayExpression') {
    const modulesNodes = arg.elements;

    return _.transform(modulesNodes, (result, moduleNode, i) => {
      if (!moduleNode) return;

      result[i] = moduleNode.body.end - moduleNode.body.start;
    }, {});
  }

  return {};
}

Problem exist in these two lines, which are pre assuming all the node types are function expressions, but there can be Array Nodes or Literal Nodes for those there wont be any body in AST
result[moduleId] = moduleBody.end - moduleBody.start;
result[i] = moduleNode.body.end - moduleNode.body.start;

@th0r  above thing might be helpful to fix. this issue can be reproduced if all the asset files exist in the bundle directory.
Cheers

@kishorevarma thanks! Thats exactly what I was thinking of.

but there can be Array Nodes or Literal Nodes

Do you know in which situations they can be arrays or literals?

@Diokuz @alexindigo @balanceiskey
Can someone of you guys send me archive with broken bundle? Everything that webpack has created + stats file.

@th0r yes, we are using new webpack.optimize.DedupePlugin(). Analyzer started to work when I disabled DedupePlugin.

I had the same issue, and the culprit was indeed webpack.optimize.DedupePlugin.
Note that I have the error when running webpack --profile --json which, if I understood correctly, is unrelated to this tool, actually.
Ah, now that I updated Webpack from 1.12.13 to 1.13.3, I no longer have the issue.
Funnily, when I removed the dedupe plugin for tests, I observed the same size of files generated in production. Looks like it is no longer necessary, at least with NPM 3, I guess.

So, appears that if one module is duplicate of another (has the same content) DedupePlugin replaces it's content with just module id in output bundle.
But seems like there is another case when module can be an object.
@sokra Could you explain this case please?

Released v1.4.1 with partial support for DedupePlugin (simple case with duplicated module ids).
Can you check it guys?

@Diokuz @PhiLhoSoft @alexindigo @balanceiskey
Could you check if v1.4.1 solves a problem?

Alas, as said, since I upgraded my libraries and tools, I can no longer reproduce the issue (which is already a good thing, no?).

@PhiLhoSoft I thought you had to remove DedupePlugin from config?

@th0r its fixed my issue, having array expression in assets files.

having array expression in assets files

Do you mean array in place of module wrapper?

yeah exactly, following solved my issue :) thanks for that
function getModuleSize(node) {
  if (node.type === 'FunctionExpression') {
    return node.body.end - node.body.start;
  }

  if (node.type === 'Literal') {
    return node.end - node.start;
  }

  // Fallback for unknown node types
  return 0;
}

But seems like there is another case when module can be an object.

@TheLarkInn Need your help here, man)

Released v1.5.2 with full DedupePlugin support (at least hope so 😜)


i18n preset

also we can add https://github.com/yanivkalfa/i18n-gettext-webpack-plugin to parse translation on FE part


__do_string_hash undefined with Clang on Linux

While trying to workaround #371 I tried to build Jamoma with clang 3.6 and 3.5 under Linux (resp. Ubuntu 15.04 and Raspbian Jessie)
Both ends with this error :
In file included from /home/antoine/lib-src/Jamoma/Implementations/PureData/JamomaCore/Foundation/library/includes/TTFoundation.h:15:
/home/antoine/lib-src/Jamoma/Implementations/PureData/JamomaCore/Foundation/library/includes/TTString.h:447:12: error:
      use of undeclared identifier '__do_string_hash'
                                return __do_string_hash(__val.data(), __val.data() + __val.size());

I believe that we determined earlier in the year that it would be safe to change TTString to be an alias to std::string.  I did work on this in the "tap/cleanup" branch, but I did a poor job of keeping issues separate on that branch -- so there are many tasks tangled together and it might be easiest just to take such a conversion as a new task.
The primary question is what to do with additions to TTString which are not a part of std::string.  My impression is that these would be better suited as free-standing functions rather than subclassing std::string, but I'm not entirely sure.
Doing a TTString conversion to std::string might also be considered a tedious distraction that we don't want to do...

the key is to use -stdlib=libc++ flag when configuring :
cmake .. -G Ninja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_FLAGS="-stdlib=libc++"

I think that this should go in :
https://github.com/jamoma/JamomaCore/blob/master/Shared/CMake/JamomaPlatformSpecific.cmake
One can easily test for clang with
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")

endif()
in the part around line 40.
Note : this has the important consequence that a plugin built with g++ will
not be loadable with a Jamoma that was built with libc++. (Well, it
technically would be but it will cause a lot of crashes - it's akin to
using two different versions of the msvcrt*** in a software windows, which
generally does not end well).
On Mon, Oct 19, 2015 at 7:05 PM, Antoine Villeret<EMAIL_ADDRESS>wrote:

the key is to use -stdlib=libc++ flag when configuring :
cmake .. -G Ninja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_FLAGS="-stdlib=libc++"
—
Reply to this email directly or view it on GitHub
https://github.com/jamoma/JamomaCore/issues/380#issuecomment-149283199.


New slot syntax not working with "is"

Version
2.6.10
Reproduction link
https://codesandbox.io/s/vue-template-7x6nl
Steps to reproduce
Use v-slot directive with "is" attribute
What is expected?
similar behavior with the old syntax of slots
What is actually happening?
scoped slot not working with dynamic component

it's not critical for me but maybe it can help You make it better

Duplicate of https://github.com/vuejs/vue/issues/10152


React Native 开发技术点整理

Working Group

React Native New Architecture Working Group

脚手架

https://github.com/RootLinkFE/react-native-template

学习资源

ES6教程
typescript
搭建开发环境
react-native-guide中文资源
How to use create-react-native-app with GraphQL & Apollo
Redux
MobX
RNStudyNotes React Native 研究与实践
sucese/vinci A user guide and principle analysis for React Native （RN源码导读，从代码调用、启动流程、渲染原理、线程模型、通信机制等诸多方面对 React Native 进行了解读）

调试

react-native-debugger
推荐 https://fbflipper.com/

软件

android用户推荐：genymotion 模拟器

新手环境

React Native 错误集合
Failed to find Build Tools revision 23.0.1
com.android.builder.testing.api.DeviceException: Could not create ADB Bridge
"AccessibilityInfo","message":"Unable to resolve module `AccessibilityInfo
could not connect to development server react native android
Error running adb: Error running app. Error: Activity not started
only the original thread that created a view hierarchy can touch its views
:react-native-video:prepareReleaseDependencies
No resource found that matches the given name: attr 'android:keyboardNavigationCluster'

某些问题可以尝试cd android && gradlew clean
UI 组件

NativeBase

插件库
见个人 star : https://github.com/stars/giscafer/lists/react-native
性能测试与优化

React Native Performance Optimization and Profiling
Optimizing list render performance in React Native
Medium上性能优化相关的博文
Scheduling in React，关于如何让 React 应用快速响应

文章

去中心化的 React Native 架构探索

Flutter

从架构到源码：一文了解Flutter渲染机制

https://github.com/reactwg/react-native-new-architecture/discussions/1

1111


feat: Keep a log the notifications so they can be checked later

Default vim.notify writes the notifications to message buffer . You can later check what were the issues later .
I think nvim-notify should log them in a buffer and provide a command that open in a split.
It should be really easy you'll just have to store all the notifications in an list and when user calls the command make a scratch buffer out of then and display it.
It's will be pertucularly useful for debugging plugin errors at startup.

Related to #11.

I've merged in changes to expose the previous messages notify.history(), which can be used to construct a buffer or however else you want to view them

Thanks. A built-in implementation will definitely be useful :)

@rcarriga notify.history() should store other opts too I think . For example tittle .

I've merged in changes to expose the previous messages notify.history(), which can be used to construct a buffer or however else you want to view them

Thanks, works for me.

Thanks. A built-in implementation will definitely be useful :)

Yep I'll work on getting helpers built-in to use with buffers, telescope etc but there were several people requesting this so thought it would be better to get something first :smile:

notify.history() should store other opts too I think . For example tittle .

Good point, I'll add title to it :ok_hand:


Difference between uniqueId and instanceId

From README I understand that uniqueId corresponds to IDFV on iOS, is it null on android?
Do I need instanceId library to make it work on iOS, otherwise is it going to be null?

The UniqueID is meant to be a persistent, unique identifier. It is that way currently on Android. #58 makes it that way on iOS.
InstanceID is meant to be scoped to the installation (unique, but non persistent identifier).

Thanks


Fall back to ciphers="DEFAULT:!DH" if "DEFAULT@SECLEVEL=1" leads to an ssl.SSLError

See #63

Ok, doesn't matter what I wrote earlier :)
According to this one

I could include more than one cipher simple by separating the ciphers with : and send all the ciphers as one string.
context.set_ciphers(cipher)```

I'm not sure what our "DEFAULT@SECLEVEL=1" means in our code.
Anyway "DEFAULT:!DH" is working, so I propose just use it everywhere and I hope it will work

This PR is working well for us with latest HA version and roomba J7 (and doesn't work without it) -- any chance of merging it?  Thanks!


fix make release-server-xgo

fix regressions of:

#3010
#3065

and make make release-server-xgo work on a manual exec (not run by ci)

works: https://ci.woodpecker-ci.org/repos/3780/pipeline/11246


weird performance issue in Spyder, even for simple commands

Hello,
I wanted to share some weird performance issue in Spyder even for simple commands like .head().
Here is what I observed. When I have a very large dataset, say more than 10GB in memory, whether I type

dataframe.head()
in the console followed by Control + Enter

OR

I type dataframe.head() in the code editor, and I hit F9 while the cursor is on the same line to run that command

makes a great deal of difference in performance (i.e. speed to get the result).
The F9 solution is almost immediate, while the control+ enter one is substantially slower.
What is going on here?
Thanks!

I really don't know, and (unfortunately) I don't have enough memory to try this.
Is this error reproducible with smaller dataframes?

I have reported similar issues before. The problem is the Variable explorer which reads the dataframe all the time (the same problem with big defaultdict object).
If you check the option to not show uppercase variables and name you dataframe in uppercase (DATAFRAME) than the problem goes away.
btw, once there is a big variable that variable explorer shows, every command (even 1+1) takes ages to compute


Startup command? What is it?

What’s the start up command?

You can use python -m bot to start the bot
On Mon, 6 Mar 2023 at 20:01, THEDEV1231 @.***> wrote:

What’s the start up command?
—
Reply to this email directly, view it on GitHub
https://github.com/finlaysawyer/discord-uptime/issues/115, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AEMDKHNY4R4CMAXS7242URDW2Y7B5ANCNFSM6AAAAAAVRSCWYM
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Token overriding issue when multiple applications hosted in same subdomain

Describe the issue:
When two applications are hosted on the same domain, the tokens in the session storage does not refresh when switching between applications. It will use the same token from the previous application
How to reproduce:

Host 2 applications under same domain (Ex: example.com/app1 and example.com/app2)
Open one application (example.com/app1) in a tab and log into the application
You should see session storage of the tab with following artifacts

Switch to the other application while being in the same tab
You should see that the access_token does not refresh in session storage and is being used from the previous application.

Expected behavior:

The 2 applications should have their own artifacts in the session storage. One method of preserving these artifacts is to append the clientID of each application to the key of the artifacts.

Optional Fields
Related issues:
Parent Issue - https://github.com/wso2-enterprise/iam-engineering/issues/409

This issue is fixed with asgardeo-auth-react-sdk v2.0.0 release. The behaviour will be as follows.
https://user-images.githubusercontent.com/42619922/221101566-60a9b2b7-f5f8-4f15-9256-966a260d42dd.mov
As seen above, 2 application will have separate session storage artifacts


AST: Revert inherited type request in ConformanceLookupTable.

Cherry pick of https://github.com/apple/swift/pull/68508.
One of the request triggers added to ConformanceLookupTable in https://github.com/apple/swift/pull/68384 can cause circular request evaluation. Revert the request trigger since it doesn't appear to be necessary for the test cases introduced in that PR.
Resolves rdar://115314044

@swift-ci please test


[FEATURE] Add more details about API error

Is your feature request related to a problem? Please describe.
It seems that there is currently no way to retrieve the body of an API request in error.
This is a real pain point as I have customized some SCAPI endpoint and return custom status code like :
{
    "title": "Hook Status",
    "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/hook-status",
    "detail": "An error occurred in ExtensionPoint 'dw.ocapi.shop.basket.items.afterPOST'.",
    "extensionPoint": "dw.ocapi.shop.basket.items.afterPOST",
    "statusCode": "add_to_cart_not_allowed",
    "statusMessage": "add_to_cart_not_allowed",
    "statusDetails": {}
}

And I would like to display custom messages on the front-end depending on this statusCode.
Describe the solution you'd like
I would like the possibility to get back the API's body from the SDK.

Thanks @LucasReyre.
Using SCAPI hooks to add details to error message with Script API's Status and status.addDetail is very useful to provide support for conditional error messages based on SCAPI hook invocation success.
If you drop down to the level of commerce-sdk-isomorphic are you able to see the error message?
I'm curious about where in the stack you've observed the details being lost.
Thanks!

I'm not comfortable enough with commerce-sdk to investigate this module.
But I have observed that in the pwa-kit addItemToBasketMutation.mutateAsync throws the following exception when a response other than in success is received.

To build on the issue, it commerce-sdk-isomorphic does provide access to the error, so we should validate that the error body is available in commerce-sdk-react.
To replicate ...

In a cartridge, create a hook that throw an error:

exports.beforeGET = function errorWithDetails() {
    const status = new Status(Status.ERROR)
    status.addDetail("validation_error", "Naughty Category")
    return status
}

In the ISO SDK, you can see you can pull out the error:

import capi from "commerce-sdk-isomorphic"

function getClientConfig() {
    const clientConfig = {
        parameters: {
            shortCode: "kv7kzm78",
            organizationId: "f_ecom_zzrf_016",
            siteId: "RefArch",
            clientId: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
        },
        throwOnBadResponse: true,
    }
    return clientConfig
}

async function main() {
    const clientConfig = getClientConfig()
    const shopperLoginClient = new capi.ShopperLogin(clientConfig)

    // 1⃣ Login as a guest.
    const guestTokenResponse = await capi.helpers.loginGuestUserPrivate(
        shopperLoginClient,
        {},
        { clientSecret: "REDACTED" }
    )
    clientConfig.headers = {
        Authorization: `Bearer ${guestTokenResponse.access_token}`,
    }

    // 2⃣ Make a call to categories which throws an error.
    try {
        await new capi.ShopperProducts(clientConfig).getCategory({
            parameters: { id: "root", levels: 0 },
        })
    } catch (err) {
        console.error({ err })
        const errData = await err.response.json()
        console.error({ errData })
    }
}

main()

Hi @LucasReyre @johnboxall !
Thank you for bringing this up. To build on John's point, you can grab error from the commerce-sdk-isomorphic level but it's very unintuitive to access errors from the commerce-sdk-react hooks.
Yes, there is a way to access API errors!
There is a way to grab errors and althou it isn't the prettiest way.
const product = useProduct(
        {parameters: {id: '25502228Mxxx'}},
        {
            onError: async (error) => {
                // access error properties in json
                const json = await error.response.json()
                console.log(json)
            }
        }
    )

There is a playground app where you can reproduce this -> https://github.com/SalesforceCommerceCloud/pwa-kit/compare/demo-commerce-sdk-react-error-handling?expand=1
But, it should be better!
As you may already found out, the above method uses a callback function that doesn't play well with react states.
Ideally it should be very easy to access errors like this:
const product = useProduct({parameters: {id: '25502228Mxxx'}})

console.log(product.error)

I'm going to create a bug ticket in our system to fix this issue. In the meantime, please use the callback method to access error. Thank you!

Hello @kevinxh
The way you catch the error details works well, I will use it until you release something easier.
Thanks to you two


"Cleaner" default styling?

First thanks for doing this!
I'm sure all the issues that I raise here are pretty easily solvable with some custom styling/tweaking, but I wonder if the defaults should change. I really like the way that the Atom.io generated API docs omit much of the boiler plate that most documentation tools generate. I think it would make sense for Atom package generated docs to have that same feel.
As some examples of boiler plate included in endokken but not in Atom api docs:

Ommit the "Class:" before the generated classname
Ommit the table of class info after classname (Class Name, Superclass, File)
Ommit "Description" heading before class description
Make each class description "collapsed" by default so you just see the method signature. Click to expand... again like Atom.io API docs.

Thanks,
Jesse

Over time, I would love to have pluggable styles for the documentation that Endokken generates. Perhaps by simply pointing to a different templates directory. I want to get Endokken to the point where it generates reliable documentation first ... and then we can play with the styling in a bunch of different ways.


Still not working in viewDidLoad?

I had no luck to successfully display SVProgressHUD in viewDidLoad:. It only works in viewDidAppear:. I saw old issues about this telling us it was fixed, is this still the case or am I doing something wrong?
Thanks

I tried with 8.3 and same issue occurred. SVProgressHUD not showing up in ViewDidLoad. But works just fine if I initiate it in viewWillLoad

@mayooresan This is working for me now in viewDidLoad with latest swift and latest cocoapods !

Can this ticket be closed if it is working again?

@honkmaster Just investigated this in an Objective-C project I had. This issue depends on the threading timing I think (see Sam's explanation here: https://github.com/TransitApp/SVProgressHUD/issues/60)
From what I see in the code, I don't see any dispatch_async(dispatch_get_main_queue(), ^{ anymore. I just tried to wrap a method with it:
+ (void)showWithMaskType:(SVProgressHUDMaskType)maskType {
    dispatch_async(dispatch_get_main_queue(), ^{
        [self showProgress:SVProgressHUDUndefinedProgress maskType:maskType];
    });
}

and it worked flawlessly in my Obj-c project with multiple UIWindow and UI all in code (showing SVProgressHUD in viewDidLoad). Curiously, I didn't need it in my Swift project with 1 UIWindow and using Storyboard.
Any ideas why the dispatch_async is not there anymore?

Note that this is currently not working in viewDidLoad only on the root view controller (the one where the app loads). it works correctly in every other viewDidLoad following an action.

I have no idea why 'dispatch_async' is gone. Here we have to ask @samvermette.

Same here. SVProgressHUD in viewDidLoad doesn't work. I tried with iOS 8.4/XCode 6.4 (Swift with header-bridge) and even with the latest SVProgressHUD 1.1.3.

@hightech can you confirm it works with my dispatch_async code above?

@allaire I tried that and it doesn't work. :-(

how to improve My english?

Using SVProgressHUD 1.1.3
cocoapods-0.37.2
xCode 6.4
Works for me only if I use GCD:
dispatch_async(dispatch_get_main_queue()) {
SVProgressHUD.show()
}
When pushing to main thread it works no matter where I put it.
If I don't wrap in the dispatch_async it only works in viewDidAppear.
I'm new to iOS development and this is one of my cocoapod trials.  I was sure I was doing everything right and still couldn't get it to paint.  I'm glad I found this conversation.

@sigursalt thanks for confirming this on your side!

To my surprise the one I downloaded a month ago works just fine without dispatch_asyc with Swift. I had a hard time with my previous project and it refused to work without dispatch_async

@sigursalt thanks for that!


Is it possible to estimate radius parameter based on the number of points I would like to sample?

Hi,
Thank you so much for this amazing work on generalising this poisson disc sampling on 3D data. I understand that based on how it works, it can only take the radius into account instead of the number of samples. But very often, we would like specify number of points we want. Suppose I know the volume of the 3D box that I am sampling from and the number of points I want, I tried the following but it does not seem to work.
 radius = np.power(np.prod(dims3d) /(np.pi * 4/3 * n), 1/3)

Hi, thanks for your interest in this! This code is now included in SciPy as
https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.qmc.PoissonDisk.html
It has some extra methods to e.g. fill the space. Also, you cannot have a
specific number of samples that completely fill a space, since even with
the same radius you can have a slightly different number of samples. Of
course, you can truncate the samples you have, but then you will have gaps
in your space (which may be ok for you).
I hope this helps!
Cheers,
Pavel
вт, 1 нояб. 2022 г. в 22:12, PadX @.***>:

Hi,
Thank you so much for this amazing work on generalising this poisson disc
sampling on 3D data. I understand that based on how it works, it can only
take the radius into account instead of the number of samples. But very
often, we would like specify number of points we want. Suppose I know the
volume of the 3D box that I am sampling from and the number of points I
want, I tried the following but it does not seem to work.
radius = np.power(np.prod(dims3d) /(np.pi * 4/3 * n), 1/3)
—
Reply to this email directly, view it on GitHub
https://github.com/diregoblin/poisson_disc_sampling/issues/4, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAM4QIOOZNSQA677FZYQPXLWGFTQ5ANCNFSM6AAAAAARULKSQY
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Change of page in play store and does not show the version number

Hello.
I have the problem that the GetLatestVersionNumber() method does not find the android version number because the play store page has changed, is there any option to fix it?
I would appreciate the help.
Thank you very much.

Any updates on this issue?

Have you tried the workaround?

Hello do you have a solution for this issue please ?

Hello, I found the solution.
I used the nuget package "Xam.Plugin.LatestVersionStore".
I leave the link below:
https://www.nuget.org/packages/Xam.Plugin.LatestVersionStore