CSS prefix, attributes and other highlight bugs

Current state:
BAD!

GOOD (if no prefix):

GOOD (prefix):

Just do not introduce prefix notation because the themes do not support I think bad.
If the new class were introduced I would be happy to adjust the themes.
Enough to add to css themes:
.hljs-prefix{
opacity:0.55
}
Unfortunately, there are other bugs:

Numbers in parentheses are not highlighted. color: rgba(51, 170, 51, .1); or width: calc(100% - 80px); or transform: rotate(45deg); or filter: grayscale(0.5) blur(10px);
In the parentheses of the at rules, properties are not highlighted. @media only screen and (orientation: landscape) or @media screen and (max-width: 900px) and (min-width: 600px), (min-width: 1100px)

If the new class were introduced I would be happy to adjust the themes.

We try to avoid this because it's a lot of work, and there are also 3rd party themes, not just the ones in this repo, etc... not sure there is THAT much value in making the prefixes slightly transparent.

Unfortunately, there are other bugs:

A jsfiddle with special examples (that we can see actually running in context) would be great.
You can use my example:
https://jsfiddle.net/ajoshguy/a1kntyg4/

https://jsfiddle.net/w3suli/7xbLrcqa/40/
No problem for users of old themes.
If someone wants to highlight prefixes, all they need is an extra css extension.
Further bugs can be easily corrected.
I've done what you asked for. I hope so, it's clear what I want!
I would appreciate it if you could improve the css highlights.
Thanks in advance!

For @media you're expert the max-width, min-width, etc to be highlighted?

Selectors:
*
a[title], a[href*="example"] /*(The part between the square brackets can be colored like the pseudo-classes)*/
div, #id, .class
...

Pseudo-classes:
:first-child
:lang(en)
...

Pseudo-elements:
::after
::slotted(span)
...

CSS property or CSS attribute:
border:
background:
Color:
...

(The colon of the css property is followed by the property values)
Numbers and units:
4px
100%
45deg
...

(For numbers, you highlight numbers and units of measure separately. Some people only raise the number, not the unit of measurement. And some highlight the number and the unit of measure together. These solutions are acceptable.)
CSS functions:
calc(100% - 80px)
circle(6rem at 12rem 8rem)
...

CSS at-rules:
@page
@charset
@media
@supports
...

@media screen and (min-width: 900px) {
  article {
    padding: 1rem 3rem;
  }
}

(at-rule: media, media type: screen, property: min-width, property value: 900px)
Interesting case:
@supports (display: flex) {
  @media screen and (min-width: 900px) {
    article {
      display: flex;
    }
  }
}

(at-rule: supports, property: display, value: flex)

@w3suli Some of that those things already work I'm sure... it'd be useful to have a checklist of the things you're currently finding lacking... that'd make it a lot easier for someone to pick this up and run with it.

In the previous posts and in the example, I constantly show what doesn't work.

The prefixes in the properties and the at-rules of are not uniform (dashes are not selected in one place).
Properties are not highlighted in the at-rules.
Numbers are not highlighted in functions.
The at-rules do not highlight media types (this is less important).
Numbers and units of measurement are highlighted together (highlighting separately would be better, but it doesn't matter).

These are all mistakes. Everything needs repair. Most of them are important. The last two are aesthetically pleasing but less important.
I want the css highlight to be as perfect as possible.
I try to keep track of the fixes and tell me if there are any bugs.
After correcting the bugs I will go through both css and scss.

Numbers and units of measurement are highlighted together (highlighting separately would be better, but it doesn't matter).

Not sure that's a problem.  Pretty sure that's intentional.

I don't need a list, I need test cases (specific CSS that fails to colorize properly).  The closer you can provide to an actual test case (jsfiddle as requested) the sooner I might take a look at this myself.  Otherwise this might sit in the issue queue a very long time before anyone has time for "I want the css highlight to be as perfect as possible.".
I will leave this open as there are obvious deficiencies here, but if you want to see faster movement the information I asked for (in the format I asked for) would be super helpful. :)

Tagging this beginner friendly because a beginner can do a higher level overview and provide some nice test cases for developers to work with if @w3suli doesn't have the time or inclination.

To be clear, what would be super helpful (a jsfiddle with code like):
body {
/* numbers inside () are not highlighted proper */
width: calc(100% - 80px);
}

/* comment describing what is wrong with the below block:
media not highlighted,
min-width not highlighted.
screen not highlighted, etc.
 */
@supports (display: flex) {
  @media screen and (min-width: 900px) {
    article {
      display: flex;
    }
  }
}

The prefixes in the properties and the at-rules of are not uniform (dashes are not selected in one place).
https://jsfiddle.net/w3suli/zkr9tno6/12/
Numbers are not highlighted in functions.
https://jsfiddle.net/w3suli/w3n2b5ph/6/
Properties are not highlighted in the at-rules. (The at-rules do not highlight media types)
https://jsfiddle.net/w3suli/phx9L5sd/10/

I'm actually not sure which CSS to use... part of me wants to just make all the outside stuff the same color (keyword). ie ""all print screen speech only and or"
Not sure how the @ attributes should be colored.

Not sure and and or should be keyworded. Thoughts?

The "@" sign is part of the rule. (At-rules). It would be better if he was highlighted, but not so much trouble if not.
However, where the prefix is used, the prefix dashes must be the same color as the prefix.
The "not", "only" and "and" must be the same color.
Media types: all, print, screen, speech.

The "@" sign is part of the rule. (At-rules). It would be better if he was highlighted, but not so much trouble if not.

Yeah that's annoying. :-) Already saw that.
I know what the list of media types are.  If I go from the styling in my VS Code it's treating "print" screen and such as like "attribute values", which makes sense, but means that we wouldn't color them since we don't color values.

Yes, the highlighting of the VS Code is clear.

Mine is different...

Looks pretty nice to me though.

These are not bad either.

@w3suli If you want to play around with that PR... feel free.

The first tests are good.
The highlight has become nicer and clearer.
I could have imagined a special emphasis on the prefixes.
I would have highlighted "not", "only" and "and" separately from the At-Rules.
However, the repair is good.
Thanks

Excuse me! I found a small bug.
Selector-attribute bug:

href, lang: attribute
"example": string
en: value
It's not that bad if you keep the current solution.
I know I haven't dealt with this in more detail before. But now, while testing, I thought about it.
These are true html attributes and HTML attribute values, but you might want to tag them as well.

"example": string

I fixed this cause it's easy... please open a separate issue for the highlighting of the attribute inside a selector-attribute though, that needs to be thought about a bit more to be done correctly I think.

https://github.com/highlightjs/highlight.js/issues/2243

Awesome, Very nice.  This will auto-close when the associated PR is merged.


Changed icon in navbar from about to blogs in blogs section.

🛠 Fixes Issue
Closes issue #854
👨💻 Changes proposed
Changed icon from about to blogs in blog page
✔ Check List (Check all the applicable boxes)

[X] My code follows the code style of this project.
[X] This PR does not contain plagiarized content.
[X] The title of my pull request is a short description of the requested changes.

📄 Note to reviewers

📷 Screenshots

The hamburger button is not working @DeveloperAshish8


How do you save (web)

Category

What is the current behavior?
No save button.  When I close the page and go back it says unsaved changes... But how do I save?  I have seen docs that say there is one... but perhaps that is for the desktop version?

What is the desired behavior?
Juse use the Web Editor

Additional information
Have a save button that pushes to a GIT repo

Seems publish is the way to go.   Of course should have got that.. but I thought you could save a draft etc.. not just go straight to publish


Decode can not decodeSignedVarint invalid input

Current Behavior
When trying to decode a tx that I got within a cosmos block I am getting the following error TypeError: Can not decodeSignedVarint invalid input
at Object.decodeUVarint (node_modules/js-amino/src/decoder.js:25:49)       at Codec.unMarshalBinary (node_modules/js-amino/src/codec.js:127:21)
The base64 tx payload is:
xAHwYl3uCj6oo2GaChRp2UcQysMQdAX91qLuFkeYvlgpxxIUsRTzjmx2DzAcx4pEDWVipkbNrWEaDAoFc3Rha2USAzMwMhISCgwKBXN0YWtlEgMzMDAQwLgCGmoKJuta6YchA9+gi7GTQ9HhHFc+l4gvmw9ZqoOpeAtAEJYQDcg8NnMYEkAiyY/l3V/zU/sZ1ntPt6ouWvDY2OV8sVzmD8NWvgJBQR2wLwCuLz/Z/sOUSyYIw5OV2yGnx1fwIZDvREhiCZFw
My execution code is:
codec.unMarshalBinary(Buffer.from(encodedTx, 'base64'), decodedDataTx);
Additional Information
js-amino npm version 1.0.0

Thanks for reporting the bug, I will check it

Hi @Onefox Could you please show me the full code that you encode/decode and register data type ?

I only decode since I get the base64 tx from the cosmos block, here is the code:
const {
    Codec,
    FieldOtions,
    TypeFactory,
    Utils,
    Types,
    WireTypes,
} = require('js-amino');

let StdTx = TypeFactory.create('StdTx', [{
    name: 'msg',
    type: Types.ArrayInterface,
},
    {
        name: 'fee',
        type: Types.Struct,
    },
    {
        name: 'signatures',
        type: Types.ArrayStruct,
    },
    {
        name: 'memo',
        type: Types.String,
    },
]);

let MsgSend = TypeFactory.create('MsgSend', [{
    name: "to_address",
    type: Types.String,
},
    {
    name: "from_address",
    type: Types.String,
    },

    {
        name: "amount",
        type: Types.ArrayStruct
    }
]);

let Amount = TypeFactory.create('amount', [{
    name: 'denom',
    type: Types.String,
},
    {
        name: 'amount',
        type: Types.String,
    }
]);

let PubKeySecp256k1 = TypeFactory.create('PubKeySecp256k1', [{
    name: 's',
    type: Types.ByteSlice,
}], Types.ByteSlice)

let Signature = TypeFactory.create('signature', [{
    name: 'pub_key',
    type: Types.Interface,
},
    {
        name: 'signature',
        type: Types.ByteSlice,
    }
])

let codec = new Codec();

codec.registerConcrete(new StdTx(), 'auth/StdTx', {});
codec.registerConcrete(new MsgSend(), 'cosmos-sdk/MsgSend', {});
codec.registerConcrete(new PubKeySecp256k1(), 'tendermint/PubKeySecp256k1', {});
codec.unMarshalBinary(Buffer.from('xAHwYl3uCj6oo2GaChRp2UcQysMQdAX91qLuFkeYvlgpxxIUsRTzjmx2DzAcx4pEDWVipkbNrWEaDAoFc3Rha2USAzMwMhISCgwKBXN0YWtlEgMzMDAQwLgCGmoKJuta6YchA9+gi7GTQ9HhHFc+l4gvmw9ZqoOpeAtAEJYQDcg8NnMYEkApheX7+WmfOuYXE1tHtSxden6zlzUxcWxzNWTCEMr0km3lvMmS7oC4sgkclESaVtnbatebN3G74cO/cZ1gXtW9', 'base64'), decodedDataTx);
console.log("TESTunMarshalBinary");
console.log(JSON.stringify(decodedDataTx));

This is the complete tx when I get it from the api via the node:
{"height":"370","txhash":"56801A023B7EC5E9C7A848E288658251A7627EE774711428CF89B61A08A6CD74","raw_log":"[{\"msg_index\":\"0\",\"success\":true,\"log\":\"\"}]","logs":[{"msg_index":"0","success":true,"log":""}],"gas_wanted":"40000","gas_used":"29113","tags":[{"key":"action","value":"send"},{"key":"sender","value":"cosmos1d8v5wyx2cvg8gp0a663wu9j8nzl9s2w8l8qe9q"},{"key":"recipient","value":"cosmos1ky208rnvwc8nq8x83fzq6etz5ervmttpyelefq"}],"tx":{"type":"auth/StdTx","value":{"msg":[{"type":"cosmos-sdk/MsgSend","value":{"from_address":"cosmos1d8v5wyx2cvg8gp0a663wu9j8nzl9s2w8l8qe9q","to_address":"cosmos1ky208rnvwc8nq8x83fzq6etz5ervmttpyelefq","amount":[{"denom":"stake","amount":"302"}]}}],"fee":{"amount":[{"denom":"stake","amount":"300"}],"gas":"40000"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"A9+gi7GTQ9HhHFc+l4gvmw9ZqoOpeAtAEJYQDcg8NnMY"},"signature":"KYXl+/lpnzrmFxNbR7UsXXp+s5c1MXFsczVkwhDK9JJt5bzJku6AuLIJHJREmlbZ22rXmzdxu+HDv3GdYF7VvQ=="}],"memo":""}}

So I rebuild the tx that I see on chain with the tools and get the following hex value:
8002f0625dee0a72a8a3619a0a2d636f736d6f73316b79323038726e767763386e7138783833667a713665747a356572766d74747079656c656671122d636f736d6f7331643876357779783263766738677030613636337775396a386e7a6c39733277386c38716539711a0e0a057374616b651205313030303012100a0a0a057374616b6512013010c09a0c1a6a0a26eb5ae98721021b1800ff609315401d84c06cdb3b86cec97ee03fa018ecaa7ca45f2bb406f6fa1240a54c6d3d3581be9334e0226aebd0e024be19cc24e281616d2382d9e4906a0a860eb75ffcdbeb165c253503596fad0c9e92475271ecf1aa79d914ec178323501d2208656c6f6e6d75736b
This is working with the following code, where hexTx is the string above.
codec.unMarshalBinary(Utils.fromHex(hexTx), decodedDataTx2);
console.log("TESTunMarshalBinary");
console.log(JSON.stringify(decodedDataTx2.JsObject()));

Still when I use a hex string from the blockchain that I got with:
const hexTx = Buffer.from(encodedTx, 'base64').toString('hex');
The example hex is
c401f0625dee0a3ea8a3619a0a1469d94710cac3107405fdd6a2ee164798be5829c71214b114f38e6c760f301cc78a440d6562a646cdad611a0c0a057374616b65120333303212120a0c0a057374616b65120333303010c0b8021a6a0a26eb5ae9872103dfa08bb19343d1e11c573e97882f9b0f59aa83a9780b401096100dc83c3673181240dfd5cfe7b4f60281cf21d172a92f2b4f9bbaa39153764fa4b401d2dddea72dd81ada1a350c2168ea91d5a011ede3702e87d166ec9229b6512c27d245ca9c2ab5
Which should result in a very simular tx. I am getting the error
TypeError: Can not decodeSignedVarint invalid input length
      at decodeUVarint (node_modules/js-amino/src/decoder.js:26:31)
      at Object.decodeFieldNumberAndType (node_modules/js-amino/src/decoder.js:99:23)
      at decodeBinaryField (node_modules/js-amino/src/binaryDecoder.js:87:36)
      at Reflection.ownKeys.forEach (node_modules/js-amino/src/binaryDecoder.js:144:13)
      at Array.forEach (<anonymous>)
      at decodeBinaryStruct (node_modules/js-amino/src/binaryDecoder.js:138:34)
      at Object.decodeBinary (node_modules/js-amino/src/binaryDecoder.js:40:31)
      at Codec.unMarshalBinary (node_modules/js-amino/src/codec.js:136:23)

Sorry for my late reply. This problem maybe relating to stateful problem of codec. Due to dynamic typing feature of JS. You can not know the exactly the type you want to decode if you don't do this:
codec.marshalBinary(new Obj(list_of_properties))
This line code let codec know the default properties of Obj, so when I tries to decode, it knows exatctly all the properties of Obj. I hope this inconvenience will be fixed in future version.
So to decode a tx hex from Cosmos, you can try work-around like this:

codec.marshalBinary(newObj(...))) //try to init it with the same default value in cosmos

decodedObj = new Obj();

codec.unMarshal(binary,decodedObj) //binary is from cosmos-side

It could be it but I don't know what properties I am missing. Since when I build a very identical tx with the objects and codec.marshalBinary I am getting a different binary output.

Actually, at least you need to know the right structure of your object you wanted to decode, if not, it does not work.

So now I was able to generate kind of the same tx only signature and address bytes are different.
This is the one I can encode and decode without problems.
c401f0625dee0a3ea8a3619a0a145ede722ac46b33cb8b8edbf3893c36fa8b992ea812143b3af30d84a3a4cae907ec5d88a6b5afec4530ba1a0c0a057374616b65120333303112120a0c0a057374616b65120333303010c0b8021a6a0a26eb5ae98721021b1800ff609315401d84c06cdb3b86cec97ee03fa018ecaa7ca45f2bb406f6fa1240a54c6d3d3581be9334e0226aebd0e024be19cc24e281616d2382d9e4906a0a860eb75ffcdbeb165c253503596fad0c9e92475271ecf1aa79d914ec178323501d
{
	"type": "auth/StdTx",
	"value": {
		"msg": [{
			"type": "cosmos-sdk/MsgSend",
			"value": {
				"to_address": [94, 222, 114, 42, 196, 107, 51, 203, 139, 142, 219, 243, 137, 60, 54, 250, 139, 153, 46, 168],
				"from_address": [59, 58, 243, 13, 132, 163, 164, 202, 233, 7, 236, 93, 136, 166, 181, 175, 236, 69, 48, 186],
				"amount": [{
					"denom": "stake",
					"amount": "301"
				}]
			}
		}],
		"fee": {
			"amount": [{
				"denom": "stake",
				"amount": "300"
			}],
			"gas": "40000"
		},
		"signatures": [{
			"pub_key": {
				"type": "tendermint/PubKeySecp256k1",
				"value": "AhsYAP9gkxVAHYTAbNs7hs7JfuA/oBjsqnykXyu0Bvb6"
			},
			"signature": "pUxtPTWBvpM04CJq69DgJL4ZzCTigWFtI4LZ5JBqCoYOt1/82+sWXCU1A1lvrQyekkdScezxqnnZFOwXgyNQHQ=="
		}],
		"memo": ""
	}
}

And when I try to decode the tx from chain
c401f0625dee0a3ea8a3619a0a1469d94710cac3107405fdd6a2ee164798be5829c71214b114f38e6c760f301cc78a440d6562a646cdad611a0c0a057374616b65120333303212120a0c0a057374616b65120333303010c0b8021a6a0a26eb5ae9872103dfa08bb19343d1e11c573e97882f9b0f59aa83a9780b401096100dc83c367318124053d626bb16c131f6aa319e3ca2d2f139c04410a5ad814e8f6528526a54e4684c41c97aa13cfe5b6c6ba94d5ba7a0273ef07e84079029adc5b293e979e694018e
I am getting the error.
Both binary hex have the same length and except for the signatory private key and addresses kind of the same values.
I am not sure what I am missing here :/

Have you tried to decode the tx from chain with Go-Amino/Cosmos and the result is ..?

So I ran both the fresh generated one that is working with en/decoding and the one from the chain through the decode of the gaiacli.
Both worked and generate the same json schemas.
Here for the xAHwYl3uCj6oo2GaChRe3nIqxGszy4uO2/OJPDb6i5kuqBIUOzrzDYSjpMrpB+xdiKa1r+xFMLoaDAoFc3Rha2USAzMwMRISCgwKBXN0YWtlEgMzMDAQwLgCGmoKJuta6YchAhsYAP9gkxVAHYTAbNs7hs7JfuA/oBjsqnykXyu0Bvb6EkClTG09NYG+kzTgImrr0OAkvhnMJOKBYW0jgtnkkGoKhg63X/zb6xZcJTUDWW+tDJ6SR1Jx7PGqedkU7BeDI1Ad aka c401f0625dee0a3ea8a3619a0a145ede722ac46b33cb8b8edbf3893c36fa8b992ea812143b3af30d84a3a4cae907ec5d88a6b5afec4530ba1a0c0a057374616b65120333303112120a0c0a057374616b65120333303010c0b8021a6a0a26eb5ae98721021b1800ff609315401d84c06cdb3b86cec97ee03fa018ecaa7ca45f2bb406f6fa1240a54c6d3d3581be9334e0226aebd0e024be19cc24e281616d2382d9e4906a0a860eb75ffcdbeb165c253503596fad0c9e92475271ecf1aa79d914ec178323501d
The result is
{
  "msg": [
    {
      "type": "cosmos-sdk/MsgSend",
      "value": {
        "from_address": "cosmos1tm08y2kydveuhzuwm0ecj0pkl29ejt4gghxw35",
        "to_address": "cosmos18va0xrvy5wjv46g8a3wc3f444lky2v96luase3",
        "amount": [
          {
            "denom": "stake",
            "amount": "301"
          }
        ]
      }
    }
  ],
  "fee": {
    "amount": [
      {
        "denom": "stake",
        "amount": "300"
      }
    ],
    "gas": "40000"
  },
  "signatures": [
    {
      "pub_key": {
        "type": "tendermint/PubKeySecp256k1",
        "value": "AhsYAP9gkxVAHYTAbNs7hs7JfuA/oBjsqnykXyu0Bvb6"
      },
      "signature": "pUxtPTWBvpM04CJq69DgJL4ZzCTigWFtI4LZ5JBqCoYOt1/82+sWXCU1A1lvrQyekkdScezxqnnZFOwXgyNQHQ=="
    }
  ],
  "memo": ""
}

And here for the on chain tx xAHwYl3uCj6oo2GaChRp2UcQysMQdAX91qLuFkeYvlgpxxIUsRTzjmx2DzAcx4pEDWVipkbNrWEaDAoFc3Rha2USAzMwMhISCgwKBXN0YWtlEgMzMDAQwLgCGmoKJuta6YchA9+gi7GTQ9HhHFc+l4gvmw9ZqoOpeAtAEJYQDcg8NnMYEkCcXc/Fm8J96MWOuX6kemmWTADYf8Jzy2r9J5v0/Rd0ayrNnxY4Pp9arcJtayXRGNimmxsyHl+CQNd75A9TIBom
{
  "msg": [
    {
      "type": "cosmos-sdk/MsgSend",
      "value": {
        "from_address": "cosmos1d8v5wyx2cvg8gp0a663wu9j8nzl9s2w8l8qe9q",
        "to_address": "cosmos1ky208rnvwc8nq8x83fzq6etz5ervmttpyelefq",
        "amount": [
          {
            "denom": "stake",
            "amount": "302"
          }
        ]
      }
    }
  ],
  "fee": {
    "amount": [
      {
        "denom": "stake",
        "amount": "300"
      }
    ],
    "gas": "40000"
  },
  "signatures": [
    {
      "pub_key": {
        "type": "tendermint/PubKeySecp256k1",
        "value": "A9+gi7GTQ9HhHFc+l4gvmw9ZqoOpeAtAEJYQDcg8NnMY"
      },
      "signature": "nF3PxZvCfejFjrl+pHpplkwA2H/Cc8tq/Seb9P0XdGsqzZ8WOD6fWq3CbWsl0RjYppsbMh5fgkDXe+QPUyAaJg=="
    }
  ],
  "memo": ""
}

Could you please post full code for encode and decode here(you can change the privatekey value)
I can not reconstruct the same value as you did so can not debug it

First of thanks for your time and trying!
Here goes the code:
const {
    Codec,
    FieldOtions,
    TypeFactory,
    Utils,
    Types,
    WireTypes,
} = require('js-amino');

let StdTx = TypeFactory.create('StdTx', [{
    name: 'msg',
    type: Types.ArrayInterface,
},
    {
        name: 'fee',
        type: Types.Struct,
    },
    {
        name: 'signatures',
        type: Types.ArrayStruct,
    },
    {
        name: 'memo',
        type: Types.String,
    },
]);

let MsgSend = TypeFactory.create('MsgSend', [{
    name: "to_address",
    type: Types.String,
},
    {
        name: "from_address",
        type: Types.String,
    },

    {
        name: "amount",
        type: Types.ArrayStruct
    }
]);
let MsgMultiSend = TypeFactory.create('MsgMultiSend', [{
    name: "inputs",
    type: Types.ArrayStruct
},
    {
        name: "outputs",
        type: Types.ArrayStruct
    }
]);
let Coin = TypeFactory.create('coin', [{
    name: 'denom',
    type: Types.String,
},
    {
        name: 'amount',
        type: Types.String,
    }
]);

let Input = TypeFactory.create('input', [{
    name: 'address',
    type: Types.String,
},
    {
        name: 'coins',
        type: Types.ArrayStruct,
    }
]);

let Output = TypeFactory.create('output', [{
    name: 'address',
    type: Types.String,
},
    {
        name: 'coins',
        type: Types.ArrayStruct,
    }
]);

let Fee = TypeFactory.create('fee', [{
    name: 'amount',
    type: Types.ArrayStruct,
},
    {
        name: 'gas',
        type: Types.Int64,
    }
]);

let Amount = TypeFactory.create('amount', [{
    name: 'denom',
    type: Types.String,
},
    {
        name: 'amount',
        type: Types.String,
    }
]);

let PubKeySecp256k1 = TypeFactory.create('PubKeySecp256k1', [{
    name: 's',
    type: Types.ByteSlice,
}], Types.ByteSlice)

let Signature = TypeFactory.create('signature', [{
    name: 'pub_key',
    type: Types.Interface,
},
    {
        name: 'signature',
        type: Types.ByteSlice,
    }
])

let codec = new Codec();

codec.registerConcrete(new StdTx(), 'auth/StdTx', {});
codec.registerConcrete(new MsgSend(), 'cosmos-sdk/MsgSend', {});
//codec.registerConcrete(new MsgMultiSend(), 'cosmos-sdk/MsgMultiSend', {});
codec.registerConcrete(new PubKeySecp256k1(), 'tendermint/PubKeySecp256k1', {});

let amount = new Amount('stake', "301");

let addressFrom = [ 59,58,243,13,132,163,164,202,233,7,236,93,136,166,181,175,236,69,48,186 ]
let addressTo = [ 94,222,114,42,196,107,51,203,139,142,219,243,137,60,54,250,139,153,46,168 ]

let sendMsg = new MsgSend(addressTo, addressFrom, [amount]);

let fee = new Fee([new Amount('stake', '300')], 40000);

let pubKey = new PubKeySecp256k1([2,27,24,0,255,96,147,21,64,29,132,192,108,219,59,134,206,201,126,224,63,160,24,236,170,124,164,95,43,180,6,246,250]);
let signature = [165,76,109,61,53,129,190,147,52,224,34,106,235,208,224,36,190,25,204,36,226,129,97,109,35,130,217,228,144,106,10,134,14,183,95,252,219,235,22,92,37,53,3,89,111,173,12,158,146,71,82,113,236,241,170,121,217,20,236,23,131,35,80,29];

let sig = new Signature(pubKey, signature);
let stdTx = new StdTx([sendMsg], fee, [sig], '');

let jsonTx = codec.marshalJson(stdTx);
let decodedDataTx = new StdTx();

const toHex = (buffer) => {
    let s = ''
    buffer.forEach((b) => {
        b = b.toString(16)
        if (b.length == 1) {
            b = '0' + b
        }
        s += b
    })
    return s
}

console.log("Binary stdTx:\n", (codec.marshalBinary(stdTx)).toString());
console.log("Json:\n", jsonTx);
const binaryData = codec.marshalBinary(stdTx);
//c401f0625dee0a3ea8a3619a0a145ede722ac46b33cb8b8edbf3893c36fa8b992ea812143b3af30d84a3a4cae907ec5d88a6b5afec4530ba1a0c0a057374616b65120333303112120a0c0a057374616b65120333303010c0b8021a6a0a26eb5ae98721021b1800ff609315401d84c06cdb3b86cec97ee03fa018ecaa7ca45f2bb406f6fa1240a54c6d3d3581be9334e0226aebd0e024be19cc24e281616d2382d9e4906a0a860eb75ffcdbeb165c253503596fad0c9e92475271ecf1aa79d914ec178323501d
console.log("hex:\n", toHex(binaryData));
console.log("base64:\n", Buffer.from(toHex(binaryData), 'hex').toString('base64'));

// a tx from on chain
//c401f0625dee0a3ea8a3619a0a1469d94710cac3107405fdd6a2ee164798be5829c71214b114f38e6c760f301cc78a440d6562a646cdad611a0c0a057374616b65120333303212120a0c0a057374616b65120333303010c0b8021a6a0a26eb5ae9872103dfa08bb19343d1e11c573e97882f9b0f59aa83a9780b401096100dc83c36731812409c5dcfc59bc27de8c58eb97ea47a69964c00d87fc273cb6afd279bf4fd17746b2acd9f16383e9f5aadc26d6b25d118d8a69b1b321e5f8240d77be40f53201a26
const base64OnChain = 'xAHwYl3uCj6oo2GaChRp2UcQysMQdAX91qLuFkeYvlgpxxIUsRTzjmx2DzAcx4pEDWVipkbNrWEaDAoFc3Rha2USAzMwMhISCgwKBXN0YWtlEgMzMDAQwLgCGmoKJuta6YchA9+gi7GTQ9HhHFc+l4gvmw9ZqoOpeAtAEJYQDcg8NnMYEkCcXc/Fm8J96MWOuX6kemmWTADYf8Jzy2r9J5v0/Rd0ayrNnxY4Pp9arcJtayXRGNimmxsyHl+CQNd75A9TIBom';
const hexOnChainTx = Buffer.from(base64OnChain, 'base64').toString('hex');
console.log("hex:\n", hexOnChainTx);

codec.unMarshalBinary(Utils.fromHex(hexOnChainTx), decodedDataTx);
console.log("Decoded data:\n", JSON.stringify(decodedDataTx.JsObject()));

For the go encode I used the rest endpoint /txs/encode and for the decode I used the /txs/decode endpoint from here: https://github.com/cosmos/cosmos-sdk/pull/4213

I have updated the code. This problem is occured due to empty array. I tested your code and it worked. Could you please check again?

So first of thank you very much that fixed this :)
So the return is:
{
	"msg": [{
		"to_address": "i�G\u0010��\u0010t\u0005�֢�\u0016G��X)�",
		"from_address": "�\u0014�lv\u000f0\u001cǊD\reb�Fͭa",
		"amount": [{
			"denom": "stake",
			"amount": "302"
		}]
	}],
	"fee": {
		"amount": [{
			"denom": "stake",
			"amount": "300"
		}],
		"gas": 40000
	},
	"signatures": [{
		"pub_key": [3, 223, 160, 139, 177, 147, 67, 209, 225, 28, 87, 62, 151, 136, 47, 155, 15, 89, 170, 131, 169, 120, 11, 64, 16, 150, 16, 13, 200, 60, 54, 115, 24],
		"signature": [156, 93, 207, 197, 155, 194, 125, 232, 197, 142, 185, 126, 164, 122, 105, 150, 76, 0, 216, 127, 194, 115, 203, 106, 253, 39, 155, 244, 253, 23, 116, 107, 42, 205, 159, 22, 56, 62, 159, 90, 173, 194, 109, 107, 37, 209, 24, 216, 166, 155, 27, 50, 30, 95, 130, 64, 215, 123, 228, 15, 83, 32, 26, 38]
	}],
	"memo": []
}

So what I don't understand is why is the memo from type array? should it not be a empty string? since its defined as Types.String ?

thanks for reporting, I'm fixing it


[0.76] FAULT: RCTAppDelegate::bundleURL not implemented

Environment
react-native -v: 0.76.3
npm ls react-native-macos<EMAIL_ADDRESS>node -v: v21.7.1
npm -v: 10.5.0
yarn --version: 4.5.3
xcodebuild -version: Xcode 16.1

Steps to reproduce the bug

Create a react-native-macos project (0.76.4, 0.76.3 or 0.76.0)
Open it in xcode and run (npx react-native run-macos builds, but no window or error is shown)

Expected Behavior
The app opens with a new window
Actual Behavior
The app do not open, and xcode shows that there was an error:
Can't find or decode disabled use cases
An uncaught exception was raised
Subclasses must implement a valid getBundleURL method
(
	0   CoreFoundation                      0x00000001870e4300 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x0000000186bcacd8 objc_exception_throw + 88
	2   CoreFoundation                      0x00000001870e41f0 +[NSException exceptionWithName:reason:userInfo:] + 0
	3   AwesomeProject.debug.dylib          0x00000001060deaf0 -[RCTAppDelegate bundleURL] + 52
	4   AwesomeProject.debug.dylib          0x00000001060df5d8 __42-[RCTAppDelegate createRCTRootViewFactory]_block_invoke + 44
	5   AwesomeProject.debug.dylib          0x00000001060e9278 -[RCTRootViewFactory bundleURL] + 56
	6   AwesomeProject.debug.dylib          0x00000001060e8b08 __38-[RCTRootViewFactory createReactHost:]_block_invoke.124 + 40
	7   AwesomeProject.debug.dylib          0x00000001062518a0 -[RCTHost start] + 88
	8   AwesomeProject.debug.dylib          0x00000001060e8930 -[RCTRootViewFactory createReactHost:] + 424
	9   AwesomeProject.debug.dylib          0x00000001060e8700 -[RCTRootViewFactory createReactHostIfNeeded:] + 144
	10  AwesomeProject.debug.dylib          0x00000001060e72bc -[RCTRootViewFactory viewWithModuleName:initialProperties:launchOptions:] + 280
	11  AwesomeProject.debug.dylib          0x00000001060de050 -[RCTAppDelegate loadReactNativeWindow:] + 176
	12  AwesomeProject.debug.dylib          0x00000001060ddf2c -[RCTAppDelegate applicationDidFinishLaunching:] + 620
	13  AwesomeProject.debug.dylib          0x0000000105bd3e30 -[AppDelegate applicationDidFinishLaunching:] + 128
	14  CoreFoundation                      0x0000000187066800 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
	15  CoreFoundation                      0x00000001870f766c ___CFXRegistrationPost_block_invoke + 88
	16  CoreFoundation                      0x00000001870f75b4 _CFXRegistrationPost + 436
	17  CoreFoundation                      0x000000018703543c _CFXNotificationPost + 732
	18  Foundation                          0x00000001881ddb14 -[NSNotificationCenter postNotificationName:object:userInfo:] + 88
	19  AppKit                              0x000000018aba4614 -[NSApplication _postDidFinishNotification] + 284
	20  AppKit                              0x000000018aba43c4 -[NSApplication _sendFinishLaunchingNotification] + 172
	21  AppKit                              0x000000018aba2824 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 500
	22  AppKit                              0x000000018aba242c -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 488
	23  Foundation                          0x000000018820679c -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 316
	24  Foundation                          0x0000000188206594 _NSAppleEventManagerGenericHandler + 80
	25  AE                                  0x000000018e554134 _AppleEventsCheckInAppWithBlock + 13904
	26  AE                                  0x000000018e553a58 _AppleEventsCheckInAppWithBlock + 12148
	27  AE                                  0x000000018e54cfa4 aeProcessAppleEvent + 488
	28  HIToolbox                           0x00000001923fdc4c AEProcessAppleEvent + 68
	29  AppKit                              0x000000018ab9bd00 _DPSNextEvent + 1420
	30  AppKit                              0x000000018b4dbe0c -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
	31  AppKit                              0x000000018ab8eae0 -[NSApplication run] + 480
	32  AppKit                              0x000000018ab65364 NSApplicationMain + 888
	33  AwesomeProject.debug.dylib          0x0000000105bd3da4 __debug_main_executable_dylib_entry_point + 36
	34  dyld                                0x0000000186c08274 start + 2840
)
FAULT: RCTAppDelegate::bundleURL not implemented: Subclasses must implement a valid getBundleURL method; (user info absent)
NSBundle file:///System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed
WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.

Reproducible Demo
No response
Additional context
I as able to fix it with a patch suggested in an older issue:

Just documenting for anyone on v0.74. When generating a fresh<EMAIL_ADDRESS>app, the following error will be raised on startup:
RCTAppDelegate::bundleURL not implemented
Subclasses must implement a valid getBundleURL method

It can be fixed, as suggested above, by applying the following patch to AppDelegate.mm:
  - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
  {
- #if DEBUG
-   return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
- #else
-   return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
- #endif
+   return [self bundleURL];
  }
+
+ - (NSURL *)bundleURL
+ {
+ #if DEBUG
+   return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
+ #else
+   return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
+ #endif
+ }

Originally posted by @shirakaba in #2164
With these changes the app builds and opens successfully

Thanks for the report and fix! Any chance you'd be willing to submit a PR for this? Otherwise I'll try to get to it next week.

Sure! just opened #2309


Error handling and timeouts

This PR adds a few backwards-compatible changes for handling error conditions.
An option (raise_on_errors) is introduced which allows users to handle error-responses a little more explicitly:
client = Shipwire(username="...", password="...", raise_on_errors=True)

try:
    response = client.some.operation(json=malformed_data)
except shipwire.RequestError as exc:
    return handle_error(exc.response)

return handle_success(response)

As this behavior is backwards-incompatible, the user must opt in.  Existing code will be unaffected.
Another option (timeout) is introduced which allows users to specify timeout errors.  In practice, I've actually seen quite a few hung connections when interacting with Shipwire's API.  requests actually offers the ability to enforce timeouts, but there's currently no way to configure that outside of the package.  timeout allows a user to set time limits and handle them gracefully:
# 1 second connect timeout, 10 second read timeout.
client = Shipwire(username="...", password="...", timeout=(1.0, 10.0))

try:
    response = client.some.long.operation()
except shipwire.TimeoutError as exc:
    return retry_later()

Both RequestError and TimeoutError descend from ShipwireError, meaning that a user is able to add a catch-all handler for all wrapper level errors (except shipwire.ShipwireError:).

For my information, would having an errors.py file make editing the copy of all error messages on the site centralized? If so, big love for the idea. ❤❤❤

@durbin updated.  shipwire.exceptions now contains all error stuff.  They're imported into the shipwire.api (and consequently shipwire) namespace, so it should be completely backwards compatible.

:+1:


Replace min/max, make quantile_mut return None for empty arrays, and fix docs

This PR does a few things:

Replace the old min/max methods with the old min_partialord/max_partialord. (Rename min_partialord/max_partialord to min/max.) See this comment for more explanation. The primary issue with the old min/max methods is that they panicked on empty arrays.
Make quantile_mut return None for empty arrays. It's easy to forget about the possibility of empty arrays, so it's important to remind the user of the possibility and force them to handle it. See this comment for more justification.
Fix the conditions for panicking in the docs of histogram strategies and quantile_mut.

Edit: I'm uncomfortable with the histogram strategies panicking in so many cases, but we can fix that in a later version.

I'll review it tomorrow morning.
On histogram's panics: should we change the signature to return a Result?
We panic in those occasions where it is not possible to provide an answer that makes sense:

what is the optimal bin width for a constant/empty array?
how do I handle degenerate cases (e.g. IQR=0 in Freedman Diaconis)?

Returning a Result would probably give a chance to the user to specify a default that makes sense to them, especially if we provide a useful error.

For empty arrays, I think the right thing to do is to have Edges be an empty Vec (no bins).
For constant arrays, I think the right thing to do is have Edges be vec![the_constant_value] (no bins) or vec![the_constant_value, the_constant_value + 1] (one bin). Alternatively, if we change Edges to allow duplicate edges, we could use vec![the_constant_value; 2] (one bin).
For Freedman Diaconis with IQR=0, I'm not sure; that requires some thought. Panicking definitely isn't the right thing, because IMO panics shouldn't be a function of the data in the array. I think I'd return an Option/Result or have a fallback strategy. At first glance, the Option/Result appeals to me more.
By the way, in a future version, I'm thinking about replacing GridBuilder with a fit_array method on Grid and simplifying the BinsBuildingStrategy trait:
impl<A: Ord> Grid<A> {
    fn fit_array<S, B>(array: &ArrayBase<S, Ix2>, strategy: &B) -> Result<Self, Error>
    where
        S: Data<Elem = A>,
        B: BinsBuildingStrategy<A>,
    {
        // ...
    }
}

pub trait BinsBuildingStrategy<A: Ord> {
    fn fit_array<S>(&self, array: &ArrayBase<S, Ix1>) -> Result<Bins<A>, Error>
    where
        S: Data<Elem = A>;
}

The BinsBuildingStrategy types wouldn't contain the min/max/n_bins/etc. derived from a specific array; they'd contain whatever metadata would be necessary to calculate the Bins in fit_array. This would simplify handling of special cases and would simplify the public API a little. What do you think about this?

For empty arrays, I think the right thing to do is to have Edges be an empty Vec (no bins).

It makes sense, I agree.

For constant arrays, I think the right thing to do is have Edges be vec![the_constant_value] (no bins) or vec![the_constant_value, the_constant_value + 1] (one bin). Alternatively, if we change Edges to allow duplicate edges, we could use vec![the_constant_value; 2] (one bin).

We could use a "default" width of 1, that could be the way. I'd avoid duplicate edges since they would still lead to empty bins and a degenerate grid (no observation would be captured), thus surprising the user.

By the way, in a future version, I'm thinking about replacing GridBuilder with a fit_array method on Grid and simplifying the BinsBuildingStrategy trait:
impl<A: Ord> Grid<A> {
    fn fit_array<S, B>(array: &ArrayBase<S, Ix2>, strategy: &B) -> Result<Self, Error>
    where
        S: Data<Elem = A>,
        B: BinsBuildingStrategy<A>,
    {
        // ...
    }
}

pub trait BinsBuildingStrategy<A: Ord> {
    fn fit_array<S>(&self, array: &ArrayBase<S, Ix1>) -> Result<Bins<A>, Error>
    where
        S: Data<Elem = A>;
}

The BinsBuildingStrategy types wouldn't contain the min/max/n_bins/etc. derived from a specific array; they'd contain whatever metadata would be necessary to calculate the Bins in fit_array. This would simplify handling of special cases and would simplify the public API a little. What do you think about this?

A fit_array method sounds good to me, as a shortcut on Grid to simplify the public API, but you still need extremes and a bin width to execute all the strategies we have implemented, hence I think the new strategy would end up quite similar to the ones we have right now. They would probably just squeeze everything in a single method.


Update Organization Registration Forum

Please update organization registration forum with the next:

[x] All student preferences - Work days, work hours, needed skills etc.

[x] Update forum style to match the volunteers forum.

[x] Add username and password fields for future signing.

[x] Update the posted organization object with the new fields.

Everything is done waiting for team to check the code before pushing

Code done. Nice!


Feature/partially static shape

@diorcety , @jeanlaroche : can you check the impact of this commit on your code base, in terms of ndarray change ?

Sure let me check.

mmm, one of my functions no longer compiles on the mac. It does on the latest from master but not on feature/partially-static-shape
I will send you the file.


fix(profiler): ignore pc outside of function area

Fixes the End of program reached, but trace continues. error which occurs when program counter is outside the function area. Can be reproduced on the program attached.
sha256.cairo.txt
cargo run --bin cairo-run -- --single-file sha256.cairo --available-gas<PHONE_NUMBER>00 --run-profiler

@piotmag769 thank you for leaving that comment in cairo-profiler, I would spend another week trying to understand why it is happening 😅


Need an API to force an annotation's value to be computed

This is needed by DDC in order to do certain optimizations, including optimization of accesses to native objects, such as in dart:html.
The nicest API would be for constant values to be computed any time you asked for them. We need to look at the possible performance implications of this approach.
If that doesn't work, then we need some other API (possibly implemented by computing a result via the task model) that could be used for the same purpose.

I just performed a quick experiment. There is existing code that breaks if we try to change the current semantics of evaluationResult to lazily compute the result. I think we need to introduce a separate API that will force the value to be computed.


[BUG]: Inadvertently exposing metrics data

Describe the bug
The default Helm chart deployment is inadvertently exposing metrics data.
To Reproduce
Steps to reproduce the behavior:

Deploy Karavi Observability via the Helm chart (karavi-observability-0.2.0)
Metrics endpoint is exposed external to the cluster

Expected behavior
The metrics endpoint is not accessible outside of the Kubernetes cluster
System Information (please complete the following information):

Kubernetes Version: 1.18
karavi-metrics-powerflex Version: 0.2.0-pre-release
karavi-topology Version: 0.2.0-pre-release
Helm chart version: karavi-observability-0.2.0

Resolved with release 0.2.1


commit archive dirs and update version

Sorry for the error. This pull request should be sent to the hotosm fork.

@willemarcel please merge all this good work to this master when you are ready.


Folding not worrking with vscode

System Information
V doctor
OS: linux, Ubuntu 20.04.4 LTS
Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
CC version: cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

getwd: /home/mohammed/.vmodules/threefoldtech/rmb/msgbusd
vmodules: /home/mohammed/.vmodules
vroot: /home/mohammed/Documents/v
vexe: /home/mohammed/Documents/v/v
vexe mtime: 2022-02-18 21:33:18
is vroot writable: true
is vmodules writable: true
V full version: V 0.2.4 f8b8950.4cdb244

Git version: git version 2.25.1
Git vroot status: weekly.2022.07-45-g4cdb2441 (27 commit(s) behind V master)
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 3654d6a8

VLS info
vls version 0.0.1.e4ae12f

Problem Description

Folding not working with VSCode, when I disable it, default VSCode folding works, and it is fine for me.
Expected Output

Folding working without problem.
Actual Output

Folding not working.
Steps to Reproduce

Open VSCode on any v project and vls enabled
Folding not working
Add folding_range to disable features OR close vls.
Folding works fine

Last Recorded LSP Requests

@MElborolossy Just a followup, have you tried updating VLS? If not, you may download the prebuilt binaries here and follow these steps. Thanks 🙂

I know that vls still in development phase, but it still crash, auto-complete not good enough, goto function or variable work randomly.
Kindly, vls needs a lot of work to be usable.

Thank you for your feedback. Your concerns are valid and they contribute to the stability of VLS.
I will be closing this issue since https://github.com/vlang/vls/commit/2fe3f734d9615cb7c5eb8001ed5b24e6f7cb3c2a has fixed this which I tried.


Inconsistency in initial project setup for actions running via rasa or via sdk

Currently, when running an action server with rasa run actions, the default looks in actions.py in the base of your project directory. actions.py is created there as part of the initial project.
However, if you build in docker, the default place to find actions is in actions/actions.py. https://github.com/RasaHQ/rasa-sdk/blob/master/Dockerfile#L40
This makes it confusing -- when teaching the user to create custom actions in Docker, we have to tell them to create the new folder with an actions file, when actions.py already exists: https://rasa.com/docs/rasa/user-guide/how-to-deploy/#creating-a-custom-action
This seems to also have caused confusion here: https://github.com/RasaHQ/rasa-sdk/pull/140#issuecomment-586936047
We should make the default behavior consistent. I'm partial to having an actions folder as it's probably quite normal for a larger actions file to reference other files. However that will probably involve changing a decent amount of references in e.g. tutorials.

@erohmensing are you working on this atm? if not, please unassign

I'd agree, let's change the default project (rasa init) as well as the examples to use an actions folder instead of a file. so the resulting structure should be:
moodbot/
├── domain.yml
├── actions/
│   ├── __init__.py
│   └── actions.py
├── ...

I think there might be a __init__.py at a rasa bots root directory by default (so in moodbot), I am not sure we need that one

@erohmensing Imo this needs to go in before the RC next week. Do you have this on your radar or should our squad take this over?

i'm gonna speak for our team and say that we are slammed with customers + 2.0 docs at the moment, so it'd be nice if your squad takes it :)

@alwx @tczekajlo is it ok for you if we take on this time critical task? Rick is also back onboard then, so I think we do this despite our decoupling commitment

@alwx @tczekajlo is it ok for you if we take on this time critical task? Rick is also back onboard then, so I think we do this despite our decoupling commitment

I'm ok with that, not sure If I'm the best person to do this if it's time-critical task though 😄

It's time critical in a sense that it should be done until next week. I'll add it to our board.

reminder to update the CLI documentation and others on initial project setup


content/join: List accessibility measures

This has come up in a past workshop, and we actually do a lot when
you think about it.  Mention it here.
But, it does add a lot of text.  Maybe it is better to remove it?
Or move it to "how to attend online" and add just a link here?
Review:

Proofread
Anything missing?
Is text too much?  Think of other places to put it or remove it.

Can we add that we are aware that in some instances alt-text is missing and some sections are probably difficult to understand and follow without graphics and that we are striving to improve material for visually impaired but also unfortunately aware that there is currently a lot of room for improvement.

Also I can send a follow-up PR. Didn't want to dump it on you. Merging.


Cannot able to install connaisseur giving error of time out due to atomic being set

Hi,
I was trying to setup a use case where I have installed notary server locally in my kubernetes cluster as a container which runs on this URL => https://localhost:4443 and also local registry I installed as a container which runs on localhost:5000.
So I have generated the key to sign the image with DCT and push my image into local registry and set the DOCKER_CONTENT_TRUST_SERVER=https://localhost:4443.
SO while validating the image with connaisseur I need to install connaisseur but I am getting below error:
root@ubuntuserver:~/test/connaisseur# helm install connaisseur helm --atomic --create-namespace --namespace connaisseur
Error: INSTALLATION FAILED: release connaisseur failed, and has been uninstalled due to atomic being set: timed out waiting for the condition
Please help me to resolve the issue.
Thanks!

@n30gupta could you share some more details such as Kubernetes version, flavor (e.g. bare metal, Kind, microk8s, AKS, GKE, Openshift)? Also which resources do you see spinning up before installation fails? Could you share the kubectl describe of those resources?
The problem may be caused by the secure default securityContext. Please checkout and adjust helm/values.yaml: https://sse-secure-systems.github.io/connaisseur/v2.2.1/basics/#configure
Let me know if that helps 🙏

@xopham I have installed notary locally and when I am giving the URL of my notary server https://localhost:4443 in helm/values.yaml file. So when installing connaisseur with this configuration I am facing the error but when I install with default configuration I am not facing any error.
Kubernetes is running on bare metal and it is on version 1.21
Is there any specific guide where there is a process of integrating local Notary server with connaisseur as in default configuration the notary uses docker hub url  notary.docker.io

@n30gupta gotcha! Thanks for letting me know.
I found the issue. It is a problem with the json schema validation of the configuration: https://github.com/sse-secure-systems/connaisseur/blob/master/connaisseur/res/config_schema.json#L40
"pattern": "[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}"

This requires a full domain (e.g. example.com). Escalating to bug and should be fixed rather quickly.


🐛 [firebase_messaging] Notification Images setup problem iOS

Bug report
Describe the bug
In iOS, When trying to setup FCM(with image support) the app does not compile. The documentation steps result in errors.
Steps to reproduce
Steps to reproduce the behavior:

Create a clean Flutter app and add FCM setup for iOS.
Go to (Advanced, Optional) Allowing Notification Images and do the necessary steps.
For the step named "Add target to the Podfile", copy paste the exact:

target 'ImageNotification' do
  pod 'Firebase/Messaging'
end

Do the next 2 steps as written in the flutter fire docs
Since there is no use_framewroks! in the docs, we get this error:

[!] Unable to integrate the following embedded targets with their respective host targets (a host target is a "parent" target which embeds a "child" target like a framework or extension):

- Runner (true) and ImageNotification (false) do not both set use_frameworks!.

If i add the use_frameworks!, then it compiles, but I get this error:

ld: '/Users/berat/Documents/projects/sponty_missions/video_tutorial/build/ios/Debug-iphoneos/PromisesObjC-iOS14.2/FBLPromises.framework/FBLPromises' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '/Users/berat/Documents/projects/sponty_missions/video_tutorial/build/ios/Debug-iphoneos/PromisesObjC-iOS14.2/FBLPromises.framework/FBLPromises' for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

Expected behavior
FCM has Image capabilities as expected and the project compiles without error

Additional context
I tried both creating the Image Notification Service Extension as an Objective C file and a Swift file. Nothing changed
Also I tried enabling the bitcode setting but still no luck.

Flutter doctor
Run flutter doctor and paste the output below:
Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.4, on macOS 11.0.1 20B29 darwin-x64, locale en-TR)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.51.1)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

Flutter dependencies
Run flutter pub deps -- --style=compact and paste the output below:
Click To Expand
Dart SDK 2.10.4
Flutter SDK 1.22.4
bare_bones 1.0.0+1

dependencies:
- auto_route 0.6.9 [flutter meta]
- bloc 6.1.0 [meta]
- camera 0.5.8+11 [flutter]
- cloud_firestore 0.14.3 [flutter meta quiver firebase_core firebase_core_platform_interface cloud_firestore_platform_interface cloud_firestore_web]
- cloud_functions 0.7.0+1 [meta flutter firebase_core firebase_core_platform_interface cloud_functions_platform_interface cloud_functions_web]
- connectivity 2.0.1 [flutter meta connectivity_platform_interface connectivity_macos connectivity_for_web]
- cupertino_icons 1.0.0
- dartz 0.9.2
- firebase_auth 0.18.3 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter]
- firebase_core 0.5.2 [firebase_core_platform_interface flutter quiver meta firebase_core_web]
- firebase_messaging 7.0.3 [meta flutter firebase_core]
- firebase_storage 5.0.1 [flutter firebase_core firebase_core_platform_interface firebase_storage_platform_interface quiver]
- flushbar 1.10.4 [flutter]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_bloc 6.1.0 [flutter bloc provider]
- flutter_ffmpeg 0.3.0 [flutter]
- flutter_localizations 0.0.0 [flutter intl characters collection meta path typed_data vector_math]
- flutter_signin_button 1.1.0 [flutter font_awesome_flutter]
- freezed 0.12.2 [analyzer build build_config meta source_gen freezed_annotation]
- gallery_saver 2.0.1 [flutter path_provider http path]
- get_it 5.0.1 [async meta]
- google_sign_in 4.5.6 [google_sign_in_platform_interface flutter meta google_sign_in_web]
- injectable 1.0.5 [get_it]
- lamp 0.0.6 [flutter]
- logger 0.9.4
- path 1.8.0-nullsafety.1
- path_provider 1.6.24 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
- rxdart 0.24.1
- screen 0.0.5 [flutter]
- sign_in_with_apple 2.5.4 [meta flutter]
- uuid 2.2.2 [crypto convert]
- video_player 1.0.0 [meta video_player_platform_interface video_player_web flutter]

dev dependencies:
- auto_route_generator 0.6.10 [build source_gen analyzer path build_runner auto_route]
- bloc_test 7.1.0 [bloc test meta mockito]
- build_runner 1.10.4 [args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style glob graphs http_multi_server io js logging meta mime path pedantic pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
- freezed_annotation 0.12.0 [collection json_annotation meta]
- injectable_generator 1.0.6 [build source_gen path glob analyzer injectable collection]
- json_serializable 3.5.0 [analyzer build build_config json_annotation meta path source_gen]
- lint 1.3.0

dependency overrides:
- analyzer 0.40.4 [_fe_analyzer_shared args charcode cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]

transitive dependencies:
- _fe_analyzer_shared 11.0.0 [meta]
- args 1.6.0
- async 2.5.0-nullsafety.1 [collection]
- boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner]
- build 1.5.0 [analyzer async convert crypto logging meta path glob]
- build_config 0.4.2 [checked_yaml json_annotation meta path pubspec_parse yaml]
- build_daemon 2.1.4 [built_collection built_value http_multi_server logging pedantic path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 1.4.3 [analyzer build crypto graphs logging meta path package_config pool pub_semver]
- build_runner_core 6.0.3 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pedantic pool timing watcher yaml]
- built_collection 4.3.2 [collection quiver]
- built_value 7.1.0 [built_collection collection fixnum quiver]
- characters 1.1.0-nullsafety.3
- charcode 1.2.0-nullsafety.1
- checked_yaml 1.0.2 [json_annotation source_span yaml]
- cli_util 0.2.0 [path]
- clock 1.1.0-nullsafety.1
- cloud_firestore_platform_interface 2.2.0 [flutter meta collection firebase_core plugin_platform_interface]
- cloud_firestore_web 0.2.1 [flutter flutter_web_plugins http_parser meta firebase_core firebase_core_web cloud_firestore_platform_interface js]
- cloud_functions_platform_interface 3.0.1 [flutter meta firebase_core plugin_platform_interface]
- cloud_functions_web 3.0.1 [firebase_core cloud_functions_platform_interface flutter flutter_web_plugins firebase http_parser meta]
- code_builder 3.5.0 [built_collection built_value collection matcher meta]
- collection 1.15.0-nullsafety.3
- connectivity_for_web 0.3.1+4 [connectivity_platform_interface flutter_web_plugins flutter]
- connectivity_macos 0.1.0+7 [flutter]
- connectivity_platform_interface 1.0.6 [flutter meta plugin_platform_interface]
- convert 2.1.1 [charcode typed_data]
- coverage 0.14.1 [args logging package_config path source_maps stack_trace vm_service]
- crypto 2.1.5 [collection convert typed_data]
- dart_style 1.3.9 [analyzer args path source_span]
- fake_async 1.2.0-nullsafety.1 [clock collection]
- ffi 0.1.3
- file 5.2.1 [intl meta path]
- firebase 7.3.2 [http http_parser js]
- firebase_auth_platform_interface 2.1.3 [flutter meta firebase_core plugin_platform_interface]
- firebase_auth_web 0.3.2 [flutter flutter_web_plugins meta http_parser intl firebase_core firebase_core_web firebase_auth_platform_interface js]
- firebase_core_platform_interface 2.0.0 [flutter meta plugin_platform_interface quiver]
- firebase_core_web 0.2.1 [firebase_core_platform_interface flutter flutter_web_plugins meta js]
- firebase_storage_platform_interface 1.0.1 [flutter meta collection firebase_core plugin_platform_interface]
- fixnum 0.10.11
- flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math]
- font_awesome_flutter 8.10.0 [flutter]
- glob 1.2.0 [async collection node_io path pedantic string_scanner]
- google_sign_in_platform_interface 1.1.2 [flutter meta quiver]
- google_sign_in_web 0.9.2 [google_sign_in_platform_interface flutter flutter_web_plugins meta js]
- graphs 0.2.0
- http 0.12.2 [http_parser path pedantic]
- http_multi_server 2.2.0 [async]
- http_parser 3.1.4 [charcode collection source_span string_scanner typed_data]
- intl 0.16.1 [path]
- io 0.3.4 [charcode meta path string_scanner]
- js 0.6.3-nullsafety.1
- json_annotation 3.1.0
- logging 0.11.4
- matcher 0.12.10-nullsafety.1 [stack_trace]
- meta 1.3.0-nullsafety.3
- mime 0.9.7
- mockito 4.1.3 [analyzer build code_builder collection dart_style matcher meta source_gen test_api]
- nested 0.0.4 [flutter]
- node_interop 1.1.1 [js]
- node_io 1.1.1 [node_interop path]
- node_preamble 1.4.12
- package_config 1.9.3 [path charcode]
- path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter]
- path_provider_macos 0.0.4+4 [flutter]
- path_provider_platform_interface 1.0.3 [flutter meta platform plugin_platform_interface]
- path_provider_windows 0.0.4+1 [path_provider_platform_interface meta path flutter ffi win32]
- pedantic 1.10.0-nullsafety.1
- platform 2.2.1
- plugin_platform_interface 1.0.3 [meta]
- pool 1.5.0-nullsafety.1 [async stack_trace]
- process 3.0.13 [file intl meta path platform]
- provider 4.3.2+2 [flutter nested collection]
- pub_semver 1.4.4 [collection]
- pubspec_parse 0.1.5 [checked_yaml json_annotation pub_semver yaml]
- quiver 2.1.3 [matcher meta]
- shelf 0.7.9 [async collection http_parser path stack_trace stream_channel]
- shelf_packages_handler 2.0.0 [path shelf shelf_static]
- shelf_static 0.2.8 [convert http_parser mime path shelf]
- shelf_web_socket 0.2.3 [shelf web_socket_channel stream_channel]
- sky_engine 0.0.99
- source_gen 0.9.7+1 [analyzer async build dart_style glob meta path pedantic source_span]
- source_map_stack_trace 2.1.0-nullsafety.2 [path stack_trace source_maps]
- source_maps 0.10.10-nullsafety.1 [source_span]
- source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph]
- stack_trace 1.10.0-nullsafety.1 [path]
- stream_channel 2.1.0-nullsafety.1 [async]
- stream_transform 1.2.0
- string_scanner 1.1.0-nullsafety.1 [charcode source_span]
- term_glyph 1.2.0-nullsafety.1
- test 1.16.0-nullsafety.5 [analyzer async boolean_selector coverage http http_multi_server io js node_preamble package_config path pedantic pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core]
- test_api 0.2.19-nullsafety.2 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- test_core 0.3.12-nullsafety.5 [analyzer async args boolean_selector collection coverage glob io meta package_config path pedantic pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api]
- timing 0.1.1+2 [json_annotation]
- typed_data 1.3.0-nullsafety.3 [collection]
- vector_math 2.1.0-nullsafety.3
- video_player_platform_interface 2.2.0 [flutter meta]
- video_player_web 0.1.4 [flutter flutter_web_plugins meta video_player_platform_interface]
- vm_service 5.2.0 [meta]
- watcher 0.9.7+15 [async path pedantic]
- web_socket_channel 1.1.0 [async crypto stream_channel]
- webkit_inspection_protocol 0.7.3 [logging]
- win32 1.7.3 [ffi]
- xdg_directories 0.1.2 [meta path process]
- yaml 2.2.1 [charcode collection string_scanner source_span]

That guide is meant for the dev version of the plugin but I can confirm that I see the same with Xcode 12.2, flutter master 1.24.0-8.0.pre.268 and firebase_messaging: ^8.0.0-dev.8.

flutter doctor -v
[✓] Flutter (Channel master, 1.24.0-8.0.pre.268, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-GB)
    • Flutter version 1.24.0-8.0.pre.268 at /Users/markus/development/flutter_master
    • Framework revision e803b13f01 (6 hours ago), 2020-11-16 22:55:59 -0800
    • Engine revision f0e80100f7
    • Dart version 2.12.0 (build 2.12.0-49.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at /Users/markus/Library/Android/sdk
    • Platform android-30, build-tools 30.0.1
    • Java binary at: /Users/markus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.6858069/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.2, Build version 12B45b
    • CocoaPods version 1.10.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Users/markus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.6858069/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      � https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      � https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (3 available)
    • macOS (desktop)  • macos      • darwin-x64     • Mac OS X 10.15.7 19H2 darwin-x64
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome 86.0.4240.198
    ! Error: Nevercode’s iPhone has recently restarted. Xcode will continue when Nevercode’s iPhone is unlocked. (code -14)

• No issues found!

Compiling works when adding this and setting bitcode to no for the ImageNotification target:
target 'ImageNotification' do
  use_frameworks!

  pod 'Firebase/Messaging'
end

@DFelten compiling works when use_frameworks is added however it crashes once it compiles.

Compiling works when adding this and setting bitcode to no for the ImageNotification target:
target 'ImageNotification' do
  use_frameworks!

  pod 'Firebase/Messaging'
end

Disabling bit_code and use_frameworks! did the trick! Thanks. Is this only needed for projects that have swift support?

Compiling works when adding this and setting bitcode to no for the ImageNotification target:
target 'ImageNotification' do
  use_frameworks!

  pod 'Firebase/Messaging'
end

Disabling bit_code and use_frameworks! did the trick! Thanks. Is this only needed for projects that have swift support?

Doing this will get everything to build, but it doesn't seem to actually run the notification service extension. Looking through the console, there's an unhelpful error that just says "Couldn't load extension" and another that then notes "Notification request was marked as mutable but no service extension is available".
I haven't figured it out yet, but looking elsewhere it seems like it may be related to limits on size/memory that could cause the extension to fail to load.

Had the same problem. Updated all libraries (at this moment versions are
  firebase_core: ^0.7.0   firebase_messaging: "^8.0.0-dev.13"   firebase_crashlytics: ^0.4.0
I did everything including use_frameworks! and "enable bitcode", but with no luck. The build was successful, but without images in notifications.
As for me, this thread solved the problem https://stackoverflow.com/questions/39663903/ios10-unnotificationserviceextension-not-called
Especially setting Deployment target the same as in Runner in XCode (there is an answer with image and steps the thread)

Had the same problem. Updated all libraries (at this moment versions are
  firebase_core: ^0.7.0   firebase_messaging: "^8.0.0-dev.13"   firebase_crashlytics: ^0.4.0
I did everything including use_frameworks! and "enable bitcode", but with no luck. The build was successful, but without images in notifications.
As for me, this thread solved the problem https://stackoverflow.com/questions/39663903/ios10-unnotificationserviceextension-not-called
Especially setting Deployment target the same as in Runner in XCode (there is an answer with image and steps the thread)

I was able to follow the steps of the guide with the latest versions of the plugins (firebase_core: ^0.7.0 and firebase_messaging: ^8.0.0-dev.14) and build a dev IPA with them even using bitcode. The image notifications work just fine.
However the documentation does not mention adding use_frameworks! to the podfile.
To those of you who got the app to compile but did not receive an image I would remind you of https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification where it is specified that

Contains the URL of an image that is going to be downloaded on the device and displayed in a notification. JPEG, PNG, BMP have full support across platforms. Animated GIF and video only work on iOS. WebP and HEIF have varying levels of support across platforms and platform versions. Android has 1MB image size limit.

I was able to follow the steps of the guide with the latest versions of the plugins (firebase_core: ^0.7.0 and firebase_messaging: ^8.0.0-dev.14) and build a dev IPA with them even using bitcode. The image notifications work just fine.
However the documentation does not mention adding use_frameworks! to the podfile.
To those of you who got the app to compile but did not receive an image I would remind you of https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification where it is specified that

Contains the URL of an image that is going to be downloaded on the device and displayed in a notification. JPEG, PNG, BMP have full support across platforms. Animated GIF and video only work on iOS. WebP and HEIF have varying levels of support across platforms and platform versions. Android has 1MB image size limit.

Especially setting Deployment target the same as in Runner in XCode (there is an answer with image and steps the thread)

Setting the deployment to the same version solved this for me as well. My main Runner was ios 10.0, but the extension was automatically set to ios 14.4

Pushing the thread since
use_frameworks!
is still missing from the documentation which cost me some time till I found this thread.
Thank you guys!

unable to build with lates libraries.
`
.........../ios/build/Debug-iphoneos/PromisesObjC/FBLPromises.framework/FBLPromises' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '..../ios/build/Debug-iphoneos/PromisesObjC/FBLPromises.framework/FBLPromises' for architecture arm64
`
tryed with bitcode on and off
use_frameworks!
on xcode 12.4 no bitcode option for target ImageExtension

I just add "use_frameworks!" and it work :))

Hey people, for those who managed to configure it, how do you send the image in the payload?  Do you have some example of the notification that you send?.

Hey people, for those who managed to configure it, how do you send the image in the payload? Do you have some example of the notification that you send?.

Hi. This example for send message firebase with endpoint
Content-Type: application/json
Authorization: Bearer ya29.ElqKBGN2Ri_Uz...HnS_uNreA
{
"message":{
"token" : "...",
"notification" : {
"body" : "This is an FCM notification that displays an image.!",
"title" : "FCM Notification",
},
"apns": {
"payload": {
"aps": {
"mutable-content": 1
}
},
"fcm_options": {
"image": "url-to-image"
}
}
}
}

hi @lqmminh thanks for the answer, I'm trying using CURL for sending the push but it doesn't work for me .
I tried different ways but none of those worked :(. I receive the push notification but I don't see the image.
DATA='{"mutable-content": true, "apns": { "payload": { "aps": { "mutable-content": 1 } }, "fcm_options": { "image": "https://i.ytimg.com/vi/jn6m33x05Fw/maxresdefault.jpg" } }, "notification": {"image": "https://i.ytimg.com/vi/jn6m33x05Fw/maxresdefault.jpg", "body": "Take a look","title": "Hey, Did you receive this push?"}, "priority": "high", "data": {"click_action": "FLUTTER_NOTIFICATION_CLICK"}, "to": "token_id"}'
curl https://fcm.googleapis.com/fcm/send -H "Content-Type:application/json" -X POST -d "$DATA" -H "Authorization: key=MYKEY.

I'm using firebase_messaging: 8.0.0-dev.15

hi @lqmminh thanks for the answer, I'm trying using CURL for sending the push but it doesn't work for me .
I tried different ways but none of those worked :(. I receive the push notification but I don't see the image.
DATA='{"mutable-content": true, "apns": { "payload": { "aps": { "mutable-content": 1 } }, "fcm_options": { "image": "https://i.ytimg.com/vi/jn6m33x05Fw/maxresdefault.jpg" } }, "notification": {"image": "https://i.ytimg.com/vi/jn6m33x05Fw/maxresdefault.jpg", "body": "Take a look","title": "Hey, Did you receive this push?"}, "priority": "high", "data": {"click_action": "FLUTTER_NOTIFICATION_CLICK"}, "to": "token_id"}'
curl https://fcm.googleapis.com/fcm/send -H "Content-Type:application/json" -X POST -d "$DATA" -H "Authorization: key=MYKEY.

I'm using firebase_messaging: 8.0.0-dev.15

This message send success?

hi @lqmminh thanks for the answer, I'm trying using CURL for sending the push but it doesn't work for me .
I tried different ways but none of those worked :(. I receive the push notification but I don't see the image.
DATA='{"mutable-content": true, "apns": { "payload": { "aps": { "mutable-content": 1 } }, "fcm_options": { "image": "https://i.ytimg.com/vi/jn6m33x05Fw/maxresdefault.jpg" } }, "notification": {"image": "https://i.ytimg.com/vi/jn6m33x05Fw/maxresdefault.jpg", "body": "Take a look","title": "Hey, Did you receive this push?"}, "priority": "high", "data": {"click_action": "FLUTTER_NOTIFICATION_CLICK"}, "to": "token_id"}'
curl https://fcm.googleapis.com/fcm/send -H "Content-Type:application/json" -X POST -d "$DATA" -H "Authorization: key=MYKEY.

I'm using firebase_messaging: 8.0.0-dev.15

This message send success?

Yes

@diegoveloper The image can just be in the notification object and it should work on both Android and iOS. Since you are sending the curl request to the deprecated API it should look something like this:
        {
            "to": token,
            "notification": {
                "title": "Title",
                "body": "Body",
                "image": "https://i.ibb.co/SPYWphH/37d.jpg"
            }
        }

However I recommend you take a look at https://github.com/FirebaseExtended/flutterfire/issues/4611#issuecomment-757917877  for an example of how to use the recommended FCM v1 HTTP API

@markusaksli-nc I tried with the json you posted but I got the same results, I get the notification without image :/.

If you are using firebase-node-sdk
import * as admin from "firebase-admin";

const message: admin.messaging.Message = {
      token,
      notification: {
        title: "Title",
        body: "Body"
        imageUrl: "https://picsum.photos/200",
      },
      apns: {
        payload: {
          aps: {
            mutableContent: true,
          },
        },
      },
    };

admin.messaging().send(message);

@diegoveloper The image can just be in the notification object and it should work on both Android and iOS. Since you are sending the curl request to the deprecated API it should look something like this:
        {
            "to": token,
            "notification": {
                "title": "Title",
                "body": "Body",
                "image": "https://i.ibb.co/SPYWphH/37d.jpg"
            }
        }

However I recommend you take a look at #4611 (comment) for an example of how to use the recommended FCM v1 HTTP API

it worked for Android, but not for iOS , do you know if the deprecated API is compatible with rich notifications in iOS?

@diegoveloper
Setting the "Destination" in Build phases -> Embed app extensions to "Plugins" fixed it for me a while ago.

@diegoveloper The image I linked worked on both Android and iOS for me. When you use the image property keep this in mind

Contains the URL of an image that is going to be downloaded on the device and displayed in a notification. JPEG, PNG, BMP have full support across platforms. Animated GIF and video only work on iOS. WebP and HEIF have varying levels of support across platforms and platform versions. Android has 1MB image size limit. Quota usage and implications/costs for hosting image on Firebase Storage: https://firebase.google.com/pricing

@diegoveloper
Setting the "Destination" in Build phases -> Embed app extensions to "Plugins" fixed it for me a while ago.

@sullenel

It was already selected.

@diegoveloper The image I linked worked on both Android and iOS for me on both the deprecated API and v1. When you use the image property keep this in mind

Contains the URL of an image that is going to be downloaded on the device and displayed in a notification. JPEG, PNG, BMP have full support across platforms. Animated GIF and video only work on iOS. WebP and HEIF have varying levels of support across platforms and platform versions. Android has 1MB image size limit. Quota usage and implications/costs for hosting image on Firebase Storage: https://firebase.google.com/pricing
@markusaksli-nc

I didn't have luck with that :/
These are my configs following this page https://firebase.flutter.dev/docs/messaging/apple-integration/#advanced-optional-allowing-notification-images:

And I had to add this on my AppDelegate.swift, because I had some issues with FirebaseAuth.

Any help?
The push is sent but without image.

I tried all suggestions  but didn’t work for me, I'm using xcode 12.4 with m1 chip. below error log
Undefined symbols for architecture arm64:
"OBJC_CLASS$_FlutterStandardTypedData", referenced from:
objc-class-ref in firebase_remote_config(FLTFirebaseRemoteConfigPlugin.o)
"OBJC_CLASS$_FlutterEventChannel", referenced from:
objc-class-ref in cloud_firestore(FLTFirebaseFirestorePlugin.o)
objc-class-ref in firebase_auth(FLTFirebaseAuthPlugin.o)
"_FlutterMethodNotImplemented", referenced from:
-[FLTFirebaseFirestorePlugin handleMethodCall:result:] in cloud_firestore(FLTFirebaseFirestorePlugin.o)
-[FLTFirebaseAnalyticsPlugin handleMethodCall:result:] in firebase_analytics(FLTFirebaseAnalyticsPlugin.o)
-[FLTFirebaseAuthPlugin handleMethodCall:result:] in firebase_auth(FLTFirebaseAuthPlugin.o)
-[FLTFirebaseCorePlugin handleMethodCall:result:] in firebase_core(FLTFirebaseCorePlugin.o)
-[FLTFirebaseCrashlyticsPlugin handleMethodCall:result:] in firebase_crashlytics(FLTFirebaseCrashlyticsPlugin.o)
-[FLTFirebaseMessagingPlugin handleMethodCall:result:] in firebase_messaging(FLTFirebaseMessagingPlugin.o)
-[FLTFirebaseRemoteConfigPlugin handleMethodCall:result:] in firebase_remote_config(FLTFirebaseRemoteConfigPlugin.o)
...
"_FlutterEndOfEventStream", referenced from:
___63-[FLTTransactionStreamHandler onListenWithArguments:eventSink:]_block_invoke.318 in cloud_firestore(FLTTransactionStreamHandler.o)
"OBJC_METACLASS$_FlutterStandardWriter", referenced from:
OBJC_METACLASS$_FLTFirebaseFirestoreWriter in cloud_firestore(FLTFirebaseFirestoreWriter.o)
"OBJC_METACLASS$_FlutterStandardReaderWriter", referenced from:
OBJC_METACLASS$_FLTFirebaseFirestoreReaderWriter in cloud_firestore(FLTFirebaseFirestoreUtils.o)
"OBJC_CLASS$_FlutterStandardReaderWriter", referenced from:
OBJC_CLASS$_FLTFirebaseFirestoreReaderWriter in cloud_firestore(FLTFirebaseFirestoreUtils.o)
"OBJC_CLASS$_FlutterStandardWriter", referenced from:
OBJC_CLASS$_FLTFirebaseFirestoreWriter in cloud_firestore(FLTFirebaseFirestoreWriter.o)
"OBJC_METACLASS$_FlutterStandardReader", referenced from:
OBJC_METACLASS$_FLTFirebaseFirestoreReader in cloud_firestore(FLTFirebaseFirestoreReader.o)
"OBJC_CLASS$_FlutterError", referenced from:
objc-class-ref in cloud_firestore(FLTQuerySnapshotStreamHandler.o)
objc-class-ref in firebase_core(FLTFirebasePlugin.o)
"OBJC_CLASS$_FlutterMethodChannel", referenced from:
objc-class-ref in cloud_firestore(FLTFirebaseFirestorePlugin.o)
objc-class-ref in firebase_analytics(FLTFirebaseAnalyticsPlugin.o)
objc-class-ref in firebase_auth(FLTFirebaseAuthPlugin.o)
objc-class-ref in firebase_core(FLTFirebaseCorePlugin.o)
objc-class-ref in firebase_crashlytics(FLTFirebaseCrashlyticsPlugin.o)
objc-class-ref in firebase_messaging(FLTFirebaseMessagingPlugin.o)
objc-class-ref in firebase_remote_config(FLTFirebaseRemoteConfigPlugin.o)
...
"OBJC_CLASS$_FlutterStandardMethodCodec", referenced from:
objc-class-ref in cloud_firestore(FLTFirebaseFirestorePlugin.o)
"OBJC_CLASS$_FlutterStandardReader", referenced from:
OBJC_CLASS$_FLTFirebaseFirestoreReader in cloud_firestore(FLTFirebaseFirestoreReader.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Still, open this bug? we are waiting since 2020-Nov

Is Allowing Notification Images works at all? I exactly follow guide  but the image is not shown

any progress ?

Please solve this problem and add the support for swift. Notifications are supper important, and without images they are.... sad :_(

This stack-overflow https://stackoverflow.com/questions/64901180/running-cocoapods-on-apple-silicon-m1, it solves the problem for now on mac M1.
Install ffi
sudo arch -x86_64 gem install ffi
Re-install dependencies
arch -x86_64 pod install

Compiling works when adding this and setting bitcode to no for the ImageNotification target:
target 'ImageNotification' do
  use_frameworks!

  pod 'Firebase/Messaging'
end

Disabling bit_code and use_frameworks! did the trick! Thanks. Is this only needed for projects that have swift support?

Pod install is fine, but flutter run failed after did these steps.

Compiling works when adding this and setting bitcode to no for the ImageNotification target:
target 'ImageNotification' do
  use_frameworks!

  pod 'Firebase/Messaging'
end

Disabling bit_code and use_frameworks! did the trick! Thanks. Is this only needed for projects that have swift support?

Pod install is fine, but flutter run failed after did these steps.

found solution for my case. Please follow steps above and check this:

https://stackoverflow.com/questions/13870019/xcode-can-i-delete-test-target/13885254
check bundle id is same as parent, if you have multiple environments.
if your bundle id with parent in dev is com.company.productname.dev the target should be com.company.productname.dev.imagenotification.

Setting the Configuration to "none" in Runner->Info fixed it for me.
See: https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/389#issuecomment-841639524

Does anyone got it to work? I tried to follow all steps from here a couple of times and no luck.

Step 1:
Add “use_framework!” In ImageNotifcation
target 'ImageNotification' do
use_frameworks!
pod 'Firebase/Messaging'
end
Step 2:
Add pod 'GoogleUtilities' in both target like below:
platform :ios, '11.0'
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), FILE)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(FILE))
pod 'GoogleUtilities'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
target 'ImageNotification' do
use_frameworks!
pod 'Firebase/Messaging'
pod 'GoogleUtilities'
end

As mentioned above, there should be a use_frameworks! flag under the target. The documentation PR has now been merged here & documentation update will follow in due course. Thanks.

I fixed the issue by using use_frameworks! but I have another problem. Now I have multiple targets with differents identifier I'm unable to sign the application with my ad-hoc provisioning profile since it target only a single identifier. Does anyone know how to solve this problem ?

If anyone still facing same issue then check below
after adding a NotificationServiceExtension please Check your deployment target on Service Extension.
by default the Extension deployment target is set to iOS 13.1 ( depending on your sdk version ), so you need a device with same iOS version OR you have to choose a lower value to match your device iOS

Ref & Credit


I want to download never gonna give you up or all video error

Version
1.9.4
Details
i want download but show this error

Steps to reproduce

Open YoutubeDownloader
Download Never gonna give you up
HAVE ERROR

You don't have access to that path


SyntaxError: Unexpected token ; When making an http request.

(I'm new to submitting issues).
I have some code in my js files where data is loaded using a local array for $scope:
$scope.carouselItems = [{
		header: 'Televisions',
		description: 'Explore the future of picture quality with this 60" 3D UHD 4K Smart TV that features a 3840 x 2160 native resolution for viewing high-resolution content. You can even upscale lower resolution material to near-4K picture quality.',
		href: '#/Learn More',
		img: 'img/TV-4k-Curved.jpg',
		btnText: 'Learn more'
	}, ... ];

Everything works fine at this point. But then I moved this array into it's own json file, and used Angular's http service to retrieve the data. This code caused an error:
$http.get('data/carousel-items.json').success(function (data) {
	$scope.carouselItems = data;
});

And this is my carousel-items.json file:
[{
"header": "Televisions",
"description": "Explore the future of picture quality with this 60\" 3D UHD 4K Smart TV that features a 3840 x 2160 native resolution for viewing high-resolution content. You can even upscale lower resolution material to near-4K picture quality.",
"href": "#/Learn More",
"img": "img/TV-4k-Curved.jpg",
"btnText": "Learn more"
},{
"header": "Notebooks",
"description": "Boots in seconds. Nothing complicated to learn. Comes with your favorite Google apps. Built for everyday use and perfect for sharing with others. Starting at $199.",
"href": "#/Learn More",
"img": "img/chromebook-hp-14.jpg",
"btnText": "Learn more"
},{
"header": "Wearables",
"description": "Android Wear organizes your information, suggests what you need, and shows it to you before you even ask. Get messages from your friends, meeting notifications, and weather updates at a glance.",
"href": "#/Learn More",
"img": "img/wear.jpg",
"btnText": "Learn more"
}];

And this is a snippet of my my index.html file:

{{item.header}}

{{item.description}}

{{item.btnText}}

When I refreshed the page, I received the following error in Google Chrome's JavaScript console:
SyntaxError: Unexpected token ;
at Object.parse (native)
at pc (http://localhost:3000/xerorex/bower_components/angular/angular.min.js:14:208)
at Zb (http://localhost:3000/xerorex/bower_components/angular/angular.min.js:76:379)
at http://localhost:3000/xerorex/bower_components/angular/angular.min.js:77:237
at s (http://localhost:3000/xerorex/bower_components/angular/angular.min.js:7:302)
at Zc (http://localhost:3000/xerorex/bower_components/angular/angular.min.js:77:219)
at c (http://localhost:3000/xerorex/bower_components/angular/angular.min.js:78:349)
at http://localhost:3000/xerorex/bower_components/angular/angular.min.js:112:20
at l.$get.l.$eval (http://localhost:3000/xerorex/bower_components/angular/angular.min.js:125:305)
at l.$get.l.$digest (http://localhost:3000/xerorex/bower_components/angular/angular.min.js:122:398)

It looks like an error on Angular's side, so I submitted it here.

The problem is in your JSON file - notice ; at the end - this makes the JSON invalid.
Please use a dedicated support channel for questions like this in the future:
https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question

while making http request for external

json file everytime i am getting SyntaxError: Unexpected token } in angular.min.js line number 108.i tried with different versions of angular.js and angular.min.js files.Stll i am getting the error.

@supriyanatrajan, it is probably a problem with your JSON data. Feel free to ask for help on one of the support channels.

The json packet was not properly arranged.

I got error when i am callging json file  Unexpected token < in JSON at position 0  please help me..


Disable Running Tests automatically

Would it be possible to disable tests running as part of the build? It makes it difficult to incorporate this project as sub-build when failing tests block building the rest of the project. It would be nice to be able to then run all of the tests with a CTest invocation after the build step.

I’d really appreciate that.

:thinking: With the assumption that the library is well tested the integration might be done with BUILD_TESTS=OFF. I personally believe that building and running tests is the thing (for example static_asserts tests). But I agree it's annoying to integrate if tests aren't passing in any env and that should be addressed IMHO by finding and fixing the root cause :thinking:

One of the simplest examples of why it might be preferred to have all the tests run as their own step is that more information can be gleaned from the results of multiple tests. If tests stop running after the first failed test, you get less information.

Consumers of your library may be on a time-crunch where they just need to build their project, ensure that a single failing test in your library is non-serious, and move on to their primary task at the moment. Of course, you have to hope they will take the time later to submit an issue. 😅

Last, CMake splits building and testing into separate steps as seen in ExternalProject_Add. CMake typically prefers running tests after building a project through the use of its CTest/CDash functionality which can additionally handle submitting test results to CI dashboards.


Merge 4.2 dev to master

I've done a lot of work on polishing the 4.2-dev and I believe this is a good time to merge.

There are conflicts between these two branches and also can you specify which tests have this branch gone through?

There are conflicts between these two branches

Fixed. Another PR landed on master after I rebased 4.2-dev. At this point most PRs that land on master could introduce some conflict, but the big rebase has been done.

and also can you specify which tests have this branch gone through?

layer browser testing
Also carefully went through our test suite and replaced the old layer test utils with code that uses the full layer manager logic instead of just snippets of code. Makes the test suite exercise the same code as during runtime, and make it less fragile when refactoring life cycle functionality.

Tested this in internal app as well, works well. Given that component PRs are all approved I will go ahead and merging.


HDFS-15989. Split TestBalancer and De-flake testMaxIterationTime()

branch-3.2 backport of PR #2923
Signed-off-by: Akira Ajisaka<EMAIL_ADDRESS>Signed-off-by: Takanobu Asanuma<EMAIL_ADDRESS>

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
8m 52s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 2 new or modified test files.

_ branch-3.2 Compile Tests _

+1 :green_heart:
mvninstall
27m 26s

branch-3.2 passed

+1 :green_heart:
compile
0m 58s

branch-3.2 passed

+1 :green_heart:
checkstyle
0m 45s

branch-3.2 passed

+1 :green_heart:
mvnsite
1m 24s

branch-3.2 passed

+1 :green_heart:
javadoc
0m 57s

branch-3.2 passed

+1 :green_heart:
spotbugs
2m 46s

branch-3.2 passed

+1 :green_heart:
shadedclient
14m 20s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
1m  4s

the patch passed

+1 :green_heart:
compile
0m 55s

the patch passed

+1 :green_heart:
javac
0m 55s

hadoop-hdfs-project_hadoop-hdfs generated 0 new + 550 unchanged - 1 fixed = 550 total (was 551)

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

-0 :warning:
checkstyle
0m 38s
/results-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
hadoop-hdfs-project/hadoop-hdfs: The patch generated 10 new + 149 unchanged - 49 fixed = 159 total (was 198)

+1 :green_heart:
mvnsite
0m 58s

the patch passed

+1 :green_heart:
javadoc
0m 47s

the patch passed

+1 :green_heart:
spotbugs
2m 55s

the patch passed

+1 :green_heart:
shadedclient
15m 19s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

-1 :x:
unit
166m 28s
/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
hadoop-hdfs in the patch failed.

+1 :green_heart:
asflicense
0m 38s

The patch does not generate ASF License warnings.

245m  9s

Reason
Tests

Failed junit tests
hadoop.hdfs.server.namenode.TestFsck

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2943/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/2943

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell

uname
Linux caa78d50075c 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
branch-3.2 / a25179b14acbb87ac99a83160294cc4f7873f82e

Default Java
Private Build-1.8.0_282-8u282-b08-0ubuntu1~18.04-b08

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2943/1/testReport/

Max. process+thread count
2691 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2943/1/console

versions
git=2.17.1 maven=3.6.0 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 47s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  1s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 2 new or modified test files.

_ branch-3.2 Compile Tests _

+1 :green_heart:
mvninstall
28m 21s

branch-3.2 passed

+1 :green_heart:
compile
1m  2s

branch-3.2 passed

+1 :green_heart:
checkstyle
0m 47s

branch-3.2 passed

+1 :green_heart:
mvnsite
1m 14s

branch-3.2 passed

+1 :green_heart:
javadoc
1m  1s

branch-3.2 passed

+1 :green_heart:
spotbugs
2m 44s

branch-3.2 passed

+1 :green_heart:
shadedclient
14m 48s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
1m  5s

the patch passed

+1 :green_heart:
compile
0m 57s

the patch passed

+1 :green_heart:
javac
0m 57s

hadoop-hdfs-project_hadoop-hdfs generated 0 new + 550 unchanged - 1 fixed = 550 total (was 551)

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

-0 :warning:
checkstyle
0m 40s
/results-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
hadoop-hdfs-project/hadoop-hdfs: The patch generated 7 new + 149 unchanged - 49 fixed = 156 total (was 198)

+1 :green_heart:
mvnsite
1m  5s

the patch passed

+1 :green_heart:
javadoc
0m 49s

the patch passed

+1 :green_heart:
spotbugs
2m 49s

the patch passed

+1 :green_heart:
shadedclient
15m 55s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

-1 :x:
unit
179m 49s
/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
hadoop-hdfs in the patch failed.

+1 :green_heart:
asflicense
0m 49s

The patch does not generate ASF License warnings.

252m 32s

Reason
Tests

Failed junit tests
hadoop.hdfs.TestSafeModeWithStripedFileWithRandomECPolicy

hadoop.hdfs.TestReconstructStripedFile

hadoop.hdfs.TestReconstructStripedFileWithRandomECPolicy

hadoop.hdfs.TestDFSStripedInputStream

hadoop.hdfs.TestSetrepIncreasing

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2943/2/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/2943

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell

uname
Linux f042f47694a5 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
branch-3.2 / 4365e97bd1d04df67fd8191c82573940a338ba94

Default Java
Private Build-1.8.0_282-8u282-b08-0ubuntu1~18.04-b08

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2943/2/testReport/

Max. process+thread count
3107 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2943/2/console

versions
git=2.17.1 maven=3.6.0 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.


refactor(mrm_emergency_stop_operator): improve readability and change to read topic by polling

Description
Based on the discussion, change emergency_handler and mrm_handler to read topic by polling instead of best_effort callback.
In addition, readability was improved by reducing variable reuse.
Tests performed
psim test were performed
Effects on system behavior
nothing
Interface changes
nothing
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@mkuri
@TomohitoAndo
Could you review this PR as a code owner?