cannot convert 'Transaction' object to bytes

HI, I can't successfully create a
import asyncio
import json
import base64
import struct
import base58
import hashlib
import websockets
import time

from solana.rpc.async_api import AsyncClient
from solana.transaction import Transaction
from solana.rpc.commitment import Confirmed
from solana.rpc.types import TxOpts

from solders.pubkey import Pubkey
from solders.keypair import Keypair
from solders.instruction import Instruction, AccountMeta
from solders.system_program import TransferParams, transfer
from solders.transaction import VersionedTransaction

from spl.token.instructions import get_associated_token_address
import spl.token.instructions as spl_token

from config import *

from construct import Struct, Int64ul, Flag

async def buy_token(mint: Pubkey, bonding_curve: Pubkey, associated_bonding_curve: Pubkey, amount: float, slippage: float = 0.01, max_retries=5):
    private_key = base58.b58decode(PRIVATE_KEY)
    payer = Keypair.from_bytes(private_key)

    async with AsyncClient(RPC_ENDPOINT) as client:
        associated_token_account = get_associated_token_address(payer.pubkey(), mint)
        amount_lamports = int(amount * LAMPORTS_PER_SOL)

        # Fetch the token price
        curve_state = await get_pump_curve_state(client, bonding_curve)
        token_price_sol = calculate_pump_curve_price(curve_state)
        token_amount = amount / token_price_sol

        # Calculate maximum SOL to spend with slippage
        max_amount_lamports = int(amount_lamports * (1 + slippage))

        # Create associated token account with retries
        for ata_attempt in range(max_retries):
            # try:
            account_info = await client.get_account_info(associated_token_account)
            if account_info.value is None:
                print(f"Creating associated token account (Attempt {ata_attempt + 1})...")
                create_ata_ix = spl_token.create_associated_token_account(
                    payer=payer.pubkey(),
                    owner=payer.pubkey(),
                    mint=mint
                )
                print(f"Payer address {payer.pubkey()}")
                create_ata_tx = Transaction()
                create_ata_tx.add(create_ata_ix)
                recent_blockhash = await client.get_latest_blockhash()
                create_ata_tx.recent_blockhash = recent_blockhash.value.blockhash
                print(f"no erroe before sending")
                await client.send_transaction(create_ata_tx, payer)
                print("Associated token account created.")
                print(f"Associated token account address: {associated_token_account}")
                break
            else:
                print("Associated token account already exists.")
                print(f"Associated token account address: {associated_token_account}")
                break
            # except Exception as e:
            #     print(f"Attempt {ata_attempt + 1} to create associated token account failed: {str(e)}")
            #     if ata_attempt < max_retries - 1:
            #         wait_time = 2 ** ata_attempt
            #         print(f"Retrying in {wait_time} seconds...")
            #         await asyncio.sleep(wait_time)
            #     else:
            #         print("Max retries reached. Unable to create associated token account.")
            #         return

        # Continue with the buy transaction
        for attempt in range(max_retries):
            try:
                accounts = [
                    AccountMeta(pubkey=PUMP_GLOBAL, is_signer=False, is_writable=False),
                    AccountMeta(pubkey=PUMP_FEE, is_signer=False, is_writable=True),
                    AccountMeta(pubkey=mint, is_signer=False, is_writable=False),
                    AccountMeta(pubkey=bonding_curve, is_signer=False, is_writable=True),
                    AccountMeta(pubkey=associated_bonding_curve, is_signer=False, is_writable=True),
                    AccountMeta(pubkey=associated_token_account, is_signer=False, is_writable=True),
                    AccountMeta(pubkey=payer.pubkey(), is_signer=True, is_writable=True),
                    AccountMeta(pubkey=SYSTEM_PROGRAM, is_signer=False, is_writable=False),
                    AccountMeta(pubkey=SYSTEM_TOKEN_PROGRAM, is_signer=False, is_writable=False),
                    AccountMeta(pubkey=SYSTEM_RENT, is_signer=False, is_writable=False),
                    AccountMeta(pubkey=PUMP_EVENT_AUTHORITY, is_signer=False, is_writable=False),
                    AccountMeta(pubkey=PUMP_PROGRAM, is_signer=False, is_writable=False),
                ]

                discriminator = struct.pack("<Q",<PHONE_NUMBER>2537952870)
                data = discriminator + struct.pack("<Q", int(token_amount * 10**6)) + struct.pack("<Q", max_amount_lamports)
                buy_ix = Instruction(PUMP_PROGRAM, data, accounts)

                recent_blockhash = await client.get_latest_blockhash()
                transaction = Transaction()
                transaction.add(buy_ix)
                transaction.recent_blockhash = recent_blockhash.value.blockhash

                tx = await client.send_transaction(
                    transaction,
                    payer,
                    opts=TxOpts(skip_preflight=True, preflight_commitment=Confirmed),
                )

                print(f"Transaction sent: https://explorer.solana.com/tx/{tx.value}")

                await client.confirm_transaction(tx.value, commitment="confirmed")
                print("Transaction confirmed")
                return tx.value

            except Exception as e:
                print(f"Attempt {attempt + 1} failed: {str(e)}")
                if attempt < max_retries - 1:
                    wait_time = 2 ** attempt
                    print(f"Retrying in {wait_time} seconds...")
                    await asyncio.sleep(wait_time)
                else:
                    print("Max retries reached. Unable to complete the transaction.")

The error is always Cannot convert 'Transaction' object to bytes, it happens in the send_transaction function of the client. Is it a bug?

I downgraded from 0.35 to 0.34 and code works

For legacy transactions, you need to use
https://michaelhly.com/solana-py/rpc/api/#solana.rpc.api.Client.send_legacy_transaction
instead of send_transaction.


python3Packages.faraday-agent-parameters-types: add mising dependency

Description of changes
importing faraday_agent_parameters_types.utils failed because it couldn't find the module packaging
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[X] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[X] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 170723 run on x86_64-linux 1

3 packages built:

faraday-agent-dispatcher
python310Packages.faraday-agent-parameters-types
python39Packages.faraday-agent-parameters-types


HTML5 history API support

hey there,
awesome, awesome tools and service! I'm switching projects and teams to zeitHQ right now but I noticed something weird.
This prototype app uses the html5 history API:
https://medaku.io/
You'll get redirected to https://medaku.io/jagen immediatly.
Refresh the browser and you'll get a 404. I get a 404 whenever I try to access a path other than the root, when using client side routing via history API.
Can you push me into the right direction how to fix this? While it would work, I'd rather not use the hashbang hack https://medaku.io//#/jagen.

Static deployments don't support SPAs at the moment, you need to run your own custom server using either a NPM or Docker deployment (I recommend you zeit/serve with the --single flag).

Hm, ok thanks!
Is SPA support in the pipeline? It'd introduce quite some changes to SPA builds if they now need to come with a server and we have to deploy a node app, not a website - which destroys a little bit of the simplicity of now.

ah nevermind. A simple package.json inside my dist folder works already 🎉
{
  "name": "mudaku",
  "scripts": {
    "start": "serve --single"
  },
  "dependencies": {
    "serve": "latest"
  }
}

thanks!

with now 2.0, how to do this?

Any updates on this?
Need to know how to serve non-root routes in vue app with history mode routing. Because now I'm getting 404.

@alexnaidovich, agreed, this is broken in 2.0


Allow to set the maximum concurrency in CachedImages operations

It allows to put in cache or remove from the cache multiple images at the same time in order to speed up the process.

:tada: This PR is included in version 1.3.0-beta.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.3.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


build fails due to dependancy on deprecated solidity-sh3

doesn't build due to deprecation of solidity-sha3, which is in turn dependant on deprecated<EMAIL_ADDRESS>https://travis-ci.org/raineorshine/solidity-sha3
https://github.com/raineorshine/solidity-sha3/pull/10
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>postinstall: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script.

@raininja Thanks for reporting this. Will look into as soon as possible.

I'm just going to fork the appropriate repos and use those to allow it to build.


Wanted: Maintainers

If we want keep Rancher OS alive by the community we will need 5-10 maintainers (I can be one of those but I don't want to be only one).
Most important task where we need maintainers is to have some one review, comment and approve pull requests when we get them. Anyone who is able to review code and is willing to sacrifice some of their time for better good can be maintainer.
We will also need agree pull request approval practice. My proposal is that anyone can create pull request and all pull requests much be reviewed by at least one maintainer and it must be different person than who created pull request (simple peer review practice to avoid human errors).
So anyone who is interest to be maintainer to this project please leave a comment.

Hello, in view of the fact that RancherOS is going to be discontinued, I think the idea of creating a community version of it is excellent. I would like to be able to help with the project, I don't have much experience but I am willing to learn to improve the OS.

@tomaswarynyca you are very welcome 👍

Do you already have an organized means of communication for the organization of the collaborators?

Not yet but you can reach me on Rancher Slack with same nick.
Anyway, can you start by sharing your use case(s) on https://github.com/burmilla/os/issues/6
and probably you want also check discussion about kernel versions on https://github.com/burmilla/os/issues/5

count me in on giving you a hand as much as my time allows

@tomaswarynyca @ToeiRei FYI, I did sent both of you now collaborator invitations from all Burmilla repos.
There is also now branch policy which require pull requests to be used to update master branch on all repos except os and os-services (because on those I'm actively working on now). I will add branch policy to those too after I got v1.9.0-rc1 ready.

Great! Thank you for your confidence, I have finished accepting all applications.

FYI. I added now branch policy to:

https://github.com/burmilla/os/tree/v1.9.x

Branch which used to release v1.9.x versions and where each version code will be tagged.

https://github.com/burmilla/os-services/tree/v1.9.0

Created based on v1.9.0-rc1 branch.

https://github.com/burmilla/releases/tree/v1.9.x

Branch which we will which v1.9.x versions are using to check updates.

Policy will require changes to those branches going through pull request and someone else than he who created pull request to review and approve it (standard practice to avoid human errors).

@tomaswarynyca @ToeiRei I noticed that it would be better that "burmilla" is GitHub organization than user account so I converted to it to like that based on https://docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-your-github-user-account/converting-a-user-into-an-organization now and invited both of you to be owners on it with me so you will get same access rights than I have.
Main purpose of that is to make sure that BurmillaOS can be maintained as long than at least one of us is able to participate.

Hello, I am from Loongson (R & D CPU/mips64le), I wanna in.

@XiaodongLoong Hi. I created feature request item to #23 with some basic infos. Feel free to add more information about that platform to there. Also note that you can reach us on Discord https://github.com/burmilla/os/issues/10#issuecomment-735303983

@olljanat, @ToeiRei  I would be happy to help support Burmilla. I'm glad someone decided to support a fork of RancherOS. I'm a big fan of the low resource usage of this style and believe docker will still be around for a long time.

@KebinuChiousu welcome, plz share your use case(s) on #6
We are just trying to finalize first release version and I'm trying to verify all known use cases on it.

May I join too? We build HomeDrive with depends (or depended) on RancherOS.

@h8liu definitely, it is good to have people joining to project who have interest to keep it alive. If you have known issues/feature requests the please create them here so we can keep track of those.
@KebinuChiousu I just noticed that I have totally forgot you. Sorry about that.
I will contact both of you on Discord..

I want to join in as a maintainer.
We (https://distrowatch.com/table.php?distribution=deepin) have a team here, aims to make a commercial distribution base on this opensource project. We can help to upgrade kernel and rootfs version with official source code, fix common bugs, add some non-secret arch support (say mips64el) code. While some custom kernel/rootfs changes and special arch support will be reserved. I think this can help both community and company.
I will update more detail on #6 and #78

Everyone who is following this thread, please check my proposal as new architecture for BurmillaOS on #88

We (https://www.deepin.org/en/) have a team here, aims to make a commercial distribution base on this opensource project. We can help to upgrade kernel and rootfs version with official source code, fix common bugs, add some non-secret arch support (say mips64el) code. While some custom kernel/rootfs changes and special arch support will be reserved. I think this can help both community and company.

@wonleing very interesting. Can you point me to documentation how to build Deepin from sources codes? Probably we can share some tooling and build practices too.

As far as I know, build Deepin from sources codes is not opened yet. But we have github opened: https://github.com/linuxdeepin/
You can find things there :)


Fix typo ptry => pty, sudo failing on el7

Can one of the admins verify this patch?

@davemcdonnell, please update your commit message to have an issue referenced (create one if needed), and we look forward to getting this fix in!

Added issue https://tickets.puppetlabs.com/browse/BKR-245 and referenced in commit

@davemcdonnell awesome, thanks. I'll kick off automated testing, and hopefully we'll get this in today.

@puppetlabs-jenkins test this please

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/802/
Test FAILed.


Evaluate operating system choices

Bionic is scheduled for EOL April 2023
Our OS choices impact our customers, because we only build bionic (for now). And CentOS7 for r-session-complete
We have had many requests for CentOS / RHEL (i.e. #111 , #225 , in several customer calls, etc.)
Ubuntu Jammy Jellyfish has been released, which has

We should decide:

do we have enough collective buy-in / dev effort to start forking the build matrix and maintaining different distros? How many? For which products? (i.e. RSPM is arguably impacted least / is most OS agnostic)
at what point should we pull the trigger on stopping bionic builds?
when should the latest / versioned images change off of bionic
tag paradigms to make these types of differences clearer / cleaner? (related to #302  )
#255 so that the number of versions we build is minimized in the face of more OS's
desired product features / documentation to make migration across OS easier

i.e. RSC with Launcher arguably makes the OS switch for the "main" service less of an issue
finding a way to build r-session-complete less often (i.e. more like the content images) could simplify effort considerably or merge the image with content for RSC. However, this is likely to take a long time for customers to pick up...

how to stage this change to minimize impact (i.e. couple with a versioned release, etc.)

Notes:

https://hub.docker.com/r/redhat/ubi8 (for RHEL)
https://hub.docker.com/_/ubuntu (ubuntu:jammy)
Not all images need to move at the same time. But we should explain / prepare customers appropriately so they can plan. There could be improvements in our notification streams / channels, etc.

We should consider at least talking to AWS and AzureML about our options when this gets further.

Hey @colearendt,
Thanks for beeing transparent on the future of the base system(s) and involving the community!
Are there any updates on the subject and if not do you maybe have a rough timeline, when a decision is going to be made?
It would be especially interesting which CentOS sucessor is picked – if any.

@mbuet2ner Apologies for our delay here.  In general for Posit platform support, we've decided the following, which is what we would do here if we picked something: "There are multiple distribution options, such as Rocky Linux and AlmaLinux, which state they are 1:1 binary compatible with RHEL 8. These distributions can be used as long as they stay 1:1 binary compatible with RHEL 8, but we will only test and reproduce issues on RHEL 8. Furthermore, CentOS Stream is not a 1:1 binary-compatible distribution and so is not supported by Posit."
But as you've noticed, we haven't been making any changes here, and I'm not sure exactly when we will add another option.  We did have another request for RH8 compatible support in here that came in today, which is what brought me to this issue.  We will still considering this and determining when we can fit this in.  We do have an issue we are taking on shortly to make clearer where things stand: https://github.com/rstudio/rstudio-docker-products/issues/508

A premium support customer reported they need RHEL images.  Their on-premise setup is RHEL, for their EKS cloud setup they wish to mirror this and stay with RHEL instead of Ubuntu.
Ticket ID 89645


ability to pass onChange handler in field

useful for masks

add this fn? to registerField

pre-parse?


Using this component on mobile devices

There are a few issues we've come across when trying to use this component on mobile devices.

the native toolbar (copy, paste) sits on top of this component's rich text editor tooltip

The tooltip is often partly off the screen

So we're thinking of disabling it outright for mobile devices. Is there a prop or something similar we can do to disable the tooltip?
Any other thoughts or suggestions? It looks like medium.com for instance doesn't allow rich text editing on mobile devices. You need to use the desktop or download their native app (which extends the native toolbar and keyboard).

Next update will have option to disable toolbar.

Great thanks @brijeshb42 Just drop me a note here when you do that update, and I'll do the update on our end.

v0.3.12 has an option to disable toolbar using disableToolbar prop. Set it to true to disable it.

Awesome. Thanks.
We're using it like this now..
    // check to see whether this device is a touchscreen. If so, disable the tooltip editor
    const isTouchDevice = 'ontouchstart' in document.documentElement;

    return (
      <Editor
        editorState={this.state.editorState}
        onChange={this.onChange}
        inlineButtons={INLINE_BUTTONS}
        disableToolbar={isTouchDevice}
        blockButtons={BLOCK_BUTTONS} />
    );


🐛 [Postgres 15] Postgres logs, network error

Description
Unable to read and check the Addon logs. When I restart the addon I see only some logs and the rest is not visible.
Current version: 15.7-4

Reproduction steps
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Addon Logs
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
/etc/cont-init.d/20-folders.sh: executing
/etc/cont-init.d/99-run.sh: executing
[11:10:57] WARNING: Using existing config.env file in /config.
[11:10:57] INFO: Starting the app
Everything started!
[11:10:57] INFO: Waiting for port 5432 to open...
PostgreSQL Database directory appears to contain a database; Skipping initialization
2024-12-12 11:10:57.349 CET [232] LOG:  starting PostgreSQL 15.7 (Debian 15.7-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-12-12 11:10:57.349 CET [232] LOG:  listening on IPv4 address "<IP_ADDRESS>", port 5432
2024-12-12 11:10:57.349 CET [232] LOG:  listening on IPv6 address "::", port 5432
2024-12-12 11:10:57.360 CET [232] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-12 11:10:57.375 CET [265] LOG:  database system was shut down at 2024-12-11 02:00:03 CET

Architecture
amd64
OS
HAos

Seems if was an issue with my HAOS, after updating HAOS to latest release and restarting HAOS


Bad multi cursor paste behaviour

Have a document, for example with the following content
first

first

first

Select "first" and press ctrl+D, such that there is a cursor on each instance.
Have some content in your clipboard, for example
if (err instanceof vscode.LanguageModelError) {
                    console.log(err.message, err.code, err.cause)
                }

Paste. Notice that there is only one copy of the pasted content. There should be 3 (for each cursor) 🐛
This gets a bit more obscure with real life examples.
I can reproduce with Stable, so this might be intended behavior / older bug. I just do not find it practical and it breaks my flow.

What is your editor.multiCursorPaste setting?

@gjsjohnmurray good point editor.multiCursorPaste is to spread.
So I guess my point is that it should be full by default.
@gjsjohnmurray have you noticed other users struggling with this? Or am I the first?

Joao reported a similar issue some days ago (which I closed).

cc @joaomoreno to get his thoughts on this.


Add docs for conversion tool

conversion tool "docs" link should then point to new section on docs site

@fforbeck tagging you over here (feel free to close if not relevant)

@outkaj what sort of documents we are talking? The code documentation, design etc or about how to use the conversion tool?

Hmm. I think it would be more the latter

Thanks. I will come up with something and might need your help to review it later.

Sounds good! Would be happy to review.


[Cherry-pick]Async generate diskann cache after  deserialize

cherry-pick pr: https://github.com/zilliztech/knowhere/pull/191 from knowhere-1.x
issue:https://github.com/zilliztech/knowhere/issues/216

/approve
Plz cp to 2.2 branch

/lgtm


cmd/objdump: symbolization of global variable doesn't work for shared objects

What operating system and processor architecture are you using (go env)?
darwin/amd64
What did you do?
package main

var X int

//go:noinline
func F() { X = 5 }

func main() { F() }

$ go build p
$ go tool objdump -s "\.F$" p
TEXT main.F(SB) /tmp/p2/src/p/p.go
  p.go:6		0x104b3a0		48c7050553070005000000	MOVQ $0x5, main.X(SB)
  p.go:6		0x104b3ab		c3			RET
  :-1			0x104b3ac		cc			INT $0x3
  :-1			0x104b3ad		cc			INT $0x3
  :-1			0x104b3ae		cc			INT $0x3
  :-1			0x104b3af		cc			INT $0x3

The address of global variable is symbolized (main.X(SB)), which is nice.
But this is not correct for shared objects, e.g. plugin:
$ go build -buildmode=plugin p
$ go tool objdump -s "\.F$" p.so
TEXT _p.F(SB) /tmp/p2/src/p/p.go
  p.go:6		0x44670			4c8b3dc1090000		MOVQ __cgo_yield+200(SB), R15
  p.go:6		0x44677			49c70705000000		MOVQ $0x5, 0(R15)
  p.go:6		0x4467e			c3			RET
  :-1			0x4467f			cc			INT $0x3

Note the __cgo_yield+200(SB), which should actually be X in the GOT, like what compile -S prints
	0x0000 00000 (/tmp/p2/src/p/p.go:6)	MOVQ	"".X@GOT(SB), R15
	0x0007 00007 (/tmp/p2/src/p/p.go:6)	MOVQ	$5, (R15)

cc @aarzilli

Thanks for looking into it.
I haven't looked into the detail about the names in GOT, but apparently Mac otool can tell the name:
_p.F:
0000000000044710        movq    0x921(%rip), %r15 ## literal pool symbol address: _p.X
0000000000044717        movq    $0x5, (%r15)
000000000004471e        retq
000000000004471f        int3

Linux objdump also kind of knows, with an offset which I don't yet understand:
00000000000a1b30 <p.F>:
   a1b30:       4c 8b 3d 79 c1 25 00    mov    0x25c179(%rip),%r15        # 2fdcb0 <p.X@@Base-0x1ec80>
   a1b37:       49 c7 07 05 00 00 00    movq   $0x5,(%r15)
   a1b3e:       c3                      retq
   a1b3f:       cc                      int3

So I guess there is a way to tell (but I haven't looked into it).

Linux objdump also kind of knows, with an offset which I don't yet understand:

Weird, that's not what it prints for me...

Likely related to #17883.


Remote functions: Some processEvent unit tests

Good call outs - the event payload processing happens in different spots (extractFunctionContext in app.ts, and enrichFunctionArgs in CustomFunction.ts), making unit tests for this problematic.
Going to close this PR but keep the branch around; the middleware system needs a desperate redesign anyways.


multiple device sync: how to set up sync-delay

Describe the bug

Hi, I was going through documents about multiple devices sync. I finally ended up here because I was wondering how to set sync-delay. I think this document should also be updated to avoid confusion. To be clear, I want to check with you that the following is the correct way to do multiple devices sync:
# for master
k4arecorder.exe --device 0 --external-sync master output-1.mkv
# for subordinate-1
k4arecorder.exe --device 1 --external-sync subordinate --sync-delay 0.16 output-2.mkv
# for subordinate-2
k4arecorder.exe --device 2 --external-sync subordinate --sync-delay 0.32 output-3.mkv

To Reproduce

Expected behavior

Logs

Screenshots

Desktop (please complete the following information):

OS with Version:
SDK Version:
Firmware version:

Additional context

Thanks, we will get that page updated.
For multi sync please review #530.
To set the sync-delay you choose the delay in micro seconds. The resolution is 11us, so anything smaller than that will be lost.
You should also start all the subordinates first and master last.
Here is a script I have used in the past for testing:
start "sub 1"  cmd /c k4arecorder.exe --device 2 -l 10 --imu off -r 5 -e -6 -d WFOV_UNBINNED -c 1080p --external-sync Subordinate sub1.mkv ^> sub1.mkv.txt
ping <IP_ADDRESS> -n 2 > null
start "sub 2"  cmd /c k4arecorder.exe --device 1 -l 10 --imu off -r 5 -e -6 -d WFOV_UNBINNED -c 1080p --external-sync Subordinate sub2.mkv ^> sub2.mkv.txt
ping <IP_ADDRESS> -n 3 > null
start "master" cmd /c k4arecorder.exe --device 0 -l 10 --imu off -r 5 -e -6 -d WFOV_UNBINNED -c 1080p --external-sync Master master.mkv ^> master.mkv.txt

It's strange. I don't see you pass anything into sync-delay in the above scripts. Is it intentional or a typo?


testing framework does not work with kpack image inline

Description of problem
When setting the Expect inline -
			Expect: cartotesting.TemplateTestExpectation{
				ExpectedObject: &v1alpha2.Image{
					TypeMeta: metav1.TypeMeta{
						Kind:       "Image",
						APIVersion: "kpack.io/v1alpha2",
					},
					ObjectMeta: metav1.ObjectMeta{},
					Spec: v1alpha2.ImageSpec{
						Tag:                "my-server/my-repo/my-workload-my-ns",
						ServiceAccountName: "default",
						Builder: corev1.ObjectReference{
							Kind: "ClusterBuilder",
							Name: "default",
						},
						Source: v1alpha12.SourceConfig{
							Blob: &v1alpha12.Blob{
								URL: "my-url",
							},
						},
						Build: &v1alpha2.ImageBuild{
							Env: []corev1.EnvVar{
								{
									Name:  "BP_OCI_SOURCE",
									Value: "my-rev",
								},
							},
							Services: v1alpha2.Services{},
						},
					},
					Status: v1alpha2.ImageStatus{},
				},
			},

The test will fail with -
    templates.go:87: expected does not equal actual: (-expected +actual):
          map[string]any{
          	"apiVersion": string("kpack.io/v1alpha2"),
          	"kind":       string("Image"),
          	"spec": map[string]any{
          		"build": map[string]any{
          			"env":       []any{map[string]any{"name": string("BP_OCI_SOURCE"), "value": string("my-rev")}},
        - 			"resources": map[string]any{},
        + 			"services":  []any{},
          		},

I would have expected the test to succeed.
Proposed solution

Figure out how to coerce kpack Image (and other CRDs) with empty values
Add an ignore fields option to the test where we can omit resources and services in this example
Use ExpectedFile instead of ExpectedObject (workaround) - it works
Use ExpectedUnstructured instead of ExpectObject (another workaround) - it works

Example
<Code snippets that illustrate the when/then blocks>
Additional Context

I think we should be looking at how reconciler runtime does a compare


What is the difference between react-hammerjs and react-Tappable? (question)

Sorry, if its obvious , I am just unclear.  I see that this library supports onTap event and you also have React-Tappable that does.

React-Tappable seems to be solving a specific problem, where as React-Hammer is a React wrapper for the very popular and more fully featured input event management library http://hammerjs.github.io/
If you just need taps and pinches, React-Tappable will be enough for you. If you need swipes, pans and rotates then React-Hammer has everything in React-Tappable plus all that extra stuff.


Reduced font size on abbr?

Is there a justification for reducing the font-size on <abbr> elements?  Maybe this should be a configurable setting (for SASS)?
    /* Abbreviations */
    abbr,
    acronym {
      text-transform: uppercase;
      font-size: 90%;
      color: $body-font-color;
      cursor: $cursor-help-value;
    }
    abbr {
      text-transform: none;
      &[title] {
        border-bottom: $acronym-underline;
      }
    }

I don't know what the reason is or when I'd want smaller. We'll accept a PR to delete that property. Thanks!

Merged in #6692


As a User, i want a consistent mechanism for reaching my project/venue APIs

Services will live in private subnets, and proper routing from an outer (public) API Gateway shall be in place.

This is being pushed to 23.2, and is covered by:
https://github.com/unity-sds/unity-cs/issues/205
https://github.com/unity-sds/unity-cs/issues/206
https://github.com/unity-sds/unity-cs/issues/207


Miscellaneous code style and inspection fixes

Nice improvements @fviernau! @maxhbr might be interested in these.


Hand tracking landmarks - Z value range

I am failing to find any kind of documentation or example that would explain the exact definition/behavior of the estimated Z coordinates returned by the hand tracking graph.
We're able to successfully extract the landmark data as X, Y and Z coordinates. The X and Y coordinates are clearly normalized but the Z coordinates appear to take values to which I have no reference (they are not normalized, they are sometimes negative, sometimes positive and don't appear to adhere to any coherent scale. Clear is: They are most likely relative to each other.
Could somebody shine some light on the estimated Z coordinates - especially the scale they adhere to?

I am wondering about this also.

Normalized X gives 0 to 1 where x-origin is origin of the image x-coordinate
Normalized Y gives 0 to 1 where y-origin is origin of the image y-coordinate
Normalized Z gives 0 to 1 where z-origin is relative to the wrist z-origin. I.e if Z is positive, the z-la ndmark coordinate is out of the page with respect to the wrist. Z is negative, the z-landmark coordinate is into the page with respect of the wrist.

Thanks for responding. Can you just clarify "out of the page" and "into the page" in the case of mobile phone (Android/iOS). Does "into" mean closer to device/camera?

@brianm-sra Take a piece of paper facing you. Into the page means moving away from the page and away your face. Out of the page means moving means closer to your face.

Well, they are normalized values (range [0..1]). Simply scale by the frame dimensions to determine the pixel-based location:
int x = landmark_normal_x * image.width();
int y = landmark_normal_y * image.height();

@mgyong  You wrote that "Normalized Z gives 0 to 1" but that is NOT what I am seeing on Android as output from NormalizedLandmark.getZ() . Instead I have seen larger and smaller values ranging from approximately -80.0 to +80.0 in different tests. Here are a couple of examples from a recent test with my app based on the 3D version of hand tracker graph. Note Z values are outside of 0 to 1 range. Also I am curious how to determine how far "paper" is from Android phone camera.

Weak-perspective projection is an orthographic projection plus a scaling, which serves to approximate perspective projection by assuming that all points on a 3D object are at roughly the same distance from the camera.
The justification for using weak-perspective is that in many cases it approximates perspective closely. In particular for situations when the average variation of the depth of the object (delta Z) along the line of sight is small, compared to the fixed average depth (Z avg). This also allows objects at a distance not to distort due to perspective, but to only uniformly scale up/down.
The z predicted by the model is relative depth, based on the Zavg of "typical hand depth" (in the case of holding a phone with one hand and the other is tracked, or being close to the phone and showing both hands).
Also, the range of z is unconstrained, but it is scaled proportionally along with x and y (via weak projection), and expressed in the same units as x & y.
There is a root landmark point (wrist) that all the other landmark depths are relative to (again normalized via weak projection w.r.t. x & y).

I added some code in my Android app to keep track of minimum and maximum Z values observed,
and tested while moving my hand near/far, different angles, etc.
At the end of running the test, the minimum Z observed was -198.0 and maximum Z observed was 168.0. Does this make sense? Are these in line with expected minimum and maximum values of Z
for 3D hand tracking graph ?
These are coming from NormalizedLandmark getZ()

@brianm-sra  Do you figure out how far "paper" is? Can anyone explain clearly about how to convert z to 3d camera coordinate

Hi @jiuqiant & @mgyong , @Tectu , @mcclanahoochie  , Please help
After reading all the contents above I am still unknown on which scale value of z depends. How z coordinate is getting change. x an y depend on screen on which pixel of the screen the landmark lies. But It is sure that z should be used as depth or distance of landmark from the device camera. But please clarify how it changes it's value.. on which thing value of z coordinate depends. Please help

Any update on this? I am also not clear on how to use the z value to get 3d coordinates. Is there a way to get the value of Z avg at least?

@mgyong You wrote that "Normalized Z gives 0 to 1" but that is NOT what I am seeing on Android as output from NormalizedLandmark.getZ() . Instead I have seen larger and smaller values ranging from approximately -80.0 to +80.0 in different tests. Here are a couple of examples from a recent test with my app based on the 3D version of hand tracker graph. Note Z values are outside of 0 to 1 range. Also I am curious how to determine how far "paper" is from Android phone camera.
 I've been trying but nothings working for me

As I tried in iOS,
wrist landmark's (landmark 0) z position is relative to camera and it changes between -0.0003 (nearest) and -0.00001 (farthest) in my tests. Farthest depends on my arm length, it may be different on your case.
And it seems other landmarks's z estimations are relative to wrist landmark. If it's far from wrist value is positive, if closer than wrist then it's negative.
Thanks for the explanation @mcclanahoochie.

As I tried in iOS,
wrist landmark's (landmark 0) z position is relative to camera and it changes between -0.0003 (nearest) and -0.00001 (farthest) in my tests. Farthest depends on my arm length, it may be different on your case.
And it seems other landmarks's z estimations are relative to wrist landmark. If it's far from wrist value is positive, if closer than wrist then it's negative.
Thanks for the explanation @mcclanahoochie.

In iOS, I see landmark 0 z value changes when I rotate my hand even i keep wrist stable.
I recorded values of wristZ (wristZ * image_width), Y distance from wrist to top of middle finger (wristTotop), square of wristTotop, difference of wrist z and middle finger top Z (zDist), and draw a chart. It seems there is an inverse proportion between wrist Z and square of wristTotop.
While recording this my left hand's wrist is stable, I rotate my hand up to 30 degrees right.

In iOS, I see landmark 0 z value changes when I rotate my hand even i keep wrist stable.
I recorded values of wristZ (wristZ * image_width), Y distance from wrist to top of middle finger (wristTotop), square of wristTotop, difference of wrist z and middle finger top Z (zDist), and draw a chart. It seems there is an inverse proportion between wrist Z and square of wristTotop.
While recording this my left hand's wrist is stable, I rotate my hand up to 30 degrees right.

@mcclanahoochie perhaps it would be nice to further elucidate and motivate why the weak projection model was chosen in the design of the model training, if possible.

@mcclanahoochie perhaps it would be nice to further elucidate and motivate why the weak projection model was chosen in the design of the model training, if possible.

Could someone please explain cleary what represents the value of the Z-Axis?
I also experienced that my values from the z-Axis change a lot only if i move my hand a little bit.

Hi, the z-coordinate is centered at wrist and we use an arbitrary scaling factor to normalize the output from the model. You can consider it as more like a 2.5D vs true 3D in world coordinate. The idea is to provide relative position of the finger joints, e.g. which joint is closer. We are working on a new version of the hand model that should provide much better z-coordinate. The previous version is very limited as we only used projected synthetic dataset.
https://github.com/google/mediapipe/blob/ae05ad04b3ae43d475ccb2868e23f1418fea8746/mediapipe/modules/hand_landmark/hand_landmark_gpu.pbtxt#L138

Just to be precise, am I correct in the following assumptions about calculating z and coordinates in general?
Let l::21x3 be landmarks of one hand in absolute coordinates with origin in camera, s is the side of square picture, f is the focal length of camera, i.e absolute z coordinate of projection plane, z_avg is average z-coordinate, then
def absolute_to_mediapipe(l, z_avg, f):
  l_normalized = l / s
  z_avg_normalized = z_avg / s

  # weak orthographic projection
  l_weakly_projected = np.empty((21, 3))
  l_weakly_projected[:, [0, 1]] = l_normalized / z_avg * f
  l_weakly_projected[:, [2]] = l_normalized / z_avg_normalized # == l / z_avg

  # move origin to wrist by z
  l_wrist_relative[:, 2] = l_weakly_projected[:, 2] - l_weakly_projected[0, 2]

  # move x, y origin to left top corner (we assume that 'y' axis is already looking down)
  l_decentered[: [0, 1]] += 0.5

  return l_decentered

Hi, the z-coordinate is centered at wrist and we use an arbitrary scaling factor to normalize the output from the model. You can consider it as more like a 2.5D vs true 3D in world coordinate. The idea is to provide relative position of the finger joints, e.g. which joint is closer. We are working on a new version of the hand model that should provide much better z-coordinate. The previous version is very limited as we only used projected synthetic dataset.

Does it mean that the current version cannot provide exact 3D coordinate values, and the current z value can only be considered as a reference to tell which joint is closer to the wrist?

Well, they are normalized values (range [0..1]). Simply scale by the frame dimensions to determine the pixel-based location:
int x = landmark_normal_x * image.width();
int y = landmark_normal_y * image.height();

It's working on some devices and in some devices it's not showing correct output. Do you have any other solution for it, if yes please let us know.
Thank you

Interestingly, version 0.8.6 claims 3D positioning for the Pose and Holistic models whereby the Holistic model is as I understand one that includes the Hands model in its pipeline. It's hard to tell by the brevity of the description there what exactly to expect for hand tracking also and in general: are the predicted 3D coordinates real-world as in distance from the camera, or are they indeed relative distances from the center of the hips?

We are closing this issue now as we see the main query is answered in this thread at https://github.com/google/mediapipe/issues/742#issuecomment-637162399.  Please add new issues with new questions rather adding it in the below thread. Thanks!

Thanks, so I gather from that comment that version 0.8.6 claims 3D positioning for the Pose and Holistic models does not imply any changes to the hands model, which is informatively helpful. Thank you.

The hand model uses "scaled orthographic projection" (or, weak perspective), with some fixed average depth (Z avg).
Weak-perspective projection is an orthographic projection plus a scaling, which serves to approximate perspective projection by assuming that all points on a 3D object are at roughly the same distance from the camera.
The justification for using weak-perspective is that in many cases it approximates perspective closely. In particular for situations when the average variation of the depth of the object (delta Z) along the line of sight is small, compared to the fixed average depth (Z avg). This also allows objects at a distance not to distort due to perspective, but to only uniformly scale up/down.
The z predicted by the model is relative depth, based on the Zavg of "typical hand depth" (in the case of holding a phone with one hand and the other is tracked, or being close to the phone and showing both hands).
Also, the range of z is unconstrained, but it is scaled proportionally along with x and y (via weak projection), and expressed in the same units as x & y.
There is a root landmark point (wrist) that all the other landmark depths are relative to (again normalized via weak projection w.r.t. x & y).

Excuse me, what's the meaning of "scaled proportionally along with x and y (via weak projection)"? I haven't found any information about how to scale the Z axis like below. Thanks!
int x = landmark_normal_x * image.width();
int y = landmark_normal_y * image.height();

@mgyong You wrote that "Normalized Z gives 0 to 1" but that is NOT what I am seeing on Android as output from NormalizedLandmark.getZ() . Instead I have seen larger and smaller values ranging from approximately -80.0 to +80.0 in different tests. Here are a couple of examples from a recent test with my app based on the 3D version of hand tracker graph. Note Z values are outside of 0 to 1 range. Also I am curious how to determine how far "paper" is from Android phone camera.

Sorry for re-opening. I believe the matter can be re-addressed for the better, now that world landmarks are a feature in the newest pipeline releases. The terse documentation for world landmarks v.s. those weak projection landmarks could be probably elaborated in a clarifying way, if needed from the point of view of the network's training data's coordinate system (model card doesn't help much). As we don't have the original data calibration details of the training data nor the loss function involved in training the latest network to output both types of outputs in order to determine this, a more canonical definition would be much implied.
I'm not sure whether still-ambiguous statements like these are a real definition:

Real-world 3D coordinates in meters with the origin at the hand’s approximate geometric center

Is it hand or palm? does approximate come from prediction errors whereas the synthetic training data used the exact geometric center? what anatomy is meant here as a hand's geometric center, is that center of the palm?
It may seem that the so dubbed world landmarks output data (MULTI_HAND_WORLD_LANDMARKS) would be some approximation of the real 3D thing whereas the non-world landmarks are some form of weak projection which had characterized a more raw treatment of the training data initially. But I believe more definitive guidance would really make this all much more really useful.
For example, it's cool to say "approximate" to imply the inevitable drift and error in the neural network's outputs; I just think you may clarify through the language of training data to alleviate that source of ambiguity and thus concentrate on really describing the coordinate system, hopefully the training data was uniform enough to allow.

I think a good place to start would be some authoritative clarification about the variance in the z value of the wrist landmark, which is supposed to be the basis for the rest of the z, or the zero value without much variance. I think it may well avoid a lot of complication if this was clarified from the viewpoint of the training data, rather than to craft cumbersome narrative descriptions of "what to expect" in the output.
Here's a minimally reproducing example where one may observe by moving their hand an axis from near to far from the camera:

substantial variance of the z value across hand capture frames, v.s. the magnitude of the x and y values
no direct correlation between the z value and the distance from the camera.

This could be explained if the model predicts the z value rather than really setting it to 0, but other explanations inherent to the internals of the tensorflow model may be more truthful.
Here's then the hand landmark tracking code taken just now from the official documentation, with the addition of console logging for the wrist values, to help observe (or contradict) this observation with one's computer connected camera.

"""
minimally complete reproducible verifiable example of the z coordinates documentation mismatch
initial base code credit: https://google.github.io/mediapipe/solutions/hands#python-solution-api
"""
from os import system

import cv2
import mediapipe as mp
mp_drawing = mp.solutions.drawing_utils
mp_drawing_styles = mp.solutions.drawing_styles
mp_hands = mp.solutions.hands

cap = cv2.VideoCapture(0)
with mp_hands.Hands(
    model_complexity=0,
    min_detection_confidence=0.5,
    min_tracking_confidence=0.5) as hands:
  while cap.isOpened():
    success, image = cap.read()
    if not success:
      print("Ignoring empty camera frame.")
      # If loading a video, use 'break' instead of 'continue'.
      continue

    # To improve performance, optionally mark the image as not writeable to
    # pass by reference.
    image.flags.writeable = False
    image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
    results = hands.process(image)

    # Draw the hand annotations on the image.
    image.flags.writeable = True
    image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
    if results.multi_hand_landmarks:
      for hand_landmarks in results.multi_hand_landmarks:
        mp_drawing.draw_landmarks(
            image,
            hand_landmarks,
            mp_hands.HAND_CONNECTIONS,
            mp_drawing_styles.get_default_hand_landmarks_style(),
            mp_drawing_styles.get_default_hand_connections_style())
    # Flip the image horizontally for a selfie-view display.
    cv2.imshow('MediaPipe Hands', cv2.flip(image, 1))

    system('clear')  # clears the console
    if results.multi_hand_world_landmarks:
        for hand_landmarks in results.multi_hand_world_landmarks:
            for idx, landmark in enumerate(hand_landmarks.landmark):
                if idx in [0]:
                    print(f'writs landmark: x={landmark.x:+.2f}, y={landmark.y:+.2f}, z={landmark.z:+.2f}')
            print()
    else: print("no landmarks detected on this frame")

    if cv2.waitKey(5) & 0xFF == 27:
      break
cap.release()

It becomes clear to me now that the world landmarks are just a set of meter valued predictions of the distances of the landmarks to the middle of the hand as detected. Roughly from the middle finger MCP. They are world landmarks not in terms of any distance from the camera or position in the scene, but in terms of the geometry of the hand in the world rather than in image capture geometry. Of course, the predictions will be noisy, since it's only as accurate as the trained model gets on real world images.
So the world landmarks describe the hand object in terms of the distances of its landmarks from one another, regardless of the position in the captured image which the non-world landmarks predict. And of course it's noisy, and somewhat meaningless in being based on a fuzzy population average, given that the model was not trained to explicitly learn sizes. It can't really predict the distances between the landmarks other than in the sense of the distribution of hand sizes it's seen during training. But this is a meaningful signal in terms of hand pose, it meets or at least corresponds with what a pose is ― the relationship of the body parts to one another.
At the level of the details, the origin of this coordinate system is derived from "the center of the hand bounding box calculated from the landmarks (which is mentioned in the code comment from above), which is a calculation implemented in a somewhat heuristic calculator. It must be a fair/good heuristic which comes to smooth error size that would arise on average if using on just a single prediction (such as the index finger MCP alone) as the origin position.
So the Z value of world landmarks is a meter value estimation compared to that middle position, and it can be used for hand pose calculations (and obviously not for distance from camera and such), and it's not an arbitrary scale like the non-world z value is.

Regarding the non-world landmarks, their x, y part is simply the viewport (image) position as predicted by the pipeline, no complications there. They range from 0 to 1 so as to fully span the image width and height.
Unlike the case with the "world landmarks", the z value of the non-world landmarks is always zero-ish for the wrist landmark, which serves as the z-axis origin for the z values of all other hand landmarks.
So the z value of the non-world landmarks could be used for comparing z axis order between landmarks and between landmarks across frames, if you're not too concerned about weak projection. The z values vary proportionally to the proximity to the origin of the z axis of the camera and image. This is unlike the z values of the "world landmarks", which are consistent (up to prediction error) regardless of their position on the camera/image z axis.
So as is, it may be a little ambiguous to rely on the z values of the non-world landmarks as a consistent depth measure.

Hello everyone,
Based on what I read and got, Z value does not act as the world Z axis. So it is not possible to estimate the arm angle using normal math formulas.
is it?

Hello,
Can somebody explain me if world coordinates are inferred from normalized landmark plus some technique or is they are empirically estimated by the neural network as normalized coordinates? Is there any official documentation I can quote in my paper?

Reading through the issue, I still can't find the correct formula to denormalise the z coordinate.
To denormalise x, y of landmark i, I simply multiply by screen size:
const x = landmarks[i].x * video.width;
const y = landmarks[i].y * video.height;

For z it should be something like
// index 0 is wrist, which is root for the rest of landmarks
const wristZ = landmarks[0].z * video.width;

// index i is the rest of landmarks
const z = wristZ + landmarks[i].z;

But this does not work, few problems:

magnitude - the wrist z value has exponent of e-7 which is small number, while the rest of landmarks is like 0.002
unclear if the multiplication for screen/camera size should happen for each landmark or wrist only?

Here is python implementation which does 3D projection out of the normalised landmarks coordinates (image mode)
https://github.com/geaxgx/depthai_hand_tracker/tree/main/examples/3d_visualization
And here is line where denormalisation is happening.
https://github.com/geaxgx/depthai_hand_tracker/blob/main/examples/3d_visualization/demo.py#L76
But the landmarks appear to be some points, not raw data from the mediapipe, so I still can't get it working.
Also you can note the magic number 0.4 which is the scaling factor mentioned above https://github.com/google/mediapipe/issues/742#issuecomment-865663115 and it seems important given the python implementation uses it and works properly.
Maybe the author @geaxgx could help with the formula.
So the z denormalisation, in order to get approximate wrist depth is necessary to get all 3 coordinates, so we can unproject into 3D world.

https://github.com/geaxgx/depthai_hand_tracker/tree/main/examples/3d_visualization
Hi Did you figure out the way depthai to denormalized the z-coord ? Thanks ！

Dear mcclanahoochie thanks for having taken the time to draft that. I have revisited this every few months while learning about projective geometry. Maybe this discussion better fits outside a ticket, more broadly and patiently scoping it as "model output semantics". Perhaps you might be able to comment below and help wrap up how things are:
As I understand, it has been chosen to have the model receive as its input (during training and during inference) quite regular consumer-grade camera full-perspective projection images where depth information is likely not included (a) and synthetic data drawn from hand models where relative depth is included in the input (b). Or perhaps during training depth information has been predicted from the synthetic data by a proxy model, to augment the first data.
As it relates to the pipeline outputs, my understanding is that it breaks down to two sets of output:

A weak orthographic projection output set ('landmarks' in mediapipe api parlance), which naturally supports the ubiquitous use case of visualizing hand anatomy (such as overlaying it on top the input image or displaying an artificial hand drawn from the landmarks, on a display). Orthographic projection makes sense here, and including the z value is a bonus.

A second output set depicting the relative positions of the hand's landmarks to some hand middle ('world landmarks' in the documentation parlance) whose projection semantics remain yet a little elusive to me after all this time. I think that explaining the role of a Z average of "typical hand depth", and the meaning and role of a "typical hand depth" would be something to shed more light on for enabling full clarity for some of us humans out here.

As I understand it, those last relative positions bear little credibility in terms of the absolute worlds sizes, other than lending themselves to be used for segment proportions and angle calculations, as the model's notion of size would draw from the distribution of size in its training data, whereas its predictive power at predicting the size of a hand in a picture would be weak (it might be very surprising if it would be accurate to predict the size from the visual features of a hand beyond being correct in some average data distribution sense).
I think the quoted comment has been the only online discussion of the output semantics beyond the rightfully terse wording in the documentation, so it would be wonderful to have a more rigorous explanation.
(And maybe a rigorous explanation which closely follows the model inputs preparation for training and/or the training loss would be an easy conducive way for reigning in the greatest clarity)

The hand model uses "scaled orthographic projection" (or, weak perspective), with some fixed average depth (Z avg).
Weak-perspective projection is an orthographic projection plus a scaling, which serves to approximate perspective projection by assuming that all points on a 3D object are at roughly the same distance from the camera.
The justification for using weak-perspective is that in many cases it approximates perspective closely. In particular for situations when the average variation of the depth of the object (delta Z) along the line of sight is small, compared to the fixed average depth (Z avg). This also allows objects at a distance not to distort due to perspective, but to only uniformly scale up/down.
The z predicted by the model is relative depth, based on the Zavg of "typical hand depth" (in the case of holding a phone with one hand and the other is tracked, or being close to the phone and showing both hands). Also, the range of z is unconstrained, but it is scaled proportionally along with x and y (via weak projection), and expressed in the same units as x & y.
There is a root landmark point (wrist) that all the other landmark depths are relative to (again normalized via weak projection w.r.t. x & y).

To get a more intuitive understanding of how the model coordinates work I recommend taking a look at this web-implementation:
https://codepen.io/mediapipe/pen/RwGWYJw
You can see that the output model is never translated, only its orientation is changing

The hand model uses "scaled orthographic projection" (or, weak perspective), with some fixed average depth (Z avg).
Weak-perspective projection is an orthographic projection plus a scaling, which serves to approximate perspective projection by assuming that all points on a 3D object are at roughly the same distance from the camera.
The justification for using weak-perspective is that in many cases it approximates perspective closely. In particular for situations when the average variation of the depth of the object (delta Z) along the line of sight is small, compared to the fixed average depth (Z avg). This also allows objects at a distance not to distort due to perspective, but to only uniformly scale up/down.
The z predicted by the model is relative depth, based on the Zavg of "typical hand depth" (in the case of holding a phone with one hand and the other is tracked, or being close to the phone and showing both hands). Also, the range of z is unconstrained, but it is scaled proportionally along with x and y (via weak projection), and expressed in the same units as x & y.
There is a root landmark point (wrist) that all the other landmark depths are relative to (again normalized via weak projection w.r.t. x & y).

Where can we find the details about the "typical hand depth"? For instance  Mediapipe Face provides a canonical face model together with weights, that can be used to calculate scale and project coordinates. Is it possible to calculate scale with Hands at all?

They are not normalized to [0,1]


Release 0.1.0

When is this going to be released?

I've been a little busy. Expect something in early January after the holidays are done

Alright got around to this finally. 0.1.0 is now available!


Fix setting default CachitoAPI timeout to None

The CachitoAPI class expects either an integer or None. Setting it to
False makes it forward an invalid value to the API.
Signed-off-by: Athos Ribeiro<EMAIL_ADDRESS>Maintainers will complete the following section

[x] Commit messages are descriptive enough
[x] Code coverage from testing does not decrease and new code is covered
[x] JSON/YAML configuration changes are updated in the relevant schema
[x] Changes to metadata also update the documentation for the metadata
[x] Pull request has a link to an osbs-docs PR for user documentation updates
[x] New feature can be disabled from a configuration file

No Release notes added. Fix for https://github.com/containerbuildsystem/atomic-reactor/pull/1494, which was introduced in this release cycle.


Update HardwareSerialRS485_Helper.h

Added more ports (now matches also ArduinoMega)
Changed TRx_PORT and DDR type to uint16_t to allow all ports of Arduino Mega (e.g. PORTH)

Erm this is no good, breaks for modules without such ports :) Gonna make better version soon.


[DO NOT MERGE] update docs for Lifecycle V2 enhancement

[Note] This PR should be merged after the Lifecycle extensions are released.
Update the Edge Lifecycle docs to present the changes in the Lifecycle V2 module.
https://github.com/adobe/aepsdk-core-android/pull/650
https://github.com/adobe/aepsdk-core-ios/pull/1020
Here is the screenshot of the updated page:

The iOS version is 5.1.0

@praveek @kevinlind @calebk1  Your review comments have been addressed. Here is how the statement looks:


Code Quality Fix - Printf style format strings

DevFactory is committed to improving code quality and advancing open source. Our team contributes their time to researching and identifying areas for code quality improvement in open source projects. We identified a fix for NanoHTTPD.
This pull request is focused on resolving occurrences of Sonar rule squid:S2275 - “Printf-style format strings should not lead to unexpected behavior at runtime”. You can find more information about the issue here: https://dev.eclipse.org/sonar/rules/show/squid:S2275
Please let me know if you have any questions. There is more to come.
Christian Ivan
DevFactory - Code Cleanup Team

sorry but this one is wrong, we do not want a platform specific newline here that's why there is a "\r\n" but thanks anyway to do these quality improvements.  (we had this one already)


[Core] Memory usage keeps going up over time

Burrow version: 0.23.1+2018-11-14T18:42:35Z (linux 64-bit binary from 'releases' page)
OS: Ubuntu 16.04.2 LTS
A 2-node setup was created, both burrow processes were running on the same machine. Then, for about 64 hours:

Every 10 minutes, a batch of 50 contracts was deployed
Every 5 minutes, 1 contract was deployed and 100 transactions were made to this contract (a setter function was called, which also emitted an event)
Every minute, the CPU and memory usage of one of the burrow processes were logged as CSV data
Every 5 minutes, the total size of the blockchain directory of one of the burrow processes was calculated and logged as CSV data
Empty blocks enabled, one block every 1s

Disk & CPU seemed normal. Memory kept going up however, (up to 1 GB). Possibly a memory leak?
I've made some graphs...

(note: 'seconds' should be 'milliseconds' in those graphs)
raw_data.txt
contract.sol.txt

Thanks for this excellent report.
Just to pull in what I mentioned on rocket chat:
If you change Enabled = true in the burrow.toml in:
  [RPC.Profiler]
    Enabled = false
    ListenAddress = "tcp://<IP_ADDRESS>:6060"

then if you have Go installed once the memory is ramped up a bit run
go tool pprof -top http://localhost:6060/debug/pprof/heap
If you are able to do this I might be able to get to an understanding before spending a lot of time on reproduction.

OK a ran a new experiment, similar to the original one, but with all time intervals a factor of 1/30. Because this time, I wasn't so much interested in whether the burrow processes would run without crashing for a long amount of time, I just wanted to reproduce the memory usage problem. So this time:

Every 20 seconds, a batch of 50 contracts was deployed
Every 10 seconds, 1 contract was deployed and 100 transactions were made to this contract (a setter function was called, which also emitted an event)
Every 2 seconds, the CPU and memory usage of one of the burrow processes were logged as CSV data
Every 10 seconds, the total size of the blockchain directory of one of the burrow processes was calculated and logged as CSV data
Empty blocks (burrow setting) disabled

Again it was a setup with 2 validator burrow processes on the same machine: let's call them A and B. A was added as a persistent peer to B. So A was started first. This time I noticed only B had very high memory usage (almost 3 GB after 5000 deployed contracts), A was around 90 MB.

Luckily it was process B that I had configured to expose the profiler, here's the output:
pprof-output.txt
Here's the raw CSV data of CPU, memory, disk usage, number of deployed contracts and other transactions over time:
raw_data2.txt
The contract that was deployed was still the same as in the original experiment.

Ran the same experiment one more time, now only with half the load (time intervals * 1/15 instead of * 1/30). Again high memory usage in "process B".

Was able to run pprof before things got out of hand like they did last time: pprof-output2.txt
And again, the raw CSV data on which the graph is based: raw_data3.txt

@joeriexelmans thank you for that, graphs are very clear.
Are you able to able to post the scripts you used for your test? That will really help with out with our reproduction.
Thank you very much!

Here's the script (edited a little, moved all the hardcoded stuff to the top)
experiment.js.txt
Ran it again, this time monitoring the memory usage of both burrow processes. Also this time sent all transactions to process A instead of B. This time the memory usage of A was much higher, so it seems the process that gets sent the transactions has much higher memory usage. Memory usage of B also kept ever-increasing as you can see:

As you can see, I kept running it until no more transactions would complete (basically kept running it until things broke).

I put up a public repository with the experiment also. Contains scripts to start a single or 2-node setup:
https://bitbucket.org/tmining/burrow-experiments

Added mem-usage.js script to the repo. I advice to run that script instead. It will wait for earlier batches of txs to complete before sending new batches, not overloading the burrow node, like it happened in some of my experiments above. The fact that a 2-node burrow setup breaks when sending too many transactions is a possibly different issue but not of interest here.
Also when I restart the burrow processes, memory usage is low again and goes up like before as I continue to send transactions. So probably just a memory leak.

For burrow itself it shouldn't matter because I used to released binary.
The pprof was done with go1.10.4.

I haven't been able to recreate the memory leak in the QueryParser that you saw. I have a hunch that it might be due to event subscriptions building up under load (we use event subscriptions to return the TxExecution during the BroadcastTxSync.
However, the fact we are query parsing at all is unnecessary and I have optimised this on develop with #974. @seanyoung is going to take a more careful look and reproduce what you are seeing - but if you have any time in the meantime could you have a go with latest develop and see if you see the issue.
One thing we have observed is the go runtime tends to be reserving quite a bit more memory than that which is shown on pprof heap. Some of this is likely to be down to caching, but not all.
Thanks for you effort on this, definitely in top spot for best issue of 2018 :)

Had another look over you graphs - and I think this all deserves a bit more reproduction but I had some additional thoughts:
You did three experiments:

Long-running, low load (deploys every 10 minutes)
Short-running, highest load (deploys every 20 seconds)
Short-running, medium load (deploys every 40 seconds)

Experiment 1 is the one I would most like to see the pprof output from - I wonder if you would be able to re-run it to see if the same behaviour occurs? The load is so low - much lower than we have test chains for I think that it i surprising to see this memory use
In 2 I believe the load saturated the CPU which caused subscriptions in our event system to mount up. This manifest as a very large allocation to Query (held here: https://github.com/hyperledger/burrow/blob/develop/event/pubsub/pubsub.go#L62) but under CPU saturation I believe the reason for it is failure to unsubscribe listeners, which is possilbe if the context on an unsubsribe times out or otherwise completes: https://github.com/hyperledger/burrow/blob/develop/event/pubsub/pubsub.go#L132 (note we handle the unsubscribe in a defer statement - https://github.com/hyperledger/burrow/blob/develop/execution/transactor.go#L90 though we do use the background context - so not entirely clear what this would lead to.
In any case I am fairly confident that the CPU saturation will be mostly down to logging, i.e. I notice you have set ExcludeTrace = false (which makes sense for debug I agree!) but this generates a large amount of logging and also by default does a certain amount of post-processing on the log output to give it nice formatting. Really their ought to be a health-warning onExcludeTrace = false - for production or performance testing this should be disabled. In experiment 2 you are still only doing 12.5 transactions per second. In my rather more adhoc testing (and in integration tests) I have seen Burrow comfortably handle 600+ tps with non-trivial contracts. Admittedly that tends to be more bursty. I think trace logging gets pretty ridiculous under high transaction load.
In experiment 3 we see heap allocation that is pretty much as expected. The system memory does grow - and this is something I have seen locally too - that system memory allocation is a significant multiple of heap allocation. There are a few possible reasons:

We are leaking non-heap memory (i.e. stack) which will be a bit harder to debug (see https://github.com/golang/go/issues/15848)

The Go runtime is hanging on to a lot of system memory that is has internally released to optimise its own allocations (it's not inconceivable Go is behaving badly in respect of some heuristic is uses for releasing memory - this is rather old so probably no longer applies but something like it might: https://stackoverflow.com/questions/16516189/why-total-mb-in-golang-heap-profile-is-less-than-res-in-top)

Memory is just not getting GC'd quickly enough

New "Experiment 1" still running, 26 hours have gone by, 7229 contracts deployed and 27,900 non-deployment txs sent:

I'll keep it running for as long as possible

Update on the "low load experiment". Still running for almost 7 entire days! About 50,000 deployed contracts and 200,000 non-deployment txs.

Memory usage has kept increasing. CPU usage looks high but in fact isn't (it's just that there are so many data points on the graph (as an SVG file it's 60 MB!), you cannot see that most of the time both burrow processes use about 1% CPU)
I was able to restart both burrow processes, and continue to use the existing data directory and make transactions. After restart, memory usage is about 100 MB.

@joeriexelmans do you have any further experience with this?
We have identified certain issues with our storage layer that may go some way to explaining - namely compaction in leveldb and some allocation issue as the tree gets deep.
There are some partial fixes from upstream, and we are looking into changing our state more radically longer term.

No I haven't looked further into it. It's not a blocking problem for us, since we can just restart the burrow process every now and then.

Ah so you definitely see this leak in production? It's not something we see on our long running chains. Does it seem to be unbounded?

No, we haven't got any long-running burrow processes in production, or at least none that see more than tens or hundreds of transactions a week.
If you don't have this problem, then I think this issue can be closed for now.


Add a Gitter chat badge to README.md

redguide/locales now has a Chat Room on Gitter
@guilhem has just created a chat room. You can visit it here: https://gitter.im/redguide/locales.
This pull-request adds this badge to your README.md:

If my aim is a little off, please let me know.
Happy chatting.
PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

:+1:

ofc merge this


Use a static for an Uni with a null item

Ah missed that in the other PR.

Thanks!

Not to be annoying, but now voidItem can be this:
    public Uni<Void> voidItem() {
        return nullItem();
    }


Non-WebSockets Transport using Linux C# Client Fails

C# <-> C# communication from NetCore on Linux seems to not be working when the transport is not websockets.  I suspect this might be an issue on the linux client side since a windows machine connecting to the same server has no problems.  There are also no problems if the same linux machines connects to IIS Express and web sockets are 'working'.
This sums up the scenarios:

OS
WebSockets (IIS Express)
NonWebSockets (AWS / Elastic Beanstalk)

Linux
OK
:-(

Windows
OK
OK

Versions of Server-Side NuGet Packages:
1.0.0-rc1-final

Versions of Client-Side NuGet/NPM Packages:
1.0.0-rc1-final

Are you using the C# client or the JavaScript client:
C# client

The Server you are using (Kestrel/HttpSysServer/IIS/IIS Express/Azure Web App/etc.):
IIS in AWS (Elastic Beanstalk)

The Operating System on the Server (Windows/Linux/macOS):
Windows / AWS

The Operating System on the Client (Windows/Linux/macOS):
Linux (ARM processor armhf architecture)

Could you turn on server and client logs to see if there is a reason non websockets isn't "working"?

Linux Client - Initial Connection Log
https://gist.github.com/abbotware/ead806f783454ec272af41d643d442fc

The console output you provided has WebSocket connection errors in it, but you said WebSockets were working. How are you "disabling" WebSockets? Are you configuring the client to use SSE or Long Polling or disabling WebSockets on the server?
Regardless of that, the logs seem to show that the connection is functioning properly and that the invocation is being dispatched and completed properly. What is the specific behavior you are seeing that you don't expect? Can you provide code samples that illustrate the issue?

The message flow is more or less as follows:
client -> server (online)
client <- server (input)
client -> server (output)
client -> server (output)
client -> server (output)
... Error
Here is a log of the full connection
https://gist.github.com/abbotware/0add10d1e54359fda9cffbc3191937ac

I am not disabling anything

Ok, I was getting confused by your table. I see that the server is on the bottom of the table now. So you're saying that AWS is failing to connect with WebSockets and falling back to one of the other transports?
Your log shows:
fail: Microsoft.AspNetCore.SignalR.Client.HubConnection[38]
      Received close message with an error: Connection closed with an error.

For security reasons, the error message is not sent to the client unless it is a known error. You'll need to either provide logs from the server or set the EnableDetailedErrors setting on HubOptions to true to get the detailed error message on the client. You can do that in ConfigureServices:
services.AddSignalR(options => options.EnableDetailedErrors = true);

The log also shows an error with the WebSocket handshake. This makes me suspect something about AWS is causing the WebSocket handshake to be corrupted. It looks like this is the case when using the "Classic Load Balancer" with Elastic Beanstalk. Have you configured the "Classic Load Balancer" or the "Application Load Balancer"? Only the "Application Load Balancer" supports WebSockets according to my quick Google search results: https://aws.amazon.com/about-aws/whats-new/2016/08/aws-elastic-beanstalk-supports-application-load-balancer/

Its an application load balancer - HTTPS externally and HTTP internally.  But as of now there is only 1 web server behind it so there is are requests being round robined / etc.

Ok, the "Application Load Balancer" is supposed to work with WebSockets so that shouldn't be a problem.
If you're just using a single server, I can't see anything in the client logs that would be causing the issue. We'd need server logs in order to get more data. I'm not familiar with Elastic Beanstalk, so I don't know if/how you can get logging data out. You can configure ASP.NET Core logging to log to files or even external services/databases through the help of other third-party components, but I don't know of any specific components to suggest.

https://gist.github.com/abbotware/e679750007ea5ea9b609076c1c9e0611
'InvalidDataException: Missing required property 'type'.'

Something between the client and the server seems to be corrupting the messages. Can you collect network traces from the client? See the Diagnostics Guide for some guidance on how to collect this data.
And getting server logs, as I posted above, would help a lot as well.

for server logs - i can think of some creative ways to get log data out - but is there anything i need to do to enable server signalr to log more data on thes server side?

Also - I think can bypass the EB (HTTPS) and go straight to

er whoops - misclick there

I added Serilog to my web app since asp net core doesnt seem to have a built in file logger... attempted to serve the log file from an MVC Action, but looks like the iis file system is locked down so i doesnt create files... i wound up trying to write logs to cloudwatch - but they don't look any where as detailed as the client logs

`public static int Main(string[] args)
{
// https://mitchelsellers.com/blogs/2017/10/09/real-world-aspnet-core-logging-configuration
        ////var currentEnv = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");

        var configuration = new ConfigurationBuilder()
            .AddJsonFile("appsettings.json")
            ////.AddJsonFile($"appsettings.{currentEnv}.json", optional: true)
            .AddEnvironmentVariables()
            .Build();

        // name of the log group
        var logGroupName = "XXXXX.XX";

        // customer renderer (optional, defaults to a simple rendered message of Serilog's LogEvent
        //var renderer = new MyCustomRenderer();

        // options for the sink, specifying the log group name
        CloudWatchSinkOptions options = new CloudWatchSinkOptions { LogGroupName = logGroupName};

        // setup AWS CloudWatch client
        AWSCredentials credentials = new BasicAWSCredentials("XXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXX");
        IAmazonCloudWatchLogs client = new AmazonCloudWatchLogsClient(credentials, RegionEndpoint.USEast1);

        Log.Logger = new LoggerConfiguration()
            .ReadFrom.Configuration(configuration)
            .MinimumLevel.Verbose()
            .Enrich.FromLogContext()
            .WriteTo.Console()
            .WriteTo.AmazonCloudWatch(options, client)
            .WriteTo.RollingFile("serilog.txt", outputTemplate: "{Timestamp} [{Level}] ({CategoryName:l}) {Message}{NewLine}{Exception}", shared: true)
            .CreateLogger();

        try
        {
            BuildWebHost(args).Run();

            return 0;
        }
        catch (Exception ex)
        {
            Log.Fatal(ex, "Host terminated unexpectedly");
            return 1;
        }
        finally
        {
            Log.CloseAndFlush();
        }
    }

    public static IWebHost BuildWebHost(string[] args)
    {
        return WebHost.CreateDefaultBuilder(args)
            .UseKestrel()
            .UseContentRoot(Directory.GetCurrentDirectory())
            .UseIISIntegration()
            .UseStartup<Startup>()
            .UseApplicationInsights()
            .UseSetting("detailedErrors", "true")
            .CaptureStartupErrors(true)
            .ConfigureLogging(logging => {
                logging.AddFilter("Microsoft.AspNetCore.SignalR", LogLevel.Trace);
                logging.AddFilter("Microsoft.AspNetCore.Http.Connections", LogLevel.Trace);
            })
            .UseSerilog()
            .Build();
    }`

am I doing something wrong?  the log data i am getting seems extremely limited...   nothing hub / connection releated

Do you have an appsettings.json? That will override what you have configured in code.

i do but here is the strange part - in my serilog file i see debug and verbose... but cloudwatch does not have any debug or verbose...

appsettings.json values:
"Logging": {
"IncludeScopes": true,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information",
"Microsoft.AspNetCore.SignalR": "Trace",
"Microsoft.AspNetCore.Http.Connections": "Trace"
}
}

https://gist.github.com/abbotware/1bd88d6ba631df3cdc1aeb18d140478e
doesnt look like too much in the log:   "Error when processing requests."
the log format looks like its missing columns of data (ie level, category, etc)

Can you get the console logger output? That error should have the actual exception associated with it but for some reason it's not showing up for you.

I can easily reproduce this and im at a point where I can get all logging data out of the system, so if you need me to test / change anything I can

If I bypass the HTTPS to HTTP Load Balancer and connect directly to the web server - same problem - Also, I am kinda surprised that WebSockets are not being used when i connect directly to the HTTP server...  does app.UseWebSockets need to be specified in addition to app.UseSignalR ?

If you can reproduce this on demand I'd like to take a look at debugging this with you.

@anurse for this error:
[5/17/2018 1:21:15 AM +00:00] [Error] Error when processing requests. System.IO.InvalidDataException: Missing required property 'type'.
at Microsoft.AspNetCore.SignalR.Protocol.JsonHubProtocol.ParseMessage(Utf8BufferTextReader textReader, IInvocationBinder binder)
at Microsoft.AspNetCore.SignalR.Protocol.JsonHubProtocol.TryParseMessage(ReadOnlySequence1& input, IInvocationBinder binder, HubMessage& message) at Microsoft.AspNetCore.SignalR.HubConnectionHandler1.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.d__11.MoveNext()

We have a way to look at the payload on the server right?
@abbotware can you turn trace logging on the client? It looks like something is sending messages out of order or sending a bad payload.

the full client log is above:  https://gist.github.com/abbotware/0add10d1e54359fda9cffbc3191937ac
I am going to test this out an a regular IIS server (non-aws) to see if I can repro there... if yes, then i can get a lot more server diagnostics

There are 2 things to figure out here:

What is messing with the websocket request causing this error:

System.Net.WebSockets.WebSocketException (0x80004005): The 'Sec-WebSocket-Accept' header value '3VpOLaVXO6aI9Z7GUGxzkt4v2ws=' is invalid.
   at System.Net.WebSockets.WebSocketHandle.ValidateAndTrackHeader(String targetHeaderName, String targetHeaderValue, String foundHeaderName, String foundHeaderValue, Boolean& foundHeader)
   at System.Net.WebSockets.WebSocketHandle.<ParseAndValidateConnectResponseAsync>d__28.MoveNext()

I see you are using IIS in AWS (Elastic Beanstalk). Do you have the WebSocket module enabled on IIS there?
I saw this http://blog.flux7.com/web-apps-websockets-with-aws-elastic-load-balancing but I don't know how relevant it is to your deployment.

Why is it barfing after a while. We need to get the message content. I'm pretty sure the server logs the message content but that might only be on a successful parse 😢

/cc @Tratcher

Do you have a capture of the request headers? It's easy enough to reproduce and verify the Sec-WebSocket-Accept value.
https://github.com/aspnet/WebSockets/blob/8513fc832943454c15e0138bb7b278f0b2c84c2c/src/Microsoft.AspNetCore.WebSockets/Internal/HandshakeHelpers.cs#L99-L118

hey  so im still trying to get more info but regarding AWS EB - I did nothing to specifically enable websockets on the load balancer or EB.. I am only using HTTPS -> HTTP 'load balancer' to put an SSL connecting in front of a single server 'bean stalk'
new update: if I by pass the Load Balancer and go directly to the single EB node - I get the same problem - I would say this rules out the 'load balancer'
Keep in mind, in ALL cases, a windows client connecting to the same server has no problems! (hence why i think this is an issue on the linux client) (forgot to mention, but its an ARM processor if that is of any significance)

ok - I reproduced the issue outside of AWS on a windows server running IIS and captured the communication via Wireshark.  I tried to filter out as much as i could so its mostly the
server: <IP_ADDRESS> and client: <IP_ADDRESS>

Very nice! This IIS Server has websockets enabled right? It must if windows just works. Are you getting the same websocket error?

well no, Its IIS and its failing back to non websockets just like AWS - so all the client and server logs i have posted probably match this capture sequence as well..     The only websockets i have seen working was running asp net core locally via IIS express.

curious - It looks like non-websockets uses 2 separate HTTP streams? (input / output) ?

well no, Its IIS and its failing back to non websockets just like AWS - so all the client and server logs i have posted probably match this capture sequence as well.. The only websockets i have seen working was running asp net core locally via IIS express.

OK so that explains this then:

What is messing with the websocket request causing this error:

It's because you haven't turned on WebSockets on IIS. See https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support for how to turn it on.

curious - It looks like non-websockets uses 2 separate HTTP streams? (input / output) ? or am i just seeing 2 seperate streams on one connection in the capture?

Yes there are 2 different requests for input and output for both Server-Sent Events and Long-Polling.

well yes i figured I could turn web sockets on, but - there is a some bug here no?

well yes i figured I could turn web sockets on, but - there is some bug here no?

I'm not denying there's a bug. Remember here https://github.com/aspnet/SignalR/issues/2230#issuecomment-390108893, I was trying to clarify 2 things but it looks as though we can ignore why websockets isn't working and focus on the other problem.

One thing I forgot to ask, @abbotware are you using the .NET Client on .NET Core 2.1 or something else?

Net Core 2.0 for both server and client

If it were to help - I might be able to extract all the SignalR code I am using and make a small client / server sample project - however - i'd prefer not to post it online

That would be helpful, you can email me the sample at 'brecon at microsoft dot com'

Can you try updating to .NET Core 2.1? At least on the client. The HttpClient implementation is vastly improved and I wonder if that's the culprit here.
You can try out the early access drop here https://github.com/aspnet/Home/wiki/2.1.0-Early-Access-Downloads

@abbotware can you also capture the server logs? Or if you already posted those can you link us to them?

here is a summary of all the logs / data
client:   https://gist.github.com/abbotware/0add10d1e54359fda9cffbc3191937ac
server:  https://gist.github.com/abbotware/1bd88d6ba631df3cdc1aeb18d140478e
i was able to grab the following exception which is not in the server log posted but from another log:
[5/17/2018 1:21:15 AM +00:00] [Error] Error when processing requests. System.IO.InvalidDataException: Missing required property 'type'.
at Microsoft.AspNetCore.SignalR.Protocol.JsonHubProtocol.ParseMessage(Utf8BufferTextReader textReader, IInvocationBinder binder)
at Microsoft.AspNetCore.SignalR.Protocol.JsonHubProtocol.TryParseMessage(ReadOnlySequence1& input, IInvocationBinder binder, HubMessage& message) at Microsoft.AspNetCore.SignalR.HubConnectionHandler1.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.d__11.MoveNext()
in all cases the message exchange is as follows:

hmm i never installed a 'pre-release' 'final' build,,,  :-)  so my build / nuget restore step seems confused:
error NU1102: Unable to find package runtime.win-x64.Microsoft.NETCore.App with version (>= 2.1.0)
C:\go\pipelines\Trunk\Zyronet\Zyronet.Host.Task\Zyronet.Host.Task.csproj : error NU1102:   - Found 11 version(s) in nuget.org [ Nearest version: 2.1.0-rc1 ]
i mean at th

From the Wireshark logs I'm leaning towards it being a client side issue. You're using Linux Arm32 right? Are you able to consistently repro with the same amount of sends? The server and wireshark logs show it failed after sending "Abbotware.Interop.Microsoft.dll"

yes i can repro all the time - all the logs are from separate runs - so can't be just a coincidence  - I havent really looked at the number of sends being made though

Official Arm32 support on Linux was added in 2.1.0. So it's very likely this is a 2.0 Arm32 specific bug that's been fixed in 2.1.
How did your production testing go?

Upgraded everything now to net core 2.1 (client and server) and haven't seen this issue locally or remote (AWS).  So guess its probably safe to close - Thanks everyone for the help :-)


[WIP] Started separation of FDB and FDB api classes

Due to the poor encapsulation and leakage of ffi functionality into the FDB python class, FDB and FDBApi classes has been separated to guarantee a better separation of concerns.
This is work in progress.

Codecov Report
Attention: Patch coverage is 0% with 112 lines in your changes missing coverage. Please review.

Project coverage is 34.04%. Comparing base (410760f) to head (0ecadf6).

Files with missing lines
Patch %
Lines

pyfdb/fdb_api.py
0.00%
66 Missing :warning:

pyfdb/pyfdb.py
0.00%
46 Missing :warning:

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #30      +/-   ##
===========================================
- Coverage    36.07%   34.04%   -2.04%
===========================================
  Files            6        7       +1
  Lines          352      373      +21
===========================================
  Hits           127      127
- Misses         225      246      +21

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Add failing test for queryset.count()

WIP, just a failing test for an Elasticsearch issue.

Thanks @bcdickinson!

@bcdickinson will you be working on this any time soon?

Closing due to no response since original PR and still in draft.


[Bug report] 使用插件vite-svg-loader报错

Description
报错信息如下，感觉是因为我的项目用的是vite4.1.1而 文档内置的vite版本为4.0.4导致的。请问如何能升级文档内置的vite版本，使其与我的项目vite版本相同？

Reproduction
https://stackblitz.com/edit/vuepress-77g32p?file=package.json,docs%2F.vuepress%2Fconfig.ts
Used Package Manager
pnpm
System Info
System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 17.42 GB / 31.56 GB
  Binaries:
    Node: 18.14.0 - D:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 9.2.0 - D:\Users\jcwang\AppData\Roaming\npm\npm.CMD
  Utilities:
    Git: 2.39.1.
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.22621.1265.0), Chromium (110.0.1587.46)
  npmPackages:
    @vuepress/bundler-vite: 2.0.0-beta.60 => 2.0.0-beta.60
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli: Not Found
    @vuepress/client: 2.0.0-beta.60 => 2.0.0-beta.60
    @vuepress/core: Not Found
    @vuepress/markdown: Not Found
    @vuepress/plugin-active-header-links: Not Found
    @vuepress/plugin-back-to-top: Not Found
    @vuepress/plugin-container: Not Found
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-external-link-icon: Not Found
    @vuepress/plugin-git: Not Found
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom: Not Found
    @vuepress/plugin-nprogress: Not Found
    @vuepress/plugin-palette: Not Found
    @vuepress/plugin-prismjs: Not Found
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-register-components: 2.0.0-beta.60 => 2.0.0-beta.60
    @vuepress/plugin-search: 2.0.0-beta.60 => 2.0.0-beta.60
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data: Not Found
    @vuepress/plugin-toc: Not Found
    @vuepress/shared: Not Found
    @vuepress/theme-default: Not Found
    @vuepress/utils: Not Found
    vue: ^3.2.47 => 3.2.47
    vue-loader: Not Found
    vue-router: ^4.1.6 => 4.1.6
    vuepress: 2.0.0-beta.60 => 2.0.0-beta.60
    vuepress-vite: Not Found
    vuepress-webpack: Not Found

Vite may include internal breaking changes cross minor, so we are avoiding that to stick vite with minor.
new version will use 4.1.x once it releases.

cc @meteorlxy This is why I am requesting to release a new version. Project with vite as deps can suffer if there is vite4.1 in project deps tree.

@Mister-Hope 哎~ 升级到vite 4.2.1 这个错误又出现了，有什么办法能彻底解决项目的 vite 版本与 vuepress 冲突问题吗？还是说只能等待 vuepress 发布新版本我才能升级 vite


Uncaught TypeError: Cannot read property 'compositionInProgress' of null

[Enter steps to reproduce below:]

See this issue
Now editor is completely frozen and unusable. Any attempts to press a keyboard key triggers this error :(

Atom Version: 0.175.0
System: Mac OS X 10.10.1
Thrown From: autocomplete-plus package, v2.0.12
Stack Trace
Uncaught TypeError: Cannot read property 'compositionInProgress' of null
At /Users/hassanhayat/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:234

TypeError: Cannot read property 'compositionInProgress' of null
  at AutocompleteManager.module.exports.AutocompleteManager.bufferChanged (/Users/hassanhayat/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:234:30)
  at /Users/hassanhayat/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:1:1
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/service-hub/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.applyPatch (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:594:20)
  at BufferPatch.module.exports.BufferPatch.applyTo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/buffer-patch.js:74:21)
  at Transaction.module.exports.Transaction.applyTo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/transaction.js:60:29)
  at History.module.exports.History.abortTransaction (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:165:24)
  at History.module.exports.History.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:122:16)
  at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:687:27)
  at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1178:26)
  at [object Object].module.exports.React.createClass.onTextInput (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:647:30)
  at HTMLDivElement.boundMethod (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21)

Commands
     -6:41.4 editor:indent (atom-text-editor.editor.is-focused)
     -6:40.9 editor:newline (atom-text-editor.editor.is-focused)
  4x -6:40.1 core:backspace (atom-text-editor.editor.is-focused)
     -6:37.8 core:move-left (atom-text-editor.editor.is-focused)
     -6:37.0 core:move-right (atom-text-editor.editor.is-focused)
     -6:31.7 autocomplete-plus:confirm (input)
  5x -6:28.7 core:backspace (atom-text-editor.editor.is-focused)
     -5:54.4 core:move-left (atom-text-editor.editor.is-focused)
     -5:40.1 core:backspace (atom-text-editor.editor.is-focused)
     -5:39.3 core:move-right (atom-text-editor.editor.is-focused)
     -5:33.1 core:save (atom-text-editor.editor.is-focused)
     -5:31.2 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)
  2x -4:36.1 editor:newline (atom-text-editor.editor.is-focused)
     -0:00.6 core:move-up (atom-text-editor.editor.is-focused)
     -0:00.2 core:move-down (atom-text-editor.editor.is-focused)
  3x -0:00.0 core:move-left (atom-text-editor.editor.is-focused)

Config
{
  "core": {
    "disabledPackages": [
      "linter-gjslint",
      "linter",
      "linter-dartanalyzer"
    ]
  }
}

Installed Packages
# User
atom-beautify, v0.21.2
atom-typescript-tools, v0.6.2
autoclose-html, v0.14.0
autocomplete-plus, v2.0.12
better-language-dart, v1.0.1
color-picker, v1.4.4
dart-tools, v0.8.5
language-ada, v0.2.0
language-coq, v0.1.0
language-css-plus, v0.3.0
language-d, v3.0.1
language-elm, v0.4.1
language-glsl, v0.2.2
language-julia, v2.0.0
language-opencl, v0.1.0
language-pegjs, v0.5.0
language-r, v0.1.1
language-sml, v0.2.0
language-typescript, v0.15.0
language-x86, v0.1.0
linter-csslint, v0.0.11
minimap, v4.1.0

# Dev
No dev packages

/cc @atom/core

Please update your version of Atom to 0.177.0 or later.

Cool. Thanks. I updated my version of Atom and I haven't encountered this error yet. I'll let you know if this ever comes up again. Thanks for your help.

The issue that I've created that references this issue is caused the same way than this issue. I recommend re-opening this issue as they seem related.
From the error, it would seem that there is some sort of unchecked null and this unchecked null could be seeping into all sorts of places.

Also, it is important to note that autocomplete-plus was among the packages being updated while I went back to the code and tried typing some code (where autocomplete-plus was being used)