Uncaught TypeError: Cannot read property '0' of undefined

[Enter steps to reproduce:]

...
...

Atom: 1.37.0 x64
Electron: 2.0.18
OS: Unknown Windows version
Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot read property '0' of undefined
At C:\Users\luizc\AppData\Local\atom\app-1.37.0\resources\app\static\<embedded>:14

TypeError: Cannot read property '0' of undefined
    at DisplayLayer.collapseHardTabs (~/AppData/Local/atom/app-1.37.0/resources/app/static/<embedded>:14:88176)
    at DisplayLayer.translateScreenPosition (~/AppData/Local/atom/app-1.37.0/resources/app/static/<embedded>:14:85869)
    at DisplayMarkerLayer.t.exports.DisplayMarkerLayer.translateToBufferMarkerLayerFindParams (~/AppData/Local/atom/app-1.37.0/resources/app/static/<embedded>:14:1106187)
    at DisplayMarkerLayer.t.exports.DisplayMarkerLayer.findMarkers (~/AppData/Local/atom/app-1.37.0/resources/app/static/<embedded>:14:1103752)
    at decorationCountsByLayer.forEach (~/AppData/Local/atom/app-1.37.0/resources/app/static/<embedded>:11:517631)
    at Map.forEach (<anonymous>)
    at DecorationManager.decorationPropertiesByMarkerForScreenRowRange (~/AppData/Local/atom/app-1.37.0/resources/app/static/<embedded>:11:517605)
    at TextEditorComponent.queryDecorationsToRender (~/AppData/Local/atom/app-1.37.0/resources/app/static/<embedded>:11:82000)
    at TextEditorComponent.updateSyncBeforeMeasuringContent (~/AppData/Local/atom/app-1.37.0/resources/app/static/<embedded>:11:70093)
    at TextEditorComponent.updateSync (~/AppData/Local/atom/app-1.37.0/resources/app/static/<embedded>:11:67605)
    at TextEditorComponent.didMouseWheel (~/AppData/Local/atom/app-1.37.0/resources/app/static/<embedded>:11:92413)

Commands
     -5:22.3.0 find-and-replace:show (input.hidden-input)
     -5:20.7.0 core:confirm (input.hidden-input)
     -5:19.2.0 core:backspace (input.hidden-input)
     -5:18.3.0 core:confirm (input.hidden-input)
     -5:14 core:copy (input.hidden-input)
     -5:07.3.0 emmet:insert-formatted-line-break-only (input.hidden-input)
     -5:07.2.0 editor:newline (input.hidden-input)
     -5:06.5.0 core:paste (input.hidden-input)
  3x -4:53.3.0 core:backspace (input.hidden-input)
     -4:52.6.0 core:save (input.hidden-input)
     -2:14.6.0 grammar-selector:show (input.hidden-input)
     -2:13.9.0 core:confirm (input.hidden-input)
     -2:12.4.0 find-and-replace:show (input.hidden-input)
 11x -2:07.8.0 core:move-left (input.hidden-input)
     -2:06.0 core:backspace (input.hidden-input)
     -2:05.4.0 core:confirm (input.hidden-input)

Non-Core Packages
atom-minify 0.8.0
atom-wrap-in-tag 0.6.0
auto-indent 0.5.0
autocomplete-java 1.2.7
emmet 2.4.3
highlight-selected 0.13.1
platformio-ide-terminal 2.5.5
seti-icons 1.5.4

Thanks for the report!  Can you confirm a few things for us?

What were you doing at the time of the error?
Is the error is reproducible?
If reproducible, do you see the error in safe mode (atom --safe)?

x-ref: https://github.com/atom/atom/issues/18415.  The same error + stack trace was mentioned in the original report, but we ended up only able to reproduce a different problem without that error.

Hi, i'm glad to help in some way.

I'm was programing a simple html file, I guess the error is because the
block code expansion, i don't know the right term for that, is when you has
one div and click on the gray arrow in the left to minimize all block of
code inside the div. When i did this to 6 divs, all code vanished for a
while, after few seconds showed up again, and the error poped up moments
after that.

I can try, but was the first time that happen the error.

Only happened one time, after restart atom everything was ok.

If there is something i can help, just ask
Em ter, 11 de jun de 2019 às 18:54, Robert Sese<EMAIL_ADDRESS>escreveu:

Thanks for the report! Can you confirm a few things for us?

What were you doing at the time of the error?
Is the error is reproducible?
If reproducible, do you see the error in safe mode (atom --safe)?

x-ref: #18415 https://github.com/atom/atom/issues/18415. The same error

stack trace was mentioned in the original report, but we ended up only
able to reproduce a different problem without that error.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/atom/atom/issues/19490?email_source=notifications&email_token=ADQVDKZZFTG33A5BKXTTQJ3P2ANKZA5CNFSM4HXBGDY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOTSMQ#issuecomment-501037362,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADQVDK3PD4R75WW6JJTBMM3P2ANKZANCNFSM4HXBGDYQ
.

--

Only happened one time, after restart atom everything was ok. If there is something i can help, just ask

:+1:  If you come across steps to reproduce, that would be super helpful though.
I'm going to tag this as more-information-needed so it will automatically close over time if you end up not seeing this error again.

Hi!
I am now faced with the same error after updating "platformio-ide-terminal" for the latest version(2.10.0).
Here is the message I got.
Thank you in advance
C:\Users\Savine\AppData\Local\atom\app-1.41.0\resources\app\static<embedded>:14
Hide Stack Trace
TypeError: Cannot read property '0' of undefined
at DisplayLayer.collapseHardTabs (C:\Users\Savine\AppData\Local\atom\app-1.41.0\resources\app\static<embedded>:14:93334)
at DisplayLayer.translateScreenPosition (C:\Users\Savine\AppData\Local\atom\app-1.41.0\resources\app\static<embedded>:14:91027)
at DisplayMarkerLayer.translateToBufferMarkerLayerFindParams (C:\Users\Savine\AppData\Local\atom\app-1.41.0\resources\app\static<embedded>:14:1190435)
at DisplayMarkerLayer.findMarkers (C:\Users\Savine\AppData\Local\atom\app-1.41.0\resources\app\static<embedded>:14:1188000)
at decorationCountsByLayer.forEach (C:\Users\Savine\AppData\Local\atom\app-1.41.0\resources\app\static<embedded>:11:518119)
at Map.forEach ()
at DecorationManager.decorationPropertiesByMarkerForScreenRowRange (C:\Users\Savine\AppData\Local\atom\app-1.41.0\resources\app\static<embedded>:11:518093)
at TextEditorComponent.queryDecorationsToRender (C:\Users\Savine\AppData\Local\atom\app-1.41.0\resources\app\static<embedded>:11:82388)
at TextEditorComponent.updateSyncBeforeMeasuringContent (C:\Users\Savine\AppData\Local\atom\app-1.41.0\resources\app\static<embedded>:11:70481)
at TextEditorComponent.updateSync (C:\Users\Savine\AppData\Local\atom\app-1.41.0\resources\app\static<embedded>:11:67993)
at TextEditorComponent.didMouseWheel (C:\Users\Savine\AppData\Local\atom\app-1.41.0\resources\app\static<embedded>:11:92801)


Fixed a typo in code example of the piral-ng plugin documentation

New Pull Request
For more information, see the CONTRIBUTING guide.
Prerequisites
Please make sure you can check the following boxes:

[x ] I have read the CONTRIBUTING document
[x ] My code follows the code style of this project
[ ] All new and existing tests passed

Type(s) of Changes
Contribution Type
What types of changes does your code introduce? Put an x in all the boxes that apply:

[x ] Bug fix (non-breaking change which fixes an issue, please reference the issue id)
[ ] New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes

Description
The README.md file that contains the documentation for the piral-ng plugin contains the code example:
import { enableProdMod } from '@angular/core';

if (process.env.NODE_ENV === 'production') {
  enableProdMod();
}

However the function is actually called enableProdMode as stated in the official Angular Documenation
Remarks
[Optionally place any follow-up comments, remarks, observations, or notes here for future reference]

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.0 out of 2 committers have signed the CLA.:x: Finn Fiedler:x: int0x81Finn Fiedler seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


fix tensor serialization

Maybe this problem due to the serialization of DA?
from jina import DocumentArray, Document, Flow
import numpy as np

docs = DocumentArray([Document(tensor=np.random.rand(224, 224))] * 100)
print(docs.summary())

with Flow(protocol='http').add() as flow:
    flow.post('/index', inputs=docs, show_progress=True)

with Flow(protocol='grpc').add() as flow:
    flow.post('/index', inputs=docs, show_progress=True)

yields
          Flow@96082[I]:🎉 Flow is ready to use!
	🔗 Protocol: 		HTTP
	🏠 Local access:	<IP_ADDRESS>:64451
	🔒 Private network:	<IP_ADDRESS>:64451
	💬 Swagger UI:		http://localhost:64451/docs
	📚 Redoc:		http://localhost:64451/redoc
⠼       DONE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 0:00:48 100% ETA: 0 seconds 80 steps done in 48 seconds
           Flow@96082[I]:🎉 Flow is ready to use!
	🔗 Protocol: 		GRPC
	🏠 Local access:	<IP_ADDRESS>:49305
	🔒 Private network:	<IP_ADDRESS>:49305
⠋       DONE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 0:00:00 100% ETA: 0 seconds 80 steps done in 0 seconds

We can observe that HTTP flow takes much more time.

I think there is very little to do about it.

closing as it is the wrong expectation of docarray. If client don't want embedding, they should not query embedding, eg. GraphQL


scheduler: numa-aware scheduling supports selecting numa node by score

Ⅰ. Describe what this PR does
Currently the NodeNUMAResource plugin uses TopologyManager to generate the best hint, but the hint is the narrowest, e.g. if the node's topology strategy is SingleNUMANode, the best hint is always the one with the smallest NUMA Node ID, it works like a bin-packing strategy. However, some scenarios require selecting the least allocated NUMA node to ensure runtime QoS.
Add a new scoring strategy to NodeNUMAResourceArgs to support NUMA-Node level scoring, so that we can select the numa node with the highest score, and then in score-phase, we can select the node with the highest score at the node level.
User can configure the NodeNUMAResourceArgs as the following:
apiVersion: kubescheduler.config.k8s.io/v1beta2
kind: KubeSchedulerConfiguration
profiles:
  - pluginConfig:
      - name: NodeNUMAResource
        args:
          apiVersion: kubescheduler.config.k8s.io/v1beta2
          kind: NodeNUMAResourceArgs
          scoringStrategy:  # Here configure Node level scoring strategy
            type: LeastAllocated
            resources:
              - name: cpu
                weight: 1
              - name: memory
                weight: 1
              - name: "kubernetes.io/batch-cpu"
                weight: 1
              - name: "kubernetes.io/batch-memory"
                weight: 1
          numaScoringStrategy: # Here configure NUMA-Node level scoring strategy
            type: LeastAllocated
            resources:
              - name: cpu
                weight: 1
              - name: memory
                weight: 1
              - name: "kubernetes.io/batch-cpu"
                weight: 1
              - name: "kubernetes.io/batch-memory"
                weight: 1

We can  create a deployment affinities the special node with 10 replicas, 4C8G per replica, and use debug api /apis/v1/plugins/NodeNUMAResource/nodes/:nodeName to view effect.
Use LeastAllocated strategy, we can get the result as following(just one node which has two numa-nodes):
{
    ....
    "allocatedNUMANodeResources": [
       {"node":0,"resources":{"cpu":"25","memory":"53Gi"}}
       {"node":1,"resources":{"cpu":"28","memory":"58Gi"}}
    ]
}

Use MostAllocated strategy, we can get the result as following(just one node which has two numa-nodes):
{
   ....
   "allocatedNUMANodeResources":[
        {"node":0,"resources":{"cpu":"53500m","memory":"113233253Ki"}}
   ]
}

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it
fix #1680
Ⅳ. Special notes for reviews
V. Checklist

[x] I have written necessary docs and comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in make test

/cc @hormes @ZiMengSheng  PTAL.

/cc @jasonliu747


More details on how to interact with modules?

Would you please expand the documentation on how to query and get information from modules?
For example:

I'd like to get details about the engine recharge rate and capacity from my power distributor (it's engineered, so getting the class & grade is not sufficient).
With that information, I could calculate the time required to recharge my boost and send commands to boost that are timed to the ship that I am flying.

How can I discover the details that are contained within the module object for my power distributor? EDDI is able to pass the information to Coriolis, but I don't know how to drill down and extract that level of detailed information via Cottle.

EDDI does not contain the module information that you require.  It is limited to names, values and health of modules.  EDDI does hold the raw information for modified modules but it does not parse it in any way, as the data provided by Elite requires a significant amount of manipulation to provide any useful value.
Although it would be possible to provide this depth of information it would be a large and complex undertaking and isn't something that I'm looking to add to EDDI myself.


"SyntaxError: Unexpected token {"

Just tried to import  "apollo-upload-server" in a new blank meteor project (v1.5) and it still throwing this error:
error "function processRequest(request, { uploadDir } = {}) {"
"SyntaxError: Unexpected token {"
The error is shown when trying to import 'apollo-upload-server' to 'server/main.js'.
Any thoughts?

What version of Node are you using?

8.1.2

That rules out new ES on old Node as an issue, we're going to need more clues.
Did a previous version work? Are you able to determine which line/position in the source that syntax error throws, or do you mean function processRequest(request, { uploadDir } = {}) { is the line?

When 'apollo-upload-server' is imported this line (inside the module) throws the error:
 function processRequest(request, { uploadDir } = {}) {

The problem seems to be the deconstructing-parameters argument and could also be related to babel.

Same problem here.
It works correctly when I copy-paste it directly the source without installing the module itself.
Meteor: v1.5
Node: v8.1.2

Meteor ships with Node.js v4 (which is crazy old) under the hood. The latest Meteor beta uses a newer version of Node.js that will meet the requirements of this package.
See https://github.com/meteor/meteor/pull/8728.

@LexieCore are you using Meteor too?


Hosted entry version can be mutated

Bug Report
A hosted entry version can be mutated with the following set of steps:
Steps to reproduce
Using UI:

Create a hosted workflow
Create a new version, which will be version 1
Delete the version
Create a new version -- it will also be version 1

┆Issue is synchronized with this Jira Story
┆Issue Type: Story
┆Fix Versions: Dockstore 1.7
┆Sprint: Seabright Sprint 15 Outrigger
┆Issue Number: DOCK-778
┆Epic: Version Immutability

Requirements:

should deal with scenario, create version 1, issue DOI for version 1, delete version 1, and then create a new version. The DOI should not point at the incorrrect version (note, it could be pointing at a deleted version, which is not great, but can follow-up later ... i.e. create new ticket, delete DOI? when deleting? Disallow deletion when DOI has been issued?
implementation should be compatible with TRS

@garyluu  please check on ui2 counterpart and assign reviewer aftewards

➤ Charles Overbeck commented:
Verified on staging that if I follow the steps from the description, a new version is created, instead of the previous version getting recreated.
API - 1.7.0-beta.5
UI - 2.4.0-beta.4


Add StimulusJS

[Insert URL to the list here]
https://github.com/skatkov/awesome-stimulusjs
[Explain what this list is about and why it should be included here]
StimulusJS is a different breed of front-end frameworks. In a lot of cases, information is sparse and don't go further than introductory material. This repo aims to gather all the useful info!
By submitting this pull request I confirm I've read and complied with the below requirements 🖖
Please read it multiple times. I spent a lot of time on these guidelines and most people miss a lot.
Requirements for your pull request

Don't waste my time. Do a good job, adhere to all the guidelines, and be responsive.
You have to review at least 2 other open pull requests.
Try to prioritize unreviewed PRs, but you can also add more comments to reviewed PRs. Go through the below list when reviewing. This requirement is meant to help make the Awesome project self-sustaining. Comment here which PRs you reviewed. You're expected to put a good effort into this and to be thorough. Look at previous PR reviews for inspiration.
You have read and understood the instructions for creating a list.
This pull request has a title in the format Add Name of List.

✅ Add Swift
✅ Add Software Architecture
❌ Update readme.md
❌ Add Awesome Swift
❌ Add swift
❌ Adding Swift
❌ Added Swift

Your entry here should include a short description about the project/theme of the list. It should not describe the list itself. The first character should be uppercase and the description should end in a dot. It should be an objective description and not a tagline or marketing blurb.

✅ - [iOS](…) - Mobile operating system for Apple phones and tablets.
✅ - [Framer](…) - Prototyping interactive UI designs.
❌ - [iOS](…) - Resources and tools for iOS development.
❌ - [Framer](…)
❌ - [Framer](…) - prototyping interactive UI designs

Your entry should be added at the bottom of the appropriate category.
The suggested Awesome list complies with the below requirements.

Requirements for your Awesome list

Has been around for at least 30 days.That means 30 days from either the first real commit or when it was open-sourced. Whatever is most recent.
Don't open a Draft / WIP pull request while you work on the guidelines. A pull request should be 100% ready and should adhere to all the guidelines when you open it.
Run awesome-lint on your list and fix the reported issues. If there are false-positives or things that cannot/shouldn't be fixed, please report it.
Includes a succinct description of the project/theme at the top of the readme. (Example)

✅ Mobile operating system for Apple phones and tablets.
✅ Prototyping interactive UI designs.
❌ Resources and tools for iOS development.
❌ Awesome Framer packages and tools.

It's the result of hard work and the best I could possibly produce.
If you have not put in considerable effort into your list, your pull request will be immediately closed.
The repo name of your list should be in lowercase slug format: awesome-name-of-list.

✅ awesome-swift
✅ awesome-web-typography
❌ awesome-Swift
❌ AwesomeWebTypography

The heading title of your list should be in title case format: # Awesome Name of List.

✅ # Awesome Swift
✅ # Awesome Web Typography
❌ # awesome-swift
❌ # AwesomeSwift

Non-generated Markdown file in a GitHub repo.
The repo should have awesome-list & awesome as GitHub topics. I encourage you to add more relevant topics.
Not a duplicate. Please search for existing submissions.
Only has awesome items. Awesome lists are curations of the best, not everything.
Does not contain items that are unmaintained, has archived repo, deprecated, or missing docs. If you really need to include such items, they should be in a separate Markdown file.
Includes a project logo/illustration whenever possible.

Either centered, fullwidth, or placed at the top-right of the readme. (Example)
The image should link to the project website or any relevant website.
The image should be high-DPI. Set it to maximum half the width of the original image.

Entries have a description, unless the title is descriptive enough by itself. It rarely is though.
Includes the Awesome badge.

Should be placed on the right side of the readme heading.

Can be placed centered if the list has a centered graphics header.

Should link back to this list.

Has a Table of Contents section.

Should be named Contents, not Table of Contents.
Should be the first section in the list.
Should only have one level of nested lists, preferably none.

Has an appropriate license.

We strongly recommend the CC0 license, but any Creative Commons license will work.

Tip: You can quickly add it to your repo by going to this URL: https://github.com/<user>/<repo>/community/license/new?branch=master&template=cc0-1.0 (replace <user> and <repo> accordingly).

A code license like MIT, BSD, Apache, GPL, etc, is not acceptable. Neither are WTFPL and Unlicense.
Place a file named license or LICENSE in the repo root with the license text.
Do not add the license name or text to the readme. GitHub already shows the license name at the top of the repo.
To verify that you've read all the guidelines, please comment on your pull request with just the word unicorn.

Has contribution guidelines.

The file should be named contributing.md. Casing is up to you.

Has consistent formatting and proper spelling/grammar.

The link and description are separated by a dash. Example: - [AVA](…) - JavaScript test runner.
The description starts with an uppercase character and ends with a period.
Consistent and correct naming. For example, Node.js, not NodeJS or node.js.

Doesn't include a Travis badge.You can still use Travis for list linting, but the badge has no value in the readme.
Doesn't include an Inspired by awesome-foo or Inspired by the Awesome project kinda link at the top of the readme. The Awesome badge is enough.

Go to the top and read it again.

Your list is failing lint:
/tmp/awesome-stimulusjs# awesome-lint
✖ Linting

  README.md:19:3
  ✖   1:1    Missing Awesome badge after the main heading                 remark-lint:awesome-badge
  ✖   1:1    Missing file contributing.md                                 remark-lint:awesome-contributing
  ✖   1:1    Git repository must be at least 30 days old                  remark-lint:awesome-git-repo-age
  ✖   1:1    The repository should have "awesome" as a GitHub topic       remark-lint:awesome-github
  ✖   1:1    The repository should have "awesome-list" as a GitHub topic  remark-lint:awesome-github
  ✖   9:16   "’" is used without matching "‘"                             remark-lint:match-punctuation
  ✖   9:70   "’" is used without matching "‘"                             remark-lint:match-punctuation
  ✖   9:126  "’" is used without matching "‘"                             remark-lint:match-punctuation
  ✖  19:3    Incorrect indentation before bullet: remove 2 spaces         remark-lint:list-item-bullet-indent
  ✖  20:3    Incorrect indentation before bullet: remove 2 spaces         remark-lint:list-item-bullet-indent
  ✖  21:3    Incorrect indentation before bullet: remove 2 spaces         remark-lint:list-item-bullet-indent
  ✖  24:3    Invalid list item link                                       remark-lint:awesome-list-item
  ✖  25:3    Invalid list item link                                       remark-lint:awesome-list-item
  ✖  25:19   Don’t pad link with inner spaces                             remark-lint:no-inline-padding
  ✖  28:3    Invalid list item link                                       remark-lint:awesome-list-item
  ✖  29:3    Invalid list item link                                       remark-lint:awesome-list-item
  ✖  29:22   Text "Javascript" should be written as "JavaScript"          remark-lint:awesome-spell-check
  ✖  30:3    Invalid list item link                                       remark-lint:awesome-list-item
  ✖  33:3    Invalid list item link                                       remark-lint:awesome-list-item
  ✖  34:3    Invalid list item link                                       remark-lint:awesome-list-item
  ✖  42:73   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  43:95   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  44:71   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  45:76   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  46:59   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  47:81   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  48:73   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  49:73   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  50:93   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  53:81   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  54:81   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  58:58   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  59:59   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  60:54   List item description must end with proper punctuation       remark-lint:awesome-list-item
  ✖  61:57   List item description must end with proper punctuation       remark-lint:awesome-list-item

  35 errors

Thanks for making an Awesome list! 🙌
It looks like you didn't read the guidelines closely enough. I noticed multiple things that are not followed. Try going through the list point for point to ensure you follow it. I spent a lot of time creating the guidelines so I wouldn't have to comment on common mistakes, and rather spend my time improving Awesome.

You have to review 2 other open pull requests. :)

Thanks for pointing out issues in my awesome repository. Will find some free time and fix those!

Here are a few missing points from the guidelines:

The description starts with an uppercase character and ends with a period.
Has contribution guidelines.
The file should be named contributing.md. Casing is up to you.

Bump :)

@sindresorhus did some changes. does it look good enough?

The list format is not following the guidelines and the logo is missing. Please read the guidelines thoroughly.

I consider list format more convenient for regular use and provides way more information than the format that your suggesting. I don't want to bother adhering to this rule, if this means that I will not end up an awesome list -- so be it.


isNewsletterSubscriber Method of useNewsletter Composable does not work correctly

At the moment, isNewsletterSubscriber does only react to
the value "optOut" for "response.status".
However, the Shopware-API initially returns "undefined" for "response.status" when a user has not subscribed to the newletter. You can see this in the screenshot.
This leads to a false "true" returned by "isNewsletterSubscriber" in that case.
This can be fixed by changing the code in composables-next/dist/index.mjs from
async function isNewsletterSubscriber$1() {
    const response = await isNewsletterSubscriber(apiInstance);
    return response.status !== "optOut";
}

into
async function isNewsletterSubscriber$1() {
    const response = await coreIsNewsletterSubscriber(apiInstance)
    return response.status !== 'optOut' && response.status !== 'undefined'
}


Its not working in IE8

In IE8 page is not loading if i add it

Hi @BhagyashriJ
Unfortunately, we do not support IE8 since AngularJS 1.3 has dropped support for IE8.
https://docs.angularjs.org/guide/ie
If we get enough people to +1, I can add IE8 support to the backlog.

+1

+1

Let's drop IE8 : (


clippy: Remove unnecessary double parentheses.

I was looking at clippy warnings on petgraph and figured that I'd fix some of them in easily reviewable blocks of changes.

Thanks


Correct interpolation of headings/angles

This very small patch does two things:

Allows adding custom types to CZML properties via Cesium.CzmlDataSource.processPacketData()
Implements a Angle type which is now used for Billboards rotations

The previous version of Cesium has a list of hardcoded types in function unwrapInterval() which is called by processPacketData(). If an unknown type is passed in, it simply throws an exception.
This patch simply allows any custom type to be passed in, as long as the type provides a method to calculate a defaultValue (which is exactly what unwrapInterval did for the builtin-types).
The main motivation for this was to add suport for proper interpolation of angles/headings, which is implemented via the Angle type, which can now be passed to the processPacketData() method as the 'type' argument.
The discussion that led to this patch can be found here:
https://groups.google.com/forum/#!topic/cesium-dev/2ZrxVg9PLbg

Thanks @Relfos.  I haven't looked at this yet, but in order to accept a contribution we need you to fill out a copy of our Contributor License Agreement (CLA) and email it to us at<EMAIL_ADDRESS>as defined in CONTRIBUTING.md.  Most likely you want the individual agreement.  It's a one time process for all first-time contributors.

Also, in order to accept this pull request it needs unit tests that cover the functionality for all supported interpolation methods.  I might be able to generate some known correct values for you to use in testing using some other verified correct tools.

Sorry to overwhelm you with review comments, but that's all I have for now.

Thanks for the contribution, @Relfos.
@mramato we have a CLA from @Relfos.

My apologies about the CLA, I should have checked earlier.

Hi guys, thanks for the quick comments. As @pjcozzi  said, yes, there's already a CLA as I've submitted other stuff before.
@mramato, I have commited some changes you request, but about modifying convertPackedArrayForInterpolation in order to support all kinds of interpolation method I'm a bit unsure how to do it, mainly because I'm not fully understand how this the interpolations itself work in relation with this packable interface.
My current code currently is manualing doing a linear interpolation inside the unpackInterpolationResult, ignoring the actual interpolation methods, which is of course not what we want. I'm not even sure when exactly the value is interpolated, and what the whole packing/unpacking thing is used (apart from understanding that this packing system is used to interpolate types that should not be interpolated directly).
If any of you can quickly write me a description of how this packing system works it would help a lot (or if there's some blog post or something that already explains it, a link would work).
For example, what is the purpose of the convertPackedArrayForInterpolation() and unpackInterpolationResult() methods?
Should my code actually call the interpolation method inside any of those?
Or when unpackInterpolationResult() is called, is the sourceArray an array with already interpolated values?

Thanks @Relfos I'll try to write something up this weekend.

Hi @mramato, I'm writing just to remember you about this issue

Don't worry, I haven't forgotten.  I definitely plan on looking at this soon.

Hey @Relfos, I just opened #2758 which completes the work you started.  I had to experiment a bit to determine the correct method to use, so it was easier to just finish it up myself once I got going. Plus I found some other misc doc/test issues related to interpolation in the process.
Thanks for getting the ball rolling and let me know if you have any questions after checking out my PR.

Looking forward for the next release now that it was merged, thanks!
On Thu, May 28, 2015 at 7:30 PM, Matthew Amato<EMAIL_ADDRESS>wrote:

Hey @Relfos https://github.com/Relfos, I just opened #2758
https://github.com/AnalyticalGraphicsInc/cesium/pull/2758 which
completes the work you started. I had to experiment a bit to determine the
correct method to use, so it was easier to just finish it up myself once I
got going. Plus I found some other misc doc/test issues related to
interpolation in the process.
Thanks for getting the ball rolling and let me know if you have any
questions after checking out my PR.
—
Reply to this email directly or view it on GitHub
https://github.com/AnalyticalGraphicsInc/cesium/pull/2666#issuecomment-106467631
.


1.19.10 Chat is not being read

I am using the example scripts to listen to chat and chat is not being listened to. This was working fine on 1.19.1 and now is not working on 1.19.10.
const bedrock = require('bedrock-protocol')
const client = bedrock.createClient({   // optional
  realms: {
    realmInvite: "https://realms.gg/I4Pm46UEw6I"
  },         // optional, default 19132
  username: 'Wilco Realm Bot',   // the username you want to join as, optional if online mode
})

client.on('text', (packet) => { // Listen for chat messages and echo them back.
  if (packet.source_name != client.username) {
    client.queue('text', {
      type: 'chat', needs_translation: false, source_name: client.username, xuid: '', platform_chat_id: '',
      message: `${packet.source_name} said: ${packet.message} on ${new Date().toLocaleString()}`
    })
  }
})

Why doesn't it work? Nothing printed out?
Can you add process.env.DEBUG = 'minecraft-protocol' to the top of your script & provide the output? https://gist.github.com/
Thanks

@MrWilco Just noticed this.  It might be due to outdated dependencies?
https://github.com/PrismarineJS/bedrock-protocol/issues/241

@extremeheat Having the same issue here.
The callback in client.on('text', (packet) => {}) is not being called, and there is no debug output after the initial connection / handshake.
https://gist.github.com/nagytech/e4fa801f26da861b4eee08b66e6d554b

Based on the log, the connection is failing and client is not allowed to spawn (you get no chunk data and all).
I tried on a vanilla 1.19.10 server and it works fine -
  minecraft-protocol C <- Q <-  text {
  type: 'chat',
  needs_translation: false,
...

Have you tried a different server ?

Haven’t tried a different server yet.  This is a realms server BTW, not
sure if that matters or not.
On Mon, 25 Jul 2022 at 16:54, extremeheat @.***> wrote:

Based on the log, the connection is failing and client is not allowed to
spawn (you get no chunk data and all).
I tried on a vanilla 1.19.10 server and it works fine -
minecraft-protocol C <- Q <-  text {
type: 'chat',
needs_translation: false,
...
Have you tried a different server ?
—
Reply to this email directly, view it on GitHub
https://github.com/PrismarineJS/bedrock-protocol/issues/239#issuecomment-1193653526,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACBFOUNLHAGO5GGRZBK3MA3VVY22LANCNFSM54OIGELQ
.
You are receiving this because you commented.Message ID:
@.***>

Possibly if OP and you have same issues. Have you tried connecting to the server with a Relay proxy? There should be some doc on how to set this up.
If you are able to connect, please post another log file with the DEBUG flag set at top of your code like before.

Relay Code
const { Relay } = require('bedrock-protocol')

process.env.DEBUG = "bedrock-protocol"

function createRelay () {
  console.log('Creating relay')
  /* Example to create a non-transparent proxy (or 'Relay') connection to destination server */
  const relay = new Relay({
    /* host and port for clients to listen to */
    host: '<IP_ADDRESS>',
    port: 19130,
    offline: false,
    /* Where to send upstream packets to */
    destination: {
      realms: {
        pickRealm: (realms) => realms[0] // I only have one realm, this is fine.
      },
      offline: false
    }
  })
  relay.conLog = console.debug
  relay.listen()
  relay.on('connect', player => {
    // Server is sending a message to the client.
    player.on('clientbound', ({ name, params }) => {
      console.log(params)
    })
    player.on('serverbound', ({ name, params }) => {
        console.log(params)
    })
  })
}

createRelay()

Relay output
Creating relay
Listening on <IP_ADDRESS> 19130 1.19.10
New connection from <IP_ADDRESS>/43585
Connecting to <IP_ADDRESS> 30421
Connected to upstream server
{
  must_accept: false,
  has_scripts: false,
  force_server_packs: false,
  behaviour_packs: [],
  texture_packs: []
}
{ compression_threshold: 256 }
{ response_status: 'completed', resourcepackids: [] }
{ enabled: false }
{ request_time:<PHONE_NUMBER>364n, response_time: 0n }
{
  type: 'chat',
  needs_translation: false,
  source_name: 'xxxx',
  message: 'test',
  parameters: undefined,
  xuid: '',
  platform_chat_id: ''
}
{ chunk_radius: 10 }
{
  type: 'chat',
  needs_translation: false,
  source_name: 'xxxx',
  message: 'test',
  parameters: undefined,
  xuid: '',
  platform_chat_id: ''
}
{
  type: 'chat',
  needs_translation: false,
  source_name: 'xxxx',
  message: 'test',
  parameters: undefined,
  xuid: '',
  platform_chat_id: ''
}

Client Code
process.env.DEBUG = 'minecraft-protocol'

const bedrock = require('bedrock-protocol');

const client = bedrock.createClient({

    // realms: {
    //     pickRealm: (r) => r[0]
    // }

    host: "<IP_ADDRESS>",
    port: 19130

});

setInterval(() => {
    client.queue('text', {
        type: 'chat', needs_translation: false, source_name: client.username, xuid: '', platform_chat_id: '',
        message: `test`
    })
}, 5000);

client.on('text', (packet) => { // Listen for chat messages

    console.log(`${JSON.stringify(packet)}`)

})

Client output
minecraft-protocol chains [
  'xxxx',
  'xxxx'
] +0ms
  minecraft-protocol got xbox profile {
  nbf: xxxx,
  extraData: {
    XUID: 'xxxx',
    identity: 'xxxx',
    displayName: 'xxxx',
    titleId: 'xxxx'
  },
  randomNonce: xxxx,
  iss: 'Mojang',
  exp: xxxx,
  iat: xxxx,
  identityPublicKey: 'xxxx'
} +1ms
  minecraft-protocol [client] connecting to <IP_ADDRESS> 19130 {
  name: 'xxxx',
  uuid: 'xxxx',
  xuid: 'xxxx'
} RakNativeClient {
  _events: [Object: null prototype] {},
  _eventsCount: 0,
  _maxListeners: undefined,
  connected: false,
  onConnected: [Function (anonymous)],
  onCloseConnection: [Function (anonymous)],
  onEncapsulated: [Function (anonymous)],
  raknet: Client {
    _events: [Object: null prototype] {
      encapsulated: [Function (anonymous)],
      connect: [Function (anonymous)],
      disconnect: [Function (anonymous)]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    client: RakClient {},
    ping: [Function (anonymous)],
    connect: [Function (anonymous)],
    close: [Function (anonymous)],
    [Symbol(kCapture)]: false
  },
  [Symbol(kCapture)]: false
} +0ms
  minecraft-protocol * new status 1 +0ms
  minecraft-protocol Auth chain [
  'xxxx',
  'xxxx',
  'xxxx'
] +50ms
  minecraft-protocol C <- login {
  protocol_version: 534,
  tokens: {
    identity: '{"chain":["xxxx"]}',
    client: 'xxxx'
  }
} +1ms
  minecraft-protocol while sending to RakNativeClient {
  _events: [Object: null prototype] {},
  _eventsCount: 0,
  _maxListeners: undefined,
  connected: true,
  onConnected: [Function (anonymous)],
  onCloseConnection: [Function (anonymous)],
  onEncapsulated: [Function: onEncapsulated],
  raknet: Client {
    _events: [Object: null prototype] {
      encapsulated: [Function (anonymous)],
      connect: [Function (anonymous)],
      disconnect: [Function (anonymous)]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    client: RakClient {},
    ping: [Function (anonymous)],
    connect: [Function (anonymous)],
    close: [Function (anonymous)],
    [Symbol(kCapture)]: false
  },
  [Symbol(kCapture)]: false
} Error: Failed to send: -5
    at Client.send (/home/redacted/source/client/node_modules/raknet-native/lib/RakNet.js:57:13)
    at RakNativeClient.sendReliable (/home/redacted/source/client/node_modules/bedrock-protocol/src/rak.js:76:24)
    at Client.sendMCPE (/home/redacted/source/client/node_modules/bedrock-protocol/src/connection.js:139:23)
    at Client.sendDecryptedBatch (/home/redacted/source/client/node_modules/bedrock-protocol/src/connection.js:128:10)
    at Client.write (/home/redacted/source/client/node_modules/bedrock-protocol/src/connection.js:70:12)
    at Client.sendLogin (/home/redacted/source/client/node_modules/bedrock-protocol/src/client.js:128:10)
    at RakNativeClient.connection.onConnected (/home/redacted/source/client/node_modules/bedrock-protocol/src/client.js:102:46)
    at Client.<anonymous> (/home/redacted/source/client/node_modules/bedrock-protocol/src/rak.js:42:12)
    at Client.emit (node:events:527:28)
    at /home/redacted/source/client/node_modules/raknet-native/lib/RakNet.js:35:20 +16ms
  minecraft-protocol Client closed! +21ms
  minecraft-protocol * new status 0 +14ms
  minecraft-protocol C <- Q <-  text {
  type: 'chat',
  needs_translation: false,
  source_name: 'xxxx',
  xuid: '',
  platform_chat_id: '',
  message: 'test'
} +4s
  minecraft-protocol C <- Q <-  text {
  type: 'chat',
  needs_translation: false,
  source_name: 'xxxx',
  xuid: '',
  platform_chat_id: '',
  message: 'test'
} +5s

You wrote the debug line wrong. It's minecraft-protocol case sensitive and must go all the way at the top of your code which is before any require() statements. This sets an environment variable for the Node.JS environment, as explained in our README.

https://github.com/PrismarineJS/bedrock-protocol/blob/370ca96f2e7e2adcf5c42672acc129b5d7cc68ea/src/client.js#L124
this seems wrong, it shouldn't be wrapped in an object

@rob9315

https://github.com/PrismarineJS/bedrock-protocol/blob/370ca96f2e7e2adcf5c42672acc129b5d7cc68ea/src/client.js#L124
this seems wrong, it shouldn't be wrapped in an object

This is an unrelated issue, in JS { chain } without colons equals { chain: chain }

no i know that, the problem is that the packets description (for 1.19.10) says that it's an array:

Removing {} breaks the authentication. On a related note, when connected to a Realm on my mobile and laptop chat isn't sent to either clients not even involving bedrock-protocol

Yeah, client joining is pretty well tested on CI. The issue here seems to be possibly long sequence that Realms is not accepting or something wrt authentication.

My bedrock-protocol client can receive text however only from certain accounts.

Using /msg will send the chat to the bot irrespective of account used

Let's keep this issue focused on the matter @MrWilco and @nagytech have. If there are orthogonal problems not directly related please open new issues/discussion so things are easier to track.

Are there any suggestions on how I can compare the difference in between
the prismarine client and the official client?  Wireshark perhaps?  Or any
tool that you already have as a part of your dev process?
On Tue, 26 Jul 2022 at 10:15, extremeheat @.***> wrote:

Let's keep this issue focused on the matter @MrWilco
https://github.com/MrWilco and @nagytech https://github.com/nagytech
have. If there are orthogonal problems not directly related please open new
issues/discussion so things are easier to track.
—
Reply to this email directly, view it on GitHub
https://github.com/PrismarineJS/bedrock-protocol/issues/239#issuecomment-1194805064,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACBFOUNS5QYTNAJEQSQD6S3VV4U3TANCNFSM54OIGELQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

@nagytech
As stated above , please correct this:

You wrote the debug line wrong. It's minecraft-protocol case sensitive and must go all the way at the top of your code which is before any require() statements. This sets an environment variable for the Node.JS environment, as explained in our README.

And provide a log with a vanilla client connected to the Relay which is connected to the backend server. It will make it easier to understand the login procedure and anything incorrect with how bedrock-protocol's client is initializing the connection.

Vanilla client -> Relay -> Realms?  Sorry, I can't do that.
Might be easier for someone who knows this system to simply run the code and find the issue themselves.
Good luck!

Hi @nagytech - I've corrected the code that would be great if you could run. I don't have a Realms subscription myself, so just trying to help out those that do :)
process.env.DEBUG = "minecraft-protocol"
const { Relay } = require('bedrock-protocol')

function createRelay () {
  console.log('Creating relay')
  /* Example to create a non-transparent proxy (or 'Relay') connection to destination server */
  const relay = new Relay({
    /* host and port for clients to listen to */
    host: '<IP_ADDRESS>',
    port: 19130,
    logging: true,
    offline: false,
    /* Where to send upstream packets to */
    destination: {
      realms: {
        pickRealm: (realms) => realms[0] // I only have one realm, this is fine.
      },
      offline: false
    }
  })
  relay.conLog = console.debug
  relay.listen()
  relay.on('connect', player => {
    // Server is sending a message to the client.
    player.on('clientbound', ({ name, params }) => {
      console.log(params)
    })
    player.on('serverbound', ({ name, params }) => {
        console.log(params)
    })
  })
}

createRelay()

Or if anyone is having similar problems, please run code above which makes a proxy server to connect to a Realm. You can connect to it and it should log many things to the console, drop that over to https://gist.github.com/ and post a link.

@extremeheat What I was debugging is related to this issue, I don't believe the errors encountered here are to do with bedrock-protocol but more so to do with an issue with Realms itself. See REALMS-9150 & REALMS-9191

Unfortunately I forgot to unsub to this issue, so I read a few comments that I'm obligated to respond to.
@LucienHH I can join the exact same realm with the same two accounts on proper clients with no issues.  The moment one of the clients is one of yours things start failing.  There is clearly an issue with something in prismarine - I don't think it's worthwhile to shift the blame.
@extremeheat I've uninstalled Node and have no intention of using Prismarine in the future so I'm not able to help contribute any further.  The first post on the issue includes everything you need to repro the fault including a realm invite.

I think listening to chat stopped working again in 1.19.11 realms. It no longer logs packets.

The client won't get chat messages if it has not spawned. The spawn event will be triggered as mentioned in our documentation.
If this issue has happened because your client has not spawned, then you should provide a proxy log as mentioned prior.

The client is spawning in properly as the spawn event is being emitted. It console logs a string when spawn is emitted

OK, if the client spawns then it should be able to correctly receive chat messages. Can you reproduce this on other servers? If not, this certainly seems to be an issue on server side (see Lucien's links to bug reports on the topic).

I think listening to chat stopped working again in 1.19.11 realms. It no longer logs packets. Nothing is being printed to console and I have process.env.DEBUG = 'minecraft-protocol' at the top of the script

Quick, get someone who knows nothing about how to fix the issue to debug everything.

It is working on my BDS which is running 1.19.10. my realm running 1.19.11 is not logging chat packets at all.

OK, if the client spawns then it should be able to correctly receive chat messages. Can you reproduce this on other servers? If not, this certainly seems to be an issue on server side (see Lucien's links to bug reports on the topic).

It is working on my BDS which is running 1.19.10. my realm running 1.19.11 is not logging chat packets at all.

No updates to this, closing. Seems this is a Realms issue as it cannot be reproduced outside of Realms and happens to non-bedrock-protocol clients also - https://bugs.mojang.com/browse/REALMS-9150. Please re-open if this you think is a confirmed issue with bedrock-protocol specifically.


Sets not working

Summary:
I cannot get DynamoDB String Sets to work. I have not tried Number Sets but I assume they are also affected.
Code sample:
Schema
{
mySet: [String],
}
I do not have a great understanding of the whole codebase, but I managed to solve my issue by removing util.isArray(typeVal) from the conditional at the beginning of this code block in Attribute.js. I'm not sure if this creates a separate issue somewhere else.
if (util.isArray(typeVal) || typeVal === 'list'){
    type = 'List';
  } else if ( (util.isArray(typeVal) && typeVal.length === 1) || typeof typeVal === 'function') {
    this.isSet = util.isArray(typeVal);
    let regexFuncName = /^Function ([^(]+)\(/i;
    let found = typeVal.toString().match(regexFuncName);
    type = found[1];
    if (type === 'Object') {
      type = 'Map';
    }
  } else if (typeof typeVal === 'object' || typeVal === 'map'){
    type = 'Map';
  } else {
    type = typeof typeVal;
  }

Current output and behavior:
{
mySet: [],
}
Expected output and behavior:
{
mySet: ['Elements', 'in', 'set'],
}
Environment:
Operating System: Arch Linux
Operating System Version: 4.19.2
Node.js version (node -v): 11.2.0
NPM version: (npm -v): 6.4.1
Dynamoose version: 1.3.0
Dynamoose Plugins: N/A

Dynamoose Plugins:

[ ] Yes, I believe that one or multiple 3rd party Dynamoose plugins are effecting this issue
[ ] No, I believe this issue is independent of any 3rd party Dynamoose plugins I'm using
[ ] Unknown, I'm unsure if Dynamoose plugins are effecting this issue
[x ] I am not using any Dynamoose plugins

Other information (if applicable):
Type (select 1):

[x] Bug report
[ ] Feature suggestion
[x] Question
[ ] Other suggestion
[ ] Something not listed here

Other:

[x] I have read through the Dynamoose documentation before posting this issue
[ x I have searched through the GitHub issues (including closed issues) and pull requests to ensure this issue has not already been raised before
[x] I have searched the internet and Stack Overflow to ensure this issue hasn't been raised or answered before
[x] I have tested the code provided and am confident it doesn't work as intended
[N/A] I have ensured that all of my plugins that I'm using with Dynamoose are listed above
[x] I have filled out all fields above
[x] I am running the latest version of Dynamoose

https://github.com/dynamoosejs/dynamoose/blob/4c853c94d6743fcb62862f967c25ee0295da4839/test/Schema.js#L334-L413
According to that link the schema looks much different than yours for lists.

Sorry, I don't understand. Can you elaborate?
Perhaps I'm misreading the documentation. I'm basing my syntax off of the table in the "Attribute Types" section of the API docs. There I see this information.
Attribute Type | Resulting DynamoDB Type
...
[String]           | ‘SS’
...
We have a String Set (SS) column in one of our dynamo tables.

I'm also having a similar problem. Documentation states that [Object] will be used as SS on Dynamodb. However, I'm seeing schema.attributes.content.type.name's dynamo setting as S, not SS.
This is also creating errors on when I try to get items from table:
Attribute "content" of type "S" has an invalid value of "[object Object]"
This is the schema construction I'm currently using:
const construction = {
  style  : {
    type    : Number,
    hashKey : true,
    required: true,
  },
  content: [ Object ],
};

const options = {
  timestamps: {
    createdAt: 'dateCreate',
    updatedAt: 'dateUpdate',
  }
};

const schema = new dynamoose.Schema( construction, options );
const model  = dynamoose.model( 'statements', schema );

Converting the example content object into a full definition solves the problems for crud operations.
const construction = {
  style  : {
    type    : Number,
    hashKey : true,
    required: true,
  },
  content: {
    type: 'map',
    map : {
      en: {
        type: 'list',
        list: [ {
          content: String,
          title  : String,
        } ],
      },
      tr: {
        type: 'list',
        list: [ {
          content: String,
          title  : String,
        } ],
      },
    },
  },
};

Yet this simply destroys the object based database methodology, and is too limiting. Content might be different in each object. Some keys might be different, some might be missing. Some can be string another array of string. Framework must be able handle this. I thought using [Object] would solve this, it does not.


[Templating Feature] Update templating library to output an object

Related Issue
Fixes #7779
Description
The JS templating library can now accept an array of AdaptiveCards as the template, and return an object.
Changes in templating
After expanding the template, we check if the remaining object is an array. If the object is an array of length 1, we return the AdaptiveCard. If the array is of length 0 or greater than 1, we log an error and return undefined.
Changes in Designer
If the given card payload is an array of AdpativeCards, we disable design mode and only show the rendered card in preview mode. This is because templating is only applied in preview mode.
Sample Card
[
    {
        "type": "AdaptiveCard",
        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
        "version": "1.5",
        "$when": "${test}",
        "body": [
            {
                "type": "TextBlock",
                "text": "To be displayed if test === true",
                "wrap": true
            }
        ]
    },
    {
        "type": "AdaptiveCard",
        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
        "version": "1.5",
        "$when": "${!test}",
        "body": [
            {
                "type": "TextBlock",
                "text": "To be displayed if test === false",
                "wrap": true
            }
        ]
    }
]

Data
{
    "test": false
}

How Verified

Added three templating unit-test (simple TextBlock, Container vs. Carousel, failure to test template error).
Verified manually in the designer.
Verified the new UI adjusts to high contrast.

Future work
Templating expansion warnings/errors need to be displayed in the designer (#7442)

I'm not understanding this. The templating engine has always accepted an array of anything (not just cards, the template engine is 100% generic and independent from AC aside from its package name) as a template.

I'm not understanding this. The templating engine has always accepted an array of anything (not just cards, the template engine is 100% generic and independent from AC aside from its package name) as a template.

@dclaux I misnamed this PR. The changes are focused on ensuring that the templating library always outputs an object (ideally an AdaptiveCard, but templating is independent as you noted above).
We haven't decided if we want to take this change in general, but we're keeping it here for now.

The templating engine should not return an object if it is fed with a template that has a top level array. It should produce an array. It should be the responsibility of the consuming application to extract what it needs to extract from the produced array. Alternatively, the consuming application could extract objects from the array and feed each one to the templating engine independently.

Also re: "if the given card payload is an array" - that is simply not possible: an Adaptive Card cannot be expressed as an array. It must be expressed as an object. An array would never pass validation against the AC schema.

Closing since we are not adding this feature right now.


[Site] Link fix for all the Buttons

Current State of the GetNighthawk.dev site
A few buttons are not linked to any link
Desired State of the GetNighthawk.dev site
Requires linking of all the buttons to proper links

Join Us - https://docs.google.com/document/d/18hYemFKK_PC_KbT_TDBUgb0rknOuIhikkRxer4_bv4Q/edit#
Need link for Ask Us button
Need link for Learn More button

Contributor Resources

See the Contributing to getnighthawk.dev Website
See the Project Site section of GetNighthawk project doc

@Grumpyyash we plan to link it with the discussion form that is currently being created

So, we will wait till then!

Buttons can be linked to
coming soon -> get started (link to documentation)
Learn more -> https://layer5.io/projects/getnighthawk
Ask Questions -> https://discuss.layer5.io/
@leecalcote any suggestions on this?

I am working on this issue if possible pls assign.


[Tracking] Params inconsistencies in our drivers

The aim of this issue is to track all the inconsistencies when we send event params from our drivers (modern_bpf, bpf, kernel module) to userspace.
Generic event issues

[ ] Today when we send file descriptors fd to userspace, we send them as int64_t while they are represented on int32_t. This leads us to waste a lot of space in our ring buffers...  fd params are very common in our event, we waste 4 bytes every time we send a param of this type. Considering a small/medium-size system, we can imagine that it could send also 1 million of fd params per second, this would mean wasting almost 4 MB of space in our ring buffers per second!
[ ] Today when we send process identifiers pid to userspace, we send them as int64_t while they are represented on int32_t. This leads us to waste a lot of space in our ring buffers as explained in the previous fd case.
[ ] In some syscalls we take the syscalls flags as an int value and we push it to userspace as uint32_t without converting it with our internal PPM representation.
[ ] This is similar to the previous point, but even if we send flags/modes with the same type (so take uint32_t and send uint32_t) in some cases we don't convert these values into the scap PPM format, so we cannot use this flags/modes userspace-side even if we catch them driver side.
[ ] In some cases more than one syscall reuse the same event type, unfortunately, this approach doesn't allow us to catch specific syscall parameters. For example pipe2 as a flag argument but since we are using the same pipe event we cannot catch it!
[ ] In some events we send empty params because they are still not implemented.
[ ] Every syscall must have its PPM_CODE and its event pair.
[ ] Different drivers manage max boundaries in different ways we need to uniform them in some way :point_down:
https://github.com/falcosecurity/libs/pull/648#discussion_r996388593

Specific event issues
LEGENDA

[MODERN_BPF] -> means that the issue is only related to the modern_bpf probe
[BPF] -> means that the issue is only related to the bpf probe
[KMOD] -> means that the issue is only related to the kernel module
:warning: -> possible problems, fix it!
:arrow_left: -> only in the enter event
:arrow_right: -> only in the exit event

open_by_handle_at :arrow_right:

[ ] [MODERN BPF] we can get at maximum 8 path_components we need to find a workaround to manage more components!
[ ] open_flags_to_scap() method should receive an int value and convert all negative flags to PPM positive format.

dup3 :arrow_right:

[ ] dup3_flags_to_scap() method should receive an int value and convert all negative flags to PPM positive format. In this case it is all correct (there is only one positive flag right now) but it would be better to put in place the fix.

open

[ ] open_flags_to_scap() method should receive an int value and convert all negative flags to PPM positive format.

openat

[ ] open_flags_to_scap() method should receive an int value and convert all negative flags to PPM positive format.

openat2

[ ] open_flags_to_scap() method should receive an int value and convert all negative flags to PPM positive format.

eventfd :arrow_left:

[ ] param 2 is not necessary, there is no flag argument in eventfd, we have it only in eventfd2 https://github.com/falcosecurity/libs/pull/516/files#r935326971. We need a new event

eventfd2 :arrow_left:

[ ] param 2 (flags) is not implemented, we push 0 to userspace

inotify_init :warning: :arrow_left:

[ ] inotify_init has no syscall arguments so we cannot catch an argument from the register, possible leakage https://github.com/falcosecurity/libs/pull/516/files#diff-d4ab4878f4a1e028497d3ae0086843fcc2f4b3462fd89986f4a93263edd3a8c2R29-R34

signalfd :arrow_left:

[ ] param 2 (mask) is not implemented, we push 0 to userspace
[ ] param 3 (flags)is not implemented, we push 0 to userspace. Moreover, this syscall has not a flag argument, please see here for more details https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/signalfd.c#n302

signalfd4 :arrow_left:

[ ] param 2 (mask) is not implemented, we push 0 to userspace
[ ] param 3 (flags) is not implemented, we push 0 to userspace

timerfd_create :arrow_left:

[ ] param 1 (clockid) is not implemented, we push 0 to userspace
[ ] param 2 (flags) is not implemented, we push 0 to userspace

userfault_fd :arrow_right:

[ ] param 2 (flags) miss an helper like userfaultfd_flags_to_scap to convert flags to scap notation.

ptrace :arrow_right:

[ ] [MODERN_BPF] miss a test that assert the ptrace success
[ ] param 2 (addr) not sure we really need a PT_DYN param, we always send the same len.
[ ] param 3 (data) not sure about the utlity of sending the data_pointer to userspace.

mkdirat :arrow_right:

[ ] param 4 (mode) we need to convert the mode to the scap format.

pip2

[ ] we need a new event for pipe2 otherwise we cannot catch the flags. Right now we use the same event of pipe.

renameat2 :arrow_right:

[ ] param 6 (flags) we need to convert the flags to the scap format with an helper like renameat2_flags_to_scap.

execve :arrow_right:

[ ] param 7 (cwd) is not implemented, we push 0 to userspace https://github.com/falcosecurity/libs/blob/a8561a7a117374e9c454bddc91f58f0f50b873ab/driver/bpf/fillers.h#L2417
[ ] param 17 (tty)  is a uint32_t not an int32_t
[ ] param 19 (loginuid)  is a uint32_t not an int32_t
[ ] [MODERN BPF] param 20 (flags)  still to implement.

execveat :arrow_right:

[ ] param 7 (cwd) is not implemented, we push 0 to userspace https://github.com/falcosecurity/libs/blob/a8561a7a117374e9c454bddc91f58f0f50b873ab/driver/bpf/fillers.h#L2417
[ ] param 17 (tty)  is a uint32_t not an int32_t
[ ] param 19 (loginuid)  is a uint32_t not an int32_t
[ ] [MODERN BPF] param 20 (flags)  still to implement.

fork :arrow_right:

[ ] param 7 (cwd) is not implemented, we push 0 to userspace https://github.com/falcosecurity/libs/blob/a8561a7a117374e9c454bddc91f58f0f50b873ab/driver/bpf/fillers.h#L2417

clone :arrow_right:

[ ] param 7 (cwd) is not implemented, we push 0 to userspace https://github.com/falcosecurity/libs/blob/a8561a7a117374e9c454bddc91f58f0f50b873ab/driver/bpf/fillers.h#L2417

clone3 :arrow_right:

[ ] param 7 (cwd) is not implemented, we push 0 to userspace https://github.com/falcosecurity/libs/blob/a8561a7a117374e9c454bddc91f58f0f50b873ab/driver/bpf/fillers.h#L2417

vfork :arrow_right:

[ ] param 7 (cwd) is not implemented, we push 0 to userspace https://github.com/falcosecurity/libs/blob/a8561a7a117374e9c454bddc91f58f0f50b873ab/driver/bpf/fillers.h#L2417
[ ] [MODERN BPF] missing tests.

socket :arrow_left:

[ ] param 1 (domain) the socket_family_to_scap method should receive an int, not a u8, and we need to choose if the param should be on 8 bits or 32 bits. We need also to update the socket_family_to_scap with new socket families.
[ ] param 2 (type) is an int not a uint32_t, maybe we can use an helper to convert it to scap format
[ ] param 3 (proto) is an int not a uint32_t,  maybe we can use an helper to convert it to scap format

connect :arrow_right:

[ ] param 2 (tuple) in case of UNIX sockets, not sure about the utility of sending kernel pointers to userspace

socketpair :arrow_left:
Same issues of socket syscall

[ ] param 1 (domain) the socket_family_to_scap method should receive an int, not a u8, and we need to choose if the param should be on 8 bits or 32 bits. We need also to update the socket_family_to_scap with new socket families.
[ ] param 2 (type) is an int not a uint32_t, maybe we can use an helper to convert it to scap format
[ ] param 3 (proto) is an int not a uint32_t, maybe we can use an helper to convert it to scap format

socketpair :arrow_right:

[ ] param 4 (source) not sure about the utility of sending kernel pointers to userspace
[ ] param 5 (peer) not sure about the utility of sending kernel pointers to userspace

accept :arrow_right:

[ ] param 5 (queuemax) using Unix sockets, the max queue length seems not related to the value set by listen, more on this here: https://github.com/falcosecurity/libs/pull/544#discussion_r942246996

accept4 :arrow_left:

[ ] param 1 (flags) still to implement, today we send always 0

listen :arrow_left:

[ ] param 2 (backlog) is an int not a uint32_t

bpf :arrow_left:

[ ] param 1 (cmd) is an int not a int64_t

flock :arrow_left:

[ ] param 2 (operation)  we need to read it as an int and then convert it to uint32_t, while today we read it as an unsigned long

ioctl :arrow_left:

[ ] param 2 (request)  if we want to use this info in userspace we need to convert it into scap format.

quotactl :arrow_left:

[ ] param 1 (cmd)  we need to read it as an int and then convert it to uint32_t, while today we read it as an unsigned long
[ ] param 3 (id)  is an int not a int32_t

quotactl :arrow_right:

[ ] [MODERN_BPF] we need more tests for this exit event
[ ] param 13 (dqi_flags)  add conversion to scap format

unshare :arrow_left:

[ ] param 1 (flags)  we need to read it as an int and then convert it to uint32_t, while today we read it as an unsigned long

mount :arrow_left:

[ ] param 1 (flags)  if we want to use this info in userspace we need to convert it into scap format.

umount2 :arrow_left:

[ ] param 1 (flags)  if we want to use this info in userspace we need to convert it into scap format. This field should be an int not a int32_t
[ ] we need to define a new event pair (PPME_SYSCALL_UMOUNT2_E, PPME_SYSCALL_UMOUNT2_X)

linkat :arrow_right:

[ ] param 6 (flags)  we need to read it as an int and then convert it to uint32_t, while today we read it as an unsigned long

unlinkat :arrow_right:

[ ] param 4 (flags)  we need to read it as an int and then convert it to uint32_t, while today we read it as an unsigned long

setns :arrow_left:

[ ] param 2 (nstype)  we need to read it as an int and then convert it to uint32_t, while today we read it as an unsigned long

setrlimit :arrow_left:

[ ] param 1 (resource)  we need to read it as an int and then convert it to uint8_t, while today we read it as an unsigned long

prlimit64 :arrow_left:

[ ] param 2 (resource)  we need to read it as an int and then convert it to uint8_t, while today we read it as an unsigned long

sendto :arrow_left: :warning:

[ ] param 3 (tuple) should be catched in the exit event when we know the outcome of the syscall otherwise there is the risk to catch something wrong.

sendmsg :arrow_left: :warning:

[ ] param 3 (tuple) should be catched in the exit event when we know the outcome of the syscall otherwise there is the risk to catch something wrong.

umount2

[ ] add event pair for this syscall right now we use umount's events

io_uring_enter:arrow_right:

[ ] param 6 (sig) we send only the first 32 bits
[ ] param 7 we don't implement it but the syscall has a param  size_t argsz

ppoll:arrow_left:

[ ] param 3 (sigmask) we send only the first 32 bits

ppoll:arrow_left:

[ ] param 3 (sigmask) we send only the first 32 bits

ppoll:arrow_left:

[ ] param 3 (sigmask) we send only the first 32 bits

recvmmsg:
Empty instrumentation
sendmmsg:
Empty instrumentation

Hi Andrea, like always, good catch! :D
I agree with you; i'd phrase it in a different way actually:
"if we today are able to push to userspace 1mln fd-only events, we could instead push up to 2mln fd-only events"
This hits even harder :)
To retain backward compatibility, i think we could:

add a new PT_FD32 and PT_PID32
new drivers will send PT_PID32 and PT_FD32
we are still compatible with old 64-bit types, while reading from scap files
of course, bump maj schema version :/

Hi Andrea, like always, good catch! :D
I agree with you; i'd phrase it in a different way actually: "if we today are able to push to userspace 1mln fd-only events, we could instead push up to 2mln fd-only events" This hits even harder :)

:exploding_head: :exploding_head:

To retain backward compatibility, i think we could:
* add a new `PT_FD32` and `PT_PID32`

* new drivers will send PT_PID32 and PT_FD32

* we are still compatible with old 64-bit types, while reading from scap files

* of course, bump maj schema version :/

This fixes the first 2 points; the last is a different case instead.

Completely agree with this solution!

Love it, big +1, great catch!

First 2 points will be addressed by #526

I have slightly changed the issue format with Generic event issues  and Specific event issues in this way it should be more maintainable, thank you to @hbrueckner @Molter73 @FedeDP for all the help in finding new issues

Tracking down all of this is of incredible value. Thank you a lot!

I have slightly changed the issue format with Generic event issues and Specific event issues in this way it should be more maintainable, thank you to @hbrueckner @Molter73 @FedeDP for all the help in finding new issues

You are welcome! Many thanks @Andreagit97 for the excellent summary and tracker of all the review follow-ups!

"if we today are able to push to userspace 1mln fd-only events, we could instead push up to 2mln fd-only events"
This hits even harder :)

Optimism is awesome but let me cool it down a little bit :P Every event has this header, which is somewhat larger than the zero bytes it would need for that claim to be true ;)
struct ppm_evt_hdr {
#ifdef PPM_ENABLE_SENTINEL
    uint32_t sentinel_begin;
#endif
    uint64_t ts; /* timestamp, in nanoseconds from epoch */
    uint64_t tid; /* the tid of the thread that generated this event */
    uint32_t len; /* the event len, including the header */
    uint16_t type; /* the event type */
    uint32_t nparams; /* the number of parameters of the event */
};

BTW, we could probably easily change nparams to 16 bits. If we do expect >64k parameters, we can hack something for the (hopefully rare) events that exceed this number.
We could also trim the tid to 32 bits, but then we use this struct all over userspace too (#sadpanda), and other environments may want large tids (e.g. gvisor), so we would have to decouple these two structs and copy data field by field between them.

These two changes would cut down 6 bytes from every event, equivalent to one and a half fds with no schema changes, just a major api version bump.

You are right, of course! Nonetheless, we are wasting lots of bytes that, all together, would:

speed up pushing events (because we need to write, and later read, a little bit less on the ring buffer)
clear up space for new events

I was a bit over-reacting though, agree ahah

BTW, we could probably easily change nparams to 16 bits. If we do expect >64k parameters, we can hack something for the (hopefully rare) events that exceed this number.
We could also trim the tid to 32 bits, but then we use this struct all over userspace too (#sadpanda), and other environments may want large tids (e.g. gvisor), so we would have to decouple these two structs and copy data field by field between them.

Yep!

You gave thorough ideas! And data :D
I think @Andreagit97 is working on porting current modern-bpf tests to work with kmod and old bpf; this should help us spot many more inconsistencies!

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale

/remove-lifecycle rotten

@oheifetz @therealbobo @FedeDP @Andreagit97 we all touched at least some inconsistencies and we just confirmed that for minor type confusions s32/u32 we will not create new events.
Could we get organized and address all these cases, but assign to folks beforehand so that we do not duplicate work?
Fixing all these would make the project look much better! I am happy to be reviewer, but also happy to help more if we don't find enough volunteers :)

yeah agree with that we could write below this issue if someone is going to address some points of the list :)

BTW I would avoid all changes that require a new event pair until we finally resolve the scap-file issue, unless we find something to fix ASAP

I've added the [NOT ADDRESSABLE] marker to all issues that we cannot address now due to the scap-file management https://github.com/falcosecurity/libs/pull/1381#issuecomment-1746613905

Thank you Andrea, I think this makes it much clearer :pray:

@Andreagit97 Please mark dup3 as completed with strikethrough.

@incertum @Andreagit97 Can you guys also mark setns, flock, and unshare as complete?

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale

/remove-lifecycle stale

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale

/remove-lifecycle stale

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale

/remove-lifecycle stale

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale


fix: resolve the issue with number of changed filled entities

resolve the issue with number of changed filled entities
fix logic result posted to update session api

:tada: This PR is included in version 0.297.1 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Adding PopupWindow on onClickListener

Hello,
I tried opening a popupwindow calling the following method in the onclicklistener of the chathead, but I did not manage to show it properly.
Whatever size I define my popup seems to be displayed within the range of the chathead. I would like to display it below the chathead, filling all the display size available below.
I tried also with ListPopupWindow and that is working fine.
This is my code:
`private void displayPopupWindow(View anchorView) {
    LayoutInflater mInflater;
    Context context=this.getApplicationContext();
    mInflater = LayoutInflater.from(context);

    int width;
    Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
    Point size = new Point();
    display.getSize(size);
    width = size.x;

    View popupView = mInflater.inflate(R.layout.webview, null);

    PopupWindow popup = new PopupWindow(popupView);

    WebView webView = (WebView) popupView.findViewById(R.id.webView1);
    webView.getSettings().setJavaScriptEnabled(true);
    webView.loadUrl("http://www.google.com");
    webView.setWebViewClient(new WebViewClient() {
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url);

            return true;
        }
    });

    popup.setContentView(webView);

    // Set content width and height
    popup.setHeight(500);
    popup.setWidth((int)width);

    // Closes the popup window when touch outside of it - when looses focus
    popup.setOutsideTouchable(true);
    popup.setFocusable(true);
    popup.setBackgroundDrawable(new BitmapDrawable());

    // Show anchored to button
    popup.showAtLocation(anchorView, Gravity.BOTTOM | Gravity.LEFT, 0, -100);
    //popup.showAsDropDown(anchorView, 0, -150);
}`

Can you please help me? Thank you.

Sorry, the library does not support PopupWindow.
Can you use transparent Activity?

I solved it using a view and attaching it to the windowmanager, thank you.

Good for you!


Importer is logging all imported files

For some reason, every sass file I import (such as  @import "layout") is being logged to my console. Anyone seen this before? I've tried all the webpack-dev-server options and no matter what I do they keep on getting logged.
[22:44:15] Starting 'web:webpack-dev-server'...
webpack: wait until bundle finished: /assets/main.js
{ file: '/Users/jack/Projects/taleit-web/node_modules/normalize.scss/normalize.scss' }
{ file: '/Users/jack/Projects/taleit-web/src/styles/_animations.scss' }
{ file: '/Users/jack/Projects/taleit-web/src/styles/_layout.scss' }
{ file: '/Users/jack/Projects/taleit-web/src/styles/_typography.scss' }
{ file: '/Users/jack/Projects/taleit-web/src/styles/_variables.scss' }
Version: webpack 1.8.5
Time: 2382ms
  Asset     Size  Chunks             Chunk Names
main.js  1.04 MB       0  [emitted]  main
webpack: bundle is now VALID.

Closing, this is no longer happening after I upgraded to v1.0.1. Still a minor issue on v0.6.0

That's node-sass or libsass afaik. There is no console.log() in sass-loader.


set python.version in inputs.conf.spec?

Is there a way for UCC to build inputs.conf.spec with python.version already set?  Right now I am using regex via additional_packaging to modify the output but I was wondering if there was a cleaner solution I might have missed.
It gets flagged as a failure by appinspect otherwise.

$ splunk-appinspect inspect ${APP_DIR_NAME}${APP_VERSION}.spl --output-file ${APP_DIR_NAME}${APP_VERSION}_CORE_APPINSPECT.xml --data-format junitxml --mode precert --max-messages=all --excluded-tags manual

Check that all the modular inputs defined in inputs.conf.spec are
explicitly set the python.version to python3.
    FAILURE: Modular input "soc_bulletin" is defined in
        README/inputs.conf.spec, python.version should be explicitly set to
        python3 under each stanza. File: README/inputs.conf.spec Line
        Number: 26

Oh, I mis-read the appinspect error I think, and also seem to have hit an edge case.
I did have default/inputs.conf in my repo.  I have 2 inputs in globalConfig.json but only one was listed in defaults/inputs.conf
So user should have either:

no default/inputs.conf supplied to ucc-gen -> ucc-gen will set python.version = python3 for all inputs defined in globalConfig.json
or
default/inputs.conf supplied to ucc-gen, with a default stanza for every input defined in globalConfig.json, and python.version = python3 hardset.

In scenario #2, UCC won't generate the default stanza and set the python.version for inputs not already present.
HTH - maybe not a bug but just needs some documentation?  Great tool!

There is a bug in the code, UCC should handle default/inputs.conf and README/inputs.conf.spec files.

So user should have either:

no default/inputs.conf supplied to ucc-gen -> ucc-gen will set python.version = python3 for all inputs defined in globalConfig.json
or
default/inputs.conf supplied to ucc-gen, with a default stanza for every input defined in globalConfig.json, and python.version = python3 hardset.

The first scenario is working properly, for the second one - ucc-gen will not update the default/input.conf file with python.version key. This is a decision I made so far, not to interfere with the files users provide.
The goal is to have all those .conf files be generated by ucc-gen, so user does not need to provide their .conf files for most of the use cases.

Let me close this issue for now, as this is expected behaviour for now. This may change in the future and we may change the .conf files provided by users and update them with some information, but this is not the case for now.


Add .NET 6.0 target framework

Types of Changes
Prerequisites
Please make sure you can check the following two boxes:

[x] I have read the CONTRIBUTING document
[x] My code follows the code style of this project

Contribution Type
What types of changes does your code introduce? Put an x in all the boxes that apply:

[ ] Bug fix (non-breaking change which fixes an issue, please reference the issue id)
[x] New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] My change requires a change to the documentation
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[x] All new and existing tests passed

Description
I believe that as a modern library, AngleSharp should target the current and latest LTS release of .NET.
This PR adds .NET 6.0 as as a target framework in addition to the currently existing ones.
Some adjustments have been made in order to fix any resulting nullable reference errors.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

The CI fails because the SDK being used is .NET 5 which is not able to compile a .NET 6 project.

On a slightly related note, you should perhaps consider replacing the deprecated WebRequest.Create and use HttpClient instead. For now I've silenced the errors so I could compile the solution.

On a slightly related note, you should perhaps consider replacing the deprecated WebRequest.Create and use HttpClient instead. For now I've silenced the errors so I could compile the solution.

Use AngleSharp.Io for that.

@FlorianRappl What's remaining till the PR can be approved?

@silkfire thanks for the ping. I guess only the one comment and CI/CD. I've just updated the runner to include .NET6 - just pull from devel / update the PR and let's try running it again.

@FlorianRappl Made a new push but I think you have to approve the CI/CD workflow to run.

@FlorianRappl Are we ready to merge?

Hi @silkfire yes pretty much. As written the comment in src/AngleSharp/Common/ObjectExtensions.cs still needs to be resolved.

As I mentioned in the comment, I rewrote the logic to get rid of the nullability errors. The functionality remains the same.

Might this one work? It's just one more character but it does the job.
var field = typeof(T).GetField(code.ToString());
var description = field?.GetCustomAttribute<DomDescriptionAttribute>()?.Description;
return description ?? "An unknown error occurred.";

I guess the improvement to take is that instead of a struct I'd say let's have this an enum (I think it can be constrained to an enum).

What enum are you referring to?

It is used with multiple enums; what I was after is that I think you can now improve the constraint instead of where T : struct have where T : enum.

@FlorianRappl Reverted the method, added a null conditional on the field and changed the generic constraint.
Should be good to go :)


[QUESTION]: 'Download failed! One or more errors occurred.'

Which tool
tidal-gui
Describe your question
For some albums I am getting this error. Many other albums are downloading fine.
Is there any error log where I can try to find out why this is happening and correct it ?
Thanks!
Add screenshots
No response

same here

same here


CLI does not pick up CODECOV_TOKEN from env

➜  ~ echo $CODECOV_TOKEN
foo
➜  ~ python /usr/local/lib/python3.11/site-packages/codecov_cli/main.py -v create-commit -C 123 --slug a/b
info - 2023-12-13 08:36:30,938 -- ci service found: local
debug - 2023-12-13 08:36:30,939 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'>
debug - 2023-12-13 08:36:30,939 -- Loading config from codecov.yml
debug - 2023-12-13 08:36:30,993 -- Starting create commit process --- {"commit_sha": "123", "parent_sha": null, "pr": null, "branch": null, "slug": "a/b", "token": null, "service": null, "enterprise_url": null}
Error: Codecov token not found. Please provide Codecov token with -t flag.
➜  ~ python /usr/local/lib/python3.11/site-packages/codecov_cli/main.py --version
codecovcli, version 0.4.2

Note that this error was produced locally, but appears to be working in CI

https://github.com/codecov/codecov-api/blob/main/Makefile#L19
https://github.com/codecov/codecov-api/blob/main/Makefile#L210
Example of working in our CI

I'm unable to reproduce, as when I run the pyinstalled version of the CLI I don't run into this issue, and I can't get it to run the same way as in the issue using python /usr/local/lib/python3.11/site-packages/codecov_cli/main.py

I emailed about this a few weeks ago. Here is the error as I'm seeing it:
(package-py3.10) ➜  python-package-template git:(main) echo $CODECOV_TOKEN
REDACTED
(package-py3.10) ➜  python-package-template git:(main) codecovcli --version
codecovcli, version 0.4.3
(package-py3.10) ➜  python-package-template git:(main) codecovcli upload-process
info - 2024-01-05 16:43:47,248 -- ci service found: local
warning - 2024-01-05 16:43:47,248 -- Config file codecov.yml not found, or is not a file. Ignoring config.
Error: Codecov token not found. Please provide Codecov token with -t flag.

If I specify the token manually, it does work as expected. I'm on Mac OS 14.2 using zsh if that matters or helps.

Hi @jeff-m-sullivan, are you still running into this issue?

Yup, still an issue with 0.4.7:
(package-py3.10) ➜  python-package-template git:(main) echo $CODECOV_TOKEN
REDACTED
(package-py3.10) ➜  python-package-template git:(main) codecovcli --version
codecovcli, version 0.4.7
(package-py3.10) ➜  python-package-template git:(main) codecovcli upload-process
info - 2024-02-16 10:27:52,052 -- ci service found: local
warning - 2024-02-16 10:27:52,064 -- No config file could be found. Ignoring config.
Error: Codecov token not found. Please provide Codecov token with -t flag.

hmmm, did you install the executable version of the CLI from https://cli.codecov.io? or did  you install it from pip?

Via pip into a virtual environment:
(package-py3.10) ➜  python-package-template git:(main) python --version
Python 3.10.13
(package-py3.10) ➜  python-package-template git:(main) pip --version
pip 23.3.1 from /Users/jeff/python-package-template/.venv/lib/python3.10/site-packages/pip (python 3.10)

just to make sure, can you check if CODECOV_TOKEN is set as a env var and not just as a regular var by running env | grep 'CODECOV_TOKEN' (feel free to redact the token once again).
If running that confirms that the CODECOV_TOKEN is indeed in the env, can you try running a simple python script to ensure your python is able to detect env vars outside of the codecov-cli:
python
>>> from os import environ
>>> print(environ.get('CODECOV_TOKEN'))

thanks!

That did the trick. It was being set as a variable, but not an environment variable. Sorry for the confusion and really appreciate the time you took in helping me figure this out.


Speed up evaluation protocol

Background and Context
Currently, with the prime number strategy, evaluation with filtering using default protocol takes around 29 minutes on test set (~50k triples )of fb15k dataset (~15k unique entities and 500k train triples). Look at strategies to speed up evaluation of evaluation.
Description

Commit 37742381cc9569d8d051a8f188fd671877de9c26 improves the performance by ~25%. Time reduced to 22 minutes. Can improve further.

Tested with postgre. Noticed considerable speedup in default evaluation protocol - down from current ~12 minutes to ~4 minutes on FB15K test set


Modal not closing properly if used with ngIf

Reproduction link
https://stackblitz.com/edit/angular-5q7vdk-qgyff1
Steps to reproduce

Create modal
Add ngIf to it

What is expected?
Modal is closed properly
What is actually happening?
Modal is not closed fully

Environment
Info

ng-zorro-antd
9.1.0

Browser
Chrome 81.0.4044.122

This is usefull if we need to re-render the component when opening the modal and to use ngOnInit lifecycle method instead of ngOnChanges

Will be fixed via #5161


Fix: removed ScrollView to avoid nested VirtualizedList

was this tested with a scaled up Android phone? i think the scrollview was added to handle overflow due to sizing issues

was this tested with a scaled up Android phone? i think the scrollview was added to handle overflow due to sizing issues

The problem is not the  per se. The problem is that this component is in general called from inside a scrollview. The error is that there're inherit scrollviews.
Maybe we need to remove or be careful in add scrollview and call this component.


Th2 3095

Are we sure we need to merge into dev instead of master ? We already merged 4c7602d commit into master as i can remember


feat(*): get non-string contents from clipboard for OSX

Hi, this addresses in part issue #31, and #46.
Some things I feel may be done differently:

I'm currently using a non-exhaustive enum, arguably this may not be the "best" cross-platform way. It may make sense to work with MIME types / Content-Types, however this offloads some work to the caller. Also, if the user copies a file from Finder (OS X), it will be a NSURL instead of a String, which cannot be captured as a mime type.
I'm currently copying the entire &[u8] from the objc memory (I added a comment) to an owned Vec which is very inefficient (small clipboards I experimented with when screen capping windows were >18MB). Not sure what's the best approach here

This is also just for OSX, happy for your feedback. For windows, it should be trivial as far as I can tell, since the clipboard-win crate exposes an API for this already

This looks pretty good. As is though, it breaks the builds on Windows and Linux. Would you mind adding a commit to this PR that adds implementations of get_binary_contents in {windows,x11}_clipboard.rs? It doesn't need to be anything fancy, and can probably default to Some(ClipboardContent::Utf8(self.get_contents()?)).

Having formats::{IMAGE, PNG, TIFF} would work as a first draft. I feel like there should be a more elegant way to encode that PNG and TIFF are both subtypes of IMAGE in terms of trait hierarchies, which should eventually be designed.


Not sure if we have descriptions for each media item

Description

Relates to https://github.com/WordPress/openverse/issues/1667 in the main Openverse repository.
I'm currently unsure if we collect a textual description of each media item in the catalog. This would be a nice thing to expose via the api and display in the frontend.

@zackkrida, do you still think we should surface the descriptions in the API? This could probably be achieved by adding description property to the media serializer using the meta_data.description property from the database.

We have a rather significant issue related to cultural sensitivity that would depend on that: #2594
What's the reason not to include descriptions, at least in the single-results view for a work? I could see omitting them from search if we are worried about the potential for them to cause significantly increased data transfer for search (some image descriptions could be longer than all the other metadata for a given work combined, especially from Flickr blog-post style images).


Can we use

It looks like <!DOCTYPE> is getting escaped. Is that a parser rule that needs to be updated?


[firebase_performance] Java side of FirebasePerformance rewrite

Description
Possible reformat of FirebasePerformance plugin
Related Issues
Dart: https://github.com/flutter/plugins/pull/1530
iOS: https://github.com/flutter/plugins/pull/1556
Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[x] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
[ ] No, this is not a breaking change.

Thats a good point. I'll add deregistration.

Closing in favor of https://github.com/flutter/plugins/pull/1557


Added support for left/right swiping between emails

Added support for left/right swiping between emails in message view.
Signed-off-by: Andrew Fiddian-Green<EMAIL_ADDRESS>

We already had an implementation similar to this. It wasn't great. See #585.

Thanks for the feedback.
So what do you want me to do?

To answer my question above, I guess you want me to add a view left/right slide animation? And/or a haptic 'bump' when the transition occurs?

Added visual animation and haptic feedback

I think the idea is to use a ViewPager. That's pretty hard to implement, though, because of K-9's current code structure.

Indeed a ViewPager is pretty hard to implement :( ..
.. however I think that my solution with TranslateAnimation actually looks quite good; => perhaps you could build it and look at it yourself.

The important part is the user experience. When moving the finger the "surface" underneath it needs to move with the finger; just like scrolling a list. This is complicated by the fact that WebView can also scroll horizontally if the content is wider than the available screen width, e.g. because it was zoomed in. I suggest you check out the Gmail app for how it should feel like.

See screen recording below..
https://user-images.githubusercontent.com/893994/132246868-f515126d-30cb-43b6-afa0-8a66a7a37723.mp4

This is complicated by the fact that WebView can also scroll horizontally

Yeah. I am still thinking about how to handle that..

PS I think the animation is still a bit 'lumpy' but after using it for some time I already have some ideas to make it smoother...

It doesn't matter how smooth the animations are. A change that doesn't implement the UX outlined above (and in #585) has no chance of getting merged.

Okay, I have done a few more things today..

Made big improvements in the swipe animations (see movie below)
Disable the respective swipe direction if already at the start or end of the message list
Disable swipe capture if the touch movement is on the WebView and it is zoomed

https://user-images.githubusercontent.com/893994/132386770-cbedc9f5-99a2-4663-8a2b-904f9b535762.mp4

Disable swipe capture if the touch movement is on the WebView and it is zoomed

Next I will try to add code to re-enable the swipe capture again if the touch movement is on the WebView and it is zoomed AND it is at its scroller left / right limit respectively.

Please don't invest a lot of your time into an animation based method. It won't get merged, as cketti wrote. Unless you basically implement a ViewPager manually, it will never feel as smooth as a real ViewPager.
See the following gif (from another app) for example. You cannot achieve that kind of natural feeling with any kind of plain animation.

I am not going to write a ViewPager since that is almost a total rewrite. But I will continue with my current approach because I think I can make it work, and look quite good. Obviously its up to you guys to decide whether to accept a solution now that is good enough, kr wajt forever

Okay, I have finished my coding, so its ready for your review.
Please excuse me if I am wrong, but I got the impression that you guys already formed a negative opinion of this PR, and if so, I do kindly ask that you actually build this version and try it physically on your phone so that you get a proper impression of the look & feel, and the functionality.
Many thanks in advance.

I tested this PR on a real device. It doesn't feel like it should. Like I wrote before, I don't want to merge a change that doesn't get the UX right.

@cketti thanks for the feedback; I tried to implement everything mentioned in #585, so I am not sure what is missing. Can you please be more specific about what you don't like, and want you want done differently?
(Or are you just saying that you will NEVER accept any PR (from me) that tries to address this user need?)

Have a look at one of the many apps that support swiping between pages. I mentioned Gmail. ByteHamster even posted a video. That's the behavior that needs to be matched. See also https://material.io/design/interaction/gestures.html

Ok I will study your proposals. But just one more question: we are trying to swipe between two Views; one is the actual current message View on the screen, and the other is the View of the next/previous message. It is rather easy to have the current message View to tracking the user's touch motions and animate its DIS-appearance (it is just a matter of tuning the dynamics). However it is much more difficult to animate the (potentential) appearance of the next/previous message view; since we have to pre-create and display it in anticipation that the swipe action might actually be completed. So in this PR I was just animating the disappearance of the old view and just letting the new one pop in. If you want the new View to be animated as well, then I am not sure if it is possible within the current architecture. Please advise.

However it is much more difficult to animate the (potentential) appearance of the next/previous message view; since we have to pre-create and display it in anticipation

That's exactly the problem of doing it with a manual animation. When using a ViewPager with fragments, you get that automatically. Like I said earlier, adding the ViewPager won't be easy because it needs some code refactoring (no longer keep a reference to a message fragment instance in MessageList) but that refactoring will be a positive thing, too.

that refactoring will be a positive thing, too.

Ha. ;)