[$250] Pay with Expensify displayed for approved card expenses for the submitter

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number:
Reproducible in staging?: Needs Reproduction
Reproducible in production?: Needs Reproduction
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @heyjennahay
Slack conversation (hyperlinked to channel name): #migrate
Action Performed:

Submit a report in OldDot with a mix of card and OOP expense
The expense auto approved as per the workspace rules
Login to the NewDot with the same account and open the report

Expected Result:
No Pay with Expensify option as the report is auto approved
Actual Result:
Pay with Expensify displayed for approved card expenses for the submitter
Email also received for approver (Not payer) with Pay Button for auto approved report
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Standalone
[ ] Android: HybridApp
[ ] Android: mWeb Chrome
[ ] iOS: Standalone
[ ] iOS: HybridApp
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

{
      "chatReportID": "5173333429439527",
      "chatType": "",
      "currency": "EUR",
      "description": "",
      "errorFields": {},
      "hasOutstandingChildRequest": false,
      "hasOutstandingChildTask": false,
      "hasParentAccess": true,
      "isCancelledIOU": false,
      "isOwnPolicyExpenseChat": false,
      "isPinned": false,
      "isWaitingOnBankAccount": false,
      "lastActionType": "EXPORTINTEGRATION",
      "lastActorAccountID": "10903701",
      "lastMessageHtml": "Concierge exported this report to NetSuite. View out of pocket expenses. View company card expenses",
      "lastMessageText": "Concierge exported this report to NetSuite. View out of pocket expenses. View c…",
      "lastReadSequenceNumber": 0,
      "lastReadTime": "2024-11-13 12:07:56.542",
      "lastVisibleActionCreated": "2024-11-12 18:40:16.849",
      "lastVisibleActionLastModified": "2024-11-12 18:40:16.849",
      "managerID": 1381556,
      "nonReimbursableTotal": -1335,
      "notificationPreference": "hidden",
      "oldPolicyName": "",
      "ownerAccountID": 2840332,
      "parentReportActionID": "4437845246722994423",
      "parentReportID": "5173333429439527",
      "participants": {
            "1381556": {
                  "hidden": true,
                  "notificationPreference": "hidden"
            },
            "2840332": {
                  "hidden": true,
                  "notificationPreference": "hidden"
            },
            "9645353": {
                  "hidden": true,
                  "notificationPreference": "hidden"
            },
            "9662119": {
                  "hidden": true,
                  "notificationPreference": "hidden"
            },
            "9713816": {
                  "hidden": true,
                  "notificationPreference": "hidden"
            },
            "10903701": {
                  "hidden": false,
                  "notificationPreference": "always"
            }
      },
      "permissions": [],
      "policyID": "9106A4CE5D9D5ACE",
      "private_isArchived": "",
      "reportID": "6376119163420666",
      "reportName": "[Expenses - Expensify NL] Jenna's Expenses 2024-11-05 #R00TCZ9Vza7G",
      "stateNum": 2,
      "statusNum": 3,
      "total": -5090,
      "type": "expense",
      "unheldNonReimbursableTotal": -1335,
      "unheldTotal": -5090,
      "welcomeMessage": "",
      "writeCapability": "all",
      "isLoadingPrivateNotes": false,
      "privateNotes": {
            "2840332": {
                  "note": ""
            }
      }
}

{isFromFullPolicy: false, id: '9106A4CE5D9D5ACE', name: 'Expenses - Expensify NL', role: 'user', type: 'corporate', …}
address
:
addressStreet
:
"Markt 14"
city
:
""
country
:
"NL"
state
:
""
zipCode
:
"6211 CJ Maastricht"
approvalMode
:
"ADVANCED"
approver
:
""
areCategoriesEnabled
:
true
areCompanyCardsEnabled
:
false
areConnectionsEnabled
:
true
areDistanceRatesEnabled
:
true
areExpensifyCardsEnabled
:
false
areInvoicesEnabled
:
false
arePerDiemRatesEnabled
:
false
areReportFieldsEnabled
:
true
areRulesEnabled
:
false
areTagsEnabled
:
true
areWorkflowsEnabled
:
true
autoReimbursement
:
limit
:
0
autoReimbursementLimit
:
0
autoReporting
:
true
autoReportingFrequency
:
"weekly"
autoReportingOffset
:
1
avatarURL
:
""
chatReportIDAdmins
:
75474096
chatReportIDAnnounce
:
75474095
connections
:
netsuite
:
accountID
:
"4681086"
config
:
{autoSync: {…}}
lastErrorSyncDate
:
""
lastSync
:
{errorDate: '', errorMessage: '', isAuthenticationError: false, isConnected: true, isSuccessful: true, …}
lastSyncDate
:
"2024-11-12T17:12:46+0000"
options
:
{config: {…}, data: {…}}
source
:
"AUTOSYNC"
tokenID
:
"QUUW1RWhSd4rGFLzLP78M7QXW+W6P0RpLvEVu8PrmiiS12hr3hUqvJjr0c8cHNj5c0g15hMX91+VlnPZqKqo3lg0jVXsThtU001mdFwynvA=;FpyKvYtNxXNgnGfjUJ9hZA==;9SqCDSQrwuHnpFllZagC81BfHIbowLWp4Vfr4k9EGDE0kPsurnjtvqQ1mR29XRIV63Yu+60gADbOm9S8/vfGtA=="
tokenSecret
:
"/x7iQQf3qrzneg6tsLitvIFLBpug1W25BNRna/HvdggoGO3DvrafKMCuIKnjYJyt48zPoIKwiraIFB1XltqxqVS2GLnrpouu6O59NmZ+36E=;9Hobe3d6/iOlIcovF36YMg==;MPpu6Rtj6ybtRZoqw9wtmXwd+cFz4CCwrr6npiMeAAJ7gniZMoNe0JP0aR60WEz+HaoOQ6T9pDV+y9ON7ef9hQ=="
verified
:
true
customUnits
:
5d39c8cc2bcfc
:
attributes
:
{taxEnabled: false, unit: 'mi'}
customUnitID
:
"5d39c8cc2bcfc"
defaultCategory
:
""
enabled
:
true
name
:
"Distance"
rates
:
{5d39c8cc2bd17: {…}}
defaultBillable
:
false
description
:
""
disabledFields
:
defaultBillable
:
true
reimbursable
:
true
eReceipts
:
false
employeeList
:
<EMAIL_ADDRESS>:
email
:
<EMAIL_ADDRESS>role
:
"admin"
submitsTo
:
<EMAIL_ADDRESS><EMAIL_ADDRESS>:
email
:
<EMAIL_ADDRESS>role
:
"admin"
submitsTo
:
<EMAIL_ADDRESS><EMAIL_ADDRESS>:
email
:
<EMAIL_ADDRESS>role
:
"auditor"
submitsTo
:
<EMAIL_ADDRESS><EMAIL_ADDRESS>:
email
:
<EMAIL_ADDRESS>role
:
"user"
rules
:
[{…}]
submitsTo
:
<EMAIL_ADDRESS><EMAIL_ADDRESS>:
email
:
<EMAIL_ADDRESS>role
:
"auditor"
submitsTo
:
<EMAIL_ADDRESS><EMAIL_ADDRESS>:
approvalLimit
:
500000
email
:
<EMAIL_ADDRESS>overLimitForwardsTo
:
<EMAIL_ADDRESS>role
:
"user"
submitsTo
:
<EMAIL_ADDRESS><EMAIL_ADDRESS>:
approvalLimit
:
500000
email
:
<EMAIL_ADDRESS>overLimitForwardsTo
:
<EMAIL_ADDRESS>role
:
"user"
submitsTo
:
<EMAIL_ADDRESS><EMAIL_ADDRESS>:
email
:
<EMAIL_ADDRESS>role
:
"user"
rules
:
[{…}]
submitsTo
:
<EMAIL_ADDRESS>fieldList
:
expensify_field_id_SUPPLIER_ADDRESS
:
deletable
:
false
disabledOptions
:
[]
externalIDs
:
[]
fieldID
:
"field_id_SUPPLIER_ADDRESS"
isTax
:
false
keys
:
[]
name
:
"Supplier Address"
orderWeight
:
0
origin
:
"currencyDefault"
target
:
"invoice"
type
:
"text"
values
:
[]
expensify_field_id_VAT_NUMBER
:
deletable
:
false
disabledOptions
:
[]
externalIDs
:
[]
fieldID
:
"field_id_VAT_NUMBER"
isTax
:
false
keys
:
[]
name
:
"VAT Number"
orderWeight
:
0
origin
:
"currencyDefault"
target
:
"invoice"
type
:
"text"
values
:
[]
text_title
:
defaultValue
:
"[{report:policyname}] {report:submit:from|frontPart}'s Expenses {report:startdate} #{report:id}"
deletable
:
true
disabledOptions
:
[]
externalIDs
:
[]
fieldID
:
"text_title"
isTax
:
false
keys
:
[]
name
:
"title"
orderWeight
:
0
target
:
"expense"
type
:
"formula"
values
:
[]
harvesting
:
enabled
:
true
hasMultipleTagLists
:
false
id
:
"9106A4CE5D9D5ACE"
invoice
:
markUp
:
0
isFromFullPolicy
:
false
isPolicyExpenseChatEnabled
:
true
lastModified
:
1731431566581022
maxExpenseAge
:
365
maxExpenseAmount
:
100000000
maxExpenseAmountNoReceipt
:
20000
mccGroup
:
airlines
:
category
:
"Travel Airfare & Transportation"
groupID
:
"airlines"
commuter
:
category
:
"Travel Airfare & Transportation"
groupID
:
"commuter"
gas
:
category
:
"Travel Airfare & Transportation"
groupID
:
"gas"
goods
:
category
:
"Uncategorized"
groupID
:
"goods"
groceries
:
category
:
"Uncategorized"
groupID
:
"groceries"
hotel
:
category
:
"Travel Accommodation"
groupID
:
"hotel"
mail
:
category
:
"Facilities Printing & Shipping"
groupID
:
"mail"
meals
:
category
:
"Uncategorized"
groupID
:
"meals"
rental
:
category
:
"Travel Airfare & Transportation"
groupID
:
"rental"
services
:
category
:
"Uncategorized"
groupID
:
"services"
taxi
:
category
:
"Travel Airfare & Transportation"
groupID
:
"taxi"
uncategorized
:
category
:
"Uncategorized"
groupID
:
"uncategorized"
utilities
:
category
:
"Facilities Utilities & Internet"
groupID
:
"utilities"
name
:
"Expenses - Expensify NL"
outputCurrency
:
"EUR"
owner
:
<EMAIL_ADDRESS>ownerAccountID
:
10903701
preventSelfApproval
:
true
reimbursementChoice
:
"reimburseYes"
requiresCategory
:
true
requiresTag
:
false
role
:
"user"
rules
:
approvalRules
:
Array(0)
length
:
0
expenseRules
:
Array(10)
0
:
{applyWhen: Array(1), id: '621cffb8e47ee', tax: {…}}
1
:
{applyWhen: Array(1), id: '6306223d8cd72', tax: {…}}
2
:
{applyWhen: Array(1), id: '64345e1b166f9', tax: {…}}
3
:
{applyWhen: Array(1), id: '6488eb48ec5a4', tax: {…}}
4
:
{applyWhen: Array(1), id: '6488eb5121b6a', tax: {…}}
5
:
{applyWhen: Array(1), id: '651a2ad2a4ddf', tax: {…}}
6
:
{applyWhen: Array(1), id: '66044c6684393', tax: {…}}
7
:
{applyWhen: Array(1), id: '66044c750da64', tax: {…}}
8
:
{applyWhen: Array(1), id: '66044c8395a3e', tax: {…}}
9
:
{applyWhen: Array(1), id: '66044c96cff22', tax: {…}}
length
:
10
shouldShowAutoApprovalOptions
:
false
shouldShowAutoReimbursementLimitOption
:
false
shouldShowCustomReportTitleOption
:
false
tax
:
trackingEnabled
:
true
taxRates
:
defaultExternalID
:
"180"
defaultValue
:
"0%"
foreignTaxDefault
:
"180"
name
:
"Tax"
taxes
:
179
:
{name: 'NL-BTW Standard 21%', value: '21%'}
180
:
{name: 'NL-BTW 0%', value: '0%'}
199
:
{name: 'NL-BTW exempt 0%', value: '0%'}
200
:
{name: 'NL-Non-EU purchase 21%', value: '21%'}
201
:
{name: 'NL-BTW Reduced 9%', value: '9%'}
202
:
{name: 'NL-EU purchase (goods) 21%', value: '21%'}
203
:
{name: 'NL-EU purchase (services) 21%', value: '21%'}
type
:
"corporate"

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~021868165410808201052
Upwork Job ID:<PHONE_NUMBER>808201052
Last Price Increase: 2024-12-15

@getusha - We are waiting for proposals here, but keep me posted if this is more BE. Thanks!

Heads up, I will be offline until Wednesday, December 18, 2024, and will not actively watch over this GitHub during that period.
If this GitHub requires an urgent update, please ask for help in the #expensify-open-source Slack Room. If the inquiry can wait, I'll review it when I return online.

PROPOSAL:
Hi, to solve this problem I would like to break it down into several steps:

Find out which parameter from the backend is responsible for the autopayment
Find the component in the frontend codebase and check if there is a logic for rendering the "pay with Expensify" button (if yes, then the problem is probably in the backend and some data is missing)
If the problem is not in the backend, implement a conditional rendering of "pay with Expensify" depends on data from backend

Ilnur
https://www.linkedin.com/in/ilnur-ibragimov-26048821/

Hi, I'm Nicolay from Callstack - expert contributor group - and I would like to work on this issue.

Will drop my findings here:
Was not able to simulate such behaviour on dev env - unfortunately
But based on provided data above - we can found potential problem:
If we check code - which is related to view Pay button  we can see that those lines of code define - which buttons we will see - either both "Pay with Expensify" and "Pay elsewhere" or just "Pay elsewhere".
In our current case we should not see "Pay with Expensify" button.

A little bit strange check for onlyShowPayElsewhere - but it should be true to just show pay button
Which means that canIOUBePaid should be false.
If we check function canIOUBePaid we have return in boolean format (based on provided onyx data - we landing to last return):

If we go line by line and check with onyx data - we will see that the response here will be finally true - which is not our case. We expecting false here.
All the lines expect the first one is working fine based on Onyx data.
Inside isPayer - which should be false in our case - we see this block which will be fired in our case:

We will get to this block as well:
policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_YES
And there we can see that right check will be true - because isApproved = true. And based on the Onyx data above - we do not have achAccount information - that's why !policy?.achAccount?.reimburser will also be true
If we will have policy?.achAccount?.reimburser which will be returned from API side - we will not see "Pay with Expensify" button.
Seems like the same issue is happened with Email - "Email also received for approver (Not payer) with Pay Button for auto approved report" - technically we do not keep in count that report was already auto approved.
Seems for me - we need someone from BE team to check - why don't we have information about policy?.achAccount?.reimburse if expense was auto-approved.
Let me know wdyt @getusha

We are waiting for @getusha's feedback here

No update yet, waiting for feedback.

Heads up, I will be offline until Friday, January 3, 2025, and will not actively watch over this GitHub during that period.
If this GitHub requires an urgent update, please ask for help in the #expensify-open-source Slack Room. If the inquiry can wait, I'll review it when I return online.


better code quality and small improvements

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

v1.6.163
Chrome Web Store
GitHub release

Your semantic-release bot :package::rocket:


Error in Controller#Action when running rake routes

Hey All,
When I run rake routes the line for /flipper looks like this (you may need to scroll to the right)
                                                      /flipper                                                                  #<Rack::Builder:0x007fbbe44200c0 @warmup=nil, @run=#<Proc:0x007fbbe443b9d8@/Users/rob/.rvm/gems/ruby-2.2.3@borg/gems/flipper-ui-0.7.5/lib/flipper/ui.rb:31 (lambda)>, @map=nil, @use=[#<Proc:0x007fbbe4421d08@/Users/rob/.rvm/gems/ruby-2.2.3@borg/gems/rack-1.6.4/lib/rack/builder.rb:86>, #<Proc:0x007fbbe4400040@/Users/rob/.rvm/gems/ruby-2.2.3@borg/gems/rack-1.6.4/lib/rack/builder.rb:86>, #<Proc:0x007fbbe43f3f70@/Users/rob/.rvm/gems/ruby-2.2.3@borg/gems/rack-1.6.4/lib/rack/builder.rb:86>, #<Proc:0x007fbbe43f3ea8@/Users/rob/.rvm/gems/ruby-2.2.3@borg/gems/rack-1.6.4/lib/rack/builder.rb:86>, #<Proc:0x007fbbe43f3de0@/Users/rob/.rvm/gems/ruby-2.2.3@borg/gems/rack-1.6.4/lib/rack/builder.rb:86>]>

The route works fine when I hit it in my browser, so I'm wondering if anyone knows why this may be happening.
Thanks!

I don't think that is an error, it is just what Rack::Builder likes like from rails routes. Rack::Builder is what flipper uses to make a mountable middleware for rails (or any rack app). I'm open to tweaking it somehow if it makes rake routes prettier, but I'm not really sure off hand what would be a good idea.

Closing as this is not a bug per say, but if anyone knows a way to make that output better off hand let me know.

Thanks John. You're right, it's not an error, sorry for the mis-categorization.
I'm not super-concerned with displaying pretty routes, just thought it may have been an oversight.

@robKitson I don't have time to look into it now, but I would like to pretty this up. I actually think I'd like to  re-open and change the title as a reminder to peek at some point.

It looks like it has to do with mount being evaluated which calls Flipper::UI.app($flipper) and returns the builder instance, which rake routes then prints to the console.  For example if we change Flipper::IU.app($flipper) w/ a different Rack application we get

I'll keep digging through the routes command and some other docs

If we override inspect we could have it print whatever wanted, not quite sure if this is correct way yet

Looking through the routes.rake source it does actually look like overriding inspect is the way to go


Typo, "virtual m achine"

@scovetta : Thanks for your contribution! The author, @kgremban, has been notified to review your proposed change.


Broken as of 15 December

Hey,
Since Contentlayer is no longer actively maintained, it causes issues with the dependencies.
For now, I've replaced Contentlayer with Velite.js to handle the markdown files. Velite.js is quite similar to Contentlayer in terms of implementation, but there are a few changes you'll need to make. You can refer to the latest commit to compare the updates.
If you'd like to see the code from the YouTube tutorial, you can check the branch named contentlayer.


BUG: contact's phone overwritten with account phone when an Account is created before the Contact

Thomas Taylor (CRM Science)
Huh - hadn't run into this before, but can confirm that it exists, both in the current version and in Cumulus Beta.
I reproduced it as follows:

Create an Account with a phone number
Create a new Contact (via Contact Tab > New) and select that Account through the Account lookup.
Fill one phone number field on the Contact. Select the corresponding value in Preferred Phone picklist.
Save record.
Result - Account's phone number appears in whichever phone field was filled out on the contact, as well as Contact.Phone. Phone number that was entered on the Contact has disappeared. Note that this happens with ANY appropriate combination of Preferred Phone and entered phone field.

@Cumulus App - Beta Feedback
Like
·   Today at 6:22 PM
Thomas Taylor (CRM Science)
Thomas Taylor (CRM Science)
Adding - it's a conflict between the phone workflows and the standard behavior of copying the Account.Phone and Account.Fax to the Contact on save in this data entry scenario.

I've confirmed this indeed happens as @tet3 describes. Unfortunately, as he says, it's due to the standard Salesforce platform behavior which is copying the account's phone number to the contact well before any workflow rule can fire.
Only way to get a different phone number at time of entry is to expose the standard Phone field on contact so the user can see that it is auto-filling and can overwrite it, or use a custom phone field on account. Or we can try and edit the Contact.PhoneChanged_(value) workflow rules to anticipate this and work around it.
This only happens with contacts directly associated to accounts. Workaround is to edit/disable workflow rules or use standard Phone/Email fields.


Konflux update test-component-pac-grekji

Pipelines as Code configuration proposal
To start the PipelineRun, add a new comment with content /ok-to-test
For more detailed information about running a PipelineRun, please refer to Pipelines as Code documentation Running the PipelineRun
To customize the proposed PipelineRuns after merge, please refer to Build Pipeline customization

Pipelines as Code CI/test-component-pac-grekji-on-pull-request has failed.
Namespace: build-e2e-ncfq-tenant
PipelineRun: test-component-pac-grekji-on-pull-request-fsstf

Task Statuses:

StatusDurationName

✅ Succeeded
7 seconds
init

✅ Succeeded
20 seconds
clone-repository

❌ Failed
32 seconds
build-container

✅ Succeeded
19 seconds
show-summary

Failure snippet:
task build-container has the status "TaskRunImagePullFailed":
the step "upload-sbom" in TaskRun "test-component-pac-grekji-on-pull-request-fsstf-build-container" failed to pull the image "". The pod errored with the message: "Back-off pulling image "quay.io/redhat-appstudio/cosign@sha256:c883d6f8d39148f2cea71bff4622d196d89df3e510f36c140c097b932f0dd5d5"."

Pipelines as Code CI/test-component-pac-grekji-on-pull-request has failed.
Namespace: build-e2e-ncfq-tenant
PipelineRun: test-component-pac-grekji-on-pull-request-j6j9l

Task Statuses:

StatusDurationName

✅ Succeeded
15 seconds
init

✅ Succeeded
17 seconds
clone-repository

✅ Succeeded
43 seconds
build-container

✅ Succeeded
32 seconds
apply-tags

✅ Succeeded
28 seconds
deprecated-base-image-check

❌ Failed
29 seconds
clair-scan

✅ Succeeded
38 seconds
ecosystem-cert-preflight-checks

✅ Succeeded
7 seconds
sast-snyk-check

✅ Succeeded
31 seconds
clamav-scan

✅ Succeeded
29 seconds
sbom-json-check

✅ Succeeded
7 seconds
show-sbom

✅ Succeeded
8 seconds
show-summary

Failure snippet:
task clair-scan has the status "Failed":
Inspecting raw image manifest quay.io/redhat-appstudio-qe/build-e2e-ncfq-tenant/build-suite-test-application-wmib/test-component-pac-grekji@sha256:caeba7d0ca2f72d8effb2a509717753a504f703524a459fece89b9a89e0880e6.
time="2024-07-15T13:54:33Z" level=fatal msg="Error parsing image name \"docker://quay.io/redhat-appstudio-qe/build-e2e-ncfq-tenant/build-suite-test-application-wmib/test-component-pac-grekji@sha256:caeba7d0ca2f72d8effb2a509717753a504f703524a459fece89b9a89e0880e6\": reading manifest sha256:caeba7d0ca2f72d8effb2a509717753a504f703524a459fece89b9a89e0880e6 in quay.io/redhat-appstudio-qe/build-e2e-ncfq-tenant/build-suite-test-application-wmib/test-component-pac-grekji: manifest unknown"
The raw image inspect command failed

Pipelines as Code CI/test-component-pac-grekji-on-pull-request has failed.
Namespace: build-e2e-ncfq-tenant
PipelineRun: test-component-pac-grekji-on-pull-request-mhjzz

Task Statuses:

StatusDurationName

✅ Succeeded
7 seconds
init

✅ Succeeded
15 seconds
clone-repository

✅ Succeeded
50 seconds
build-container

✅ Succeeded
10 seconds
sast-snyk-check

✅ Succeeded
17 seconds
ecosystem-cert-preflight-checks

✅ Succeeded
6 seconds
clamav-scan

❌ Failed
10 seconds
clair-scan

✅ Succeeded
10 seconds
apply-tags

✅ Succeeded
6 seconds
sbom-json-check

✅ Succeeded
7 seconds
deprecated-base-image-check

✅ Succeeded
7 seconds
show-sbom

✅ Succeeded
16 seconds
show-summary

Failure snippet:
task clair-scan has the status "Failed":
Inspecting raw image manifest quay.io/redhat-appstudio-qe/build-e2e-ncfq-tenant/build-suite-test-application-wmib/test-component-pac-grekji@sha256:0fb2164e88a9989a0135c00ada20d00b2c09b5e83402e56b0a4c1a6426e7db13.
time="2024-07-15T13:56:28Z" level=fatal msg="Error parsing image name \"docker://quay.io/redhat-appstudio-qe/build-e2e-ncfq-tenant/build-suite-test-application-wmib/test-component-pac-grekji@sha256:0fb2164e88a9989a0135c00ada20d00b2c09b5e83402e56b0a4c1a6426e7db13\": reading manifest sha256:0fb2164e88a9989a0135c00ada20d00b2c09b5e83402e56b0a4c1a6426e7db13 in quay.io/redhat-appstudio-qe/build-e2e-ncfq-tenant/build-suite-test-application-wmib/test-component-pac-grekji: manifest unknown"
The raw image inspect command failed


@defer support

Add support for @defer/@stream from https://github.com/graphql/graphql-js/issues/2848
See also https://github.com/apollographql/apollo-android/issues/3494

Just a quick planning update - we're targeting @defer support only to start.

Let's use this one as the umbrella ticket.

user-facing API changes PR: #3858

Sub tickets:

#3881
#3882
#3883
#3884
#3885
#3886
#3887

As part of this work we'll need to verify everything is working as expected with the Apollo Router @defer alpha.

👋  @defer support is now available an experimental feature in our Kotlin client. You can read more about it's use in our documentation and change log


Add context to fluentd formatter

This pull request aims to add the record context, which is missing, to fluentd formatter.

Thanks, merged in 1.x and master as 678693e


feat(async-for-all): add time budget on shrinking

Current dependencies on/for this PR:

main

PR #26   👈

PR #27

PR #28

This comment was auto-generated by Graphite.

Graphite Merge Job
Current status: 🔄 Waiting for checks to pass
This pull request is currently waiting for CI and mergeability checks to pass before being merged.
This comment was auto-generated by Graphite.

Job Reference: TdjwnjsAVSOrsN07nKI6


Encrypted communication between gRPC Server & Clients

Proposal
Communication between gRPC Server & Clients in KEDA Operator & Metrics Server is not encrypted, we should find a user friednly way how to provide encrypted communication. Self signed certs?
Use-Case
No response
Anything else?
No response

I think that we can use self-signed certs for this


[Web] The provided text position is not in the current node

I have a filled QuillEditor and I want to insert the image in the center. I select an empty row and click Align center. Then I see this:
══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
The following assertion was thrown while dispatching notifications for FocusNode:
Assertion failed:
file:///C:/Users/at/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_quill-7.1.10/lib/src/widgets/text_line.dart:1187:12
container.containsOffset(position.offset)
"The provided text position is not in the current node"
When the exception was thrown, this was the stack:
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49  throw_
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 29:3    assertFailed
packages/flutter_quill/src/widgets/text_line.dart 1187:45                                                                  globalToLocalPosition
packages/flutter_quill/src/widgets/editor.dart 1422:38                                                                     getLocalRectForCaret
packages/flutter_quill/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart 96:26                          [_updateCaretRectIfNeeded]
packages/flutter_quill/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart 69:7                           openConnectionIfNeeded
packages/flutter_quill/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart 40:7                           openOrCloseConnection
packages/flutter_quill/src/widgets/raw_editor.dart 1231:5                                                                  [_handleFocusChanged]
packages/flutter/src/foundation/change_notifier.dart 381:24                                                                notifyListeners
packages/flutter/src/widgets/focus_manager.dart 1038:5                                                                     [_notify]
packages/flutter/src/widgets/focus_manager.dart 1803:11                                                                    [_applyFocusChange]
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/schedule_microtask.dart 40:11                              _microtaskLoop
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/schedule_microtask.dart 49:5                               _startMicrotaskLoop
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 166:15           <fn>
The FocusNode sending notification was:
  FocusNode#24c1f([PRIMARY FOCUS])
════════════════════════════════════════════════════════════════════════════════════════════════════

@singerdmx , I am not sure if I can fix this without your help.

Here it is how it looks.
https://user-images.githubusercontent.com/45417992/233931062-4434b3f6-2091-4990-a2cb-e8da51d0f968.mp4

I'm getting the same on MacOS when ticking or unticking checkboxes in a checkboxed list. Although, it only seems to happen for the first checkboxed list item that is created in the text.

I also get the same issue on Android when undoing some text that was typed using swipe typing. It also happens sometimes when I undo several times having normally typed something.

@singerdmx any new about this issue? As I see you don't have enough time to fix this issue?

Any news?

Running into this exception as well. Happening when focus is restored to the editor after deleting the contents of the editor using the controller.
Did a little digging into what was going on in my situation and found that it seems when the document is altered by the controller in a way that makes the current selection position of the render editor no long actually be inside the same node.  In my case the whole document went away so any position beyond 0 would result in this exception. I was able to fix the problem by adding the following to the RawEditorState class initState method in lib/src/widgets/raw_editor.dart
    controller.onSelectionChanged = (textSelection) {
      renderEditor.setSelection(textSelection);
    };

Unfortunately it doesn't seem like this is a general fix as using these changes with the flutter-quill example app I'm still seeing the problem for the situations reported in this issue.

Did some more digging into this as I ran into this issue again when toggling a line from an unordered/ordered list back to plain text.  The problem stems from accessing the editor state after it has been marked for rebuild (setState). At that point the data in the editor widget is out of date relative to the controller. In some situations this is a problem as the structure of the document has changed; like when a line is changed into a list item by the toolbar.
I've submitted a possible fix for this with PR #1256

This should be fixed as of version 7.2.2

there is any solutions ?


issuer, issue time, executor, finish time

Could it be possible to set (issuer, issue time, executor, finish time) on the items, so you can follow them.

Well, this extension is simply a to-do list, intended to help developers to keep track of small tasks and to-dos while writing the code. It is not intended to be a complete task/bug tracking system. So, I'm not planning to add such features, at least in the nearest future.


fine-tune error

Hi, I am trying to use the fine-tune function but this error always comes up
cmd input:
G:\projects\ConSinGAN-test-p\ConSinGAN-master\ConSinGAN-master>py main_train.py --gpu 0 --train_mode harmonization --input_name Images/Harmonization/23.jpg --naive_img Images/Harmonization/23.png --fine_tune --model_dir TrainedModels/23/2020_04_23_15_58_53_harmonization_train_depth_3_lr_scale_0.1_BN_act_lrelu_0.3

But this error pops up:
Image does not exist: G:/projects/ConSinGAN
Please specify a valid image.

The error also skipped the -test-p of ConSinGAN-test-p and outputting only G:/projects/ConSinGAN
I am using Windows and you told me last time to change main_train.py line 107 to
copyfile(py_file, osp.join(dir2save, py_file.split("\\")[-1]))

fyi.
Thank you

Hi, the error is thrown because the input image (opt.input_name) does not exist (see https://github.com/tohinz/ConSinGAN/blob/52193b494c2183784cfbf1227b2a44cf4b78552e/main_train.py#L61).
It seems something with your --input_name does not work as it also does not print you input_name argument. Can you try putting the image into the same directory as main_train.py to make sure it's not something due to the different path formatting (Windows vs Ubuntu) again?
Also, is it correct that --input_name is a jpg but the naive image is a png?

The same error is still occurring even if I made the images (naive & input_name) to the same directory as main_train.py
And yes the input_name is a jpg and naive is a png

Hm, maybe you can just hardcode the paths to the two images in the code directly to get it to work for now? It might also work if you use the absolute path to the images instead of the relative ones.
It's hard to solve this from here but I believe it has something to do with Windows and how it handles paths since it works fine with Ubuntu.


update: Added toolkit class for dataset making

toolkit.py - Create new class for creating metadata
from images or videos. It loads a file
tries to find a board with modify version
of our first histogram algorithm. This version
is faster but a bit less accurate. Then
it prints found values of boards corners
to a file with frame indexes.

project.py - refactoring to fit pep standards

cc @mrshu

@Foxiy sorry for the delay here. The method you propose looks very solid. There are a couple of other things that do not look that solid though:

[ ] Decide on what format of metadata do you want to use.  I would suggest to make this your highest priority.

[ ] Get the code to production state.

[ ] Since what you are building will be a suite of command line tools they should behave as such -- most notably respect the well established notions of usage and help messages while also making sure that errors are reported properly so that other tools can build on top of them.

Although this might look like direct bashing I quite like the way in which you started and I am looking forward to see the dataset this tool creates.

In general the code looks way better than it did before. I added a couple of comments but they are mostly nitpicks you can deal with easily.
We should try to merge this ASAP since you added a command line tool with some functionality that should really br tested (i.e. making sure that the metadata from a sample blackboard is not only in the format we want it to be but also that the values are those we expect for that image).
This will assure that you do not accidentally break the  functionality of this script and also make this project look production ready.

@Foxiy All right, :+1:


Worked on parallax and banner's responsiveness

#10

@meetzaveri  Thanks for contributing. I hope to see more from you, meanwhile, you can check our codebase for any other issues and hopefully help us resolve it. :+1:


Create tiedenorssi.txt

@affaxltd Please provide us with:

the school official website URL, if different from the domain you are submitting
an URL of a page on the official website where an IT-related long-term (>1 year) course is offered by the school
an URL of a page or another proof (.pdf or a screenshot are OK) showing that the school recognizes the domain which you are submitting as an official email domain for the students.

http://www.tiedenorssi.fi/
https://nk.oulu.fi/

Also: https://cdn.discordapp.com/attachments/606148510383079464/686941423198928948/IMG_20200310_161930.jpg

@affaxltd Thank you for the clarification. Pull request merged.


UnboundLocalError: cannot access local variable 'FORMAT' where it is not associated with a value

When running the action with:
    - name: Upload SBOM
      uses: sbomify/github-action@master
      env:
        TOKEN: ${{ secrets.SBOMIFY_TOKEN }}
        COMPONENT_ID: 'GZ7pLm8m_a'
        LOCK_FILE: './packages/dart/sshnoports/pubspec.lock'
        SBOM_VERSION: ${{github.ref_name}}
        OUTPUT_FILE: 'tarballs/dart_sshnoports_sbom.cdx.json'
        AUGMENT: true
        ENRICH: true
        UPLOAD: true

It fails:
[Info] Using input file './packages/dart/sshnoports/pubspec.lock'.
[Info] Detected Dart lockfile
Traceback (most recent call last):
  File "/usr/src/app/entrypoint.py", line 571, in <module>
    main()
    ~~~~^^
  File "/usr/src/app/entrypoint.py", line 496, in main
    SPEC_VERSION = get_spec_version(FORMAT, sbom_data)
                                    ^^^^^^
UnboundLocalError: cannot access local variable 'FORMAT' where it is not associated with a value

Here's the full action run

Digging around a bit here, and it seems like FORMAT is here if you are providing an SBOM. In the above use case, a lock file is provided. Thus this variable is not set.
Perhaps, equally importantly, on L376 it's defined using the result from validate_sbom(), which would only return a boolean. Based on the input to get_spec_version(), this should be either spdx or cyclonedx.
@kashifpk can you take a look here?


Recommend log , balance server from MySQL to NoSQL DB.

I think MySQL server using the store logs, user balances, important imformation.
It will used NoSQL based backend (eg. mongodb , ... ) for scalabilities and securities .
using the sharding and replication technology.
MySQL is Popular using R-DBMS and Also secure , but it's central and websites store passwd.
It's hard to expanding and backuping the data , in realtime.

Partly right. The MySQL used to store oper log and history data. User balance did not store in MySQL, it was in memory.

@haipome  If break or suddenly down server, then user balance will not atomic store and serialization problem I think.

If you have read the code, it use thread pool to write to MySQL. It won't break the server.


FileDialog filters don't work properly and nothing is loaded on first run

Godot version:
3.2 alpha 3
OS/device including version:
Windoze 10
Issue description:
FileDialog seems to be somewhat broken:

filters get compounded in one long string if you keep switching between filters
the pre-set folder/path is not preloaded on first run (nothing shows up until you click a filter could be specific, all or any)
FilterDialog doesn't resize automatically when set to Full Rect.

Steps to reproduce:
Minimal reproduction project:
First Run with preset root folder/path (nothing shows up)

swapping between the two filters creates one long *.*.*.*.whatever filter was clicked last

All three of these bugs are confirmed as an issue for me as well in Linux [Mint 19.2] using the latest stable Godot Engine build [3.2.1].

Seems (1) might be a dupe of https://github.com/godotengine/godot/issues/38195?
Which has an associated unmerged PR here: https://github.com/godotengine/godot/pull/38298

the pre-set folder/path is not preloaded on first run (nothing shows up until you click a filter could be specific, all or any)

Confirmed on Linux, with no filter. I'm using this as a workaround:
extends FileDialog

func _ready():
	connect("visibility_changed", self, "invalidate")

Just calling invalidate in _ready does not seem to work.

Can this be closed as it is already fixed?

Fixed by #65389.


Multiline examples don't display as markdown code

Steps to reproduce
Have a function with multiple lines in an .EXAMPLE section
.EXAMPLE
     $verbs = Get-Verb
     $verbs

Expected behavior
------------------------- EXAMPLE 1 -------------------------
     $verbs = Get-Verb
     $verbs

Actual behavior
------------------------- EXAMPLE 1 -------------------------
     $verbs = Get-Verb

$verbs

v0.5.0

@Kreloc ah, interesting. Thank you for reporting it!
It's yet another help-engine problem that we probably should work-around in platyPS.

I might as well add something to the mix here. I often have multiple commands in an example:
PS C:\> $a = Get-Service
PS C>> $a | group Status

Followed by a blank line and then an explanation. I'd love for the PowerShell commands to be treated as a code block.

@jdhitsolutions sorry for the super late reply, slipped out of my attention :(
If you still care, this is a duplicate requirement of #294 you can read the long conversation there for more details.
TLDR: all example code snippets should get powershell moniker.

So this is an issue because the PowerShell help system considers the second line a remark instead of code regardless of if it's prefixed with PS C:\>.

It seems like this issue probably isn't being looked at anymore or isn't going to be resolved, right?
Does anyone have a work around?
I guess just making everything be on one line

@midacts anything not closed will be looked at but more common issues are prioritised.

This particular issue as i understand it only applies one inital help import into markdown. So a copy/paste from help to markdown would also allow you to work around the issue.

I created a big of regex magic to fix this issue, it can help somebody hopefully.
    New-MarkdownHelp -Module MyModuleToDocument -OutputFolder $OutputDir -Force

    $OutputDir | Get-ChildItem -File | ForEach-Object {
        # fix formatting in multiline examples
        $content = Get-Content $_.FullName -Raw
        $newContent = $content -replace '(## EXAMPLE [^`]*)(```\r\n)([^`]*)(```\r\n)(\r\n)([^#]*)(\r\n\r\n)+([^#]+)(#)', '$1$2$3$6$5$4$7$8$9'
        if ($newContent -ne $content) {
            Set-Content -Path $_.FullName -Value $newContent -Force
        }
    }

Would you care to try to include such heuristic in platypus when we generate the examples code from Get-Help object?

@vors, TL;DR: I gave it a try and realized that there is no way to come up with the heuristics that works for all scenarios.
Unfortunately, it seems that there is no way to distinguish between these two scenarios:
.EXAMPLE
PS C:\> Test-PlatyPSFunction "Multiline example, code only"
Generated output (no new line between these two lines)

and
.EXAMPLE
Test-PlatyPSFunction "Single line of code"

Single line of description - a new line that separates the code section doesn't matter :(

As it was said before, the problem is that Get-Help treats only the first line as code, and all the rest as remarks. What's even worse, it also trims all the new lines, so the author's intent is lost.
I came up with a couple of regexes:

a greedy one, always treats the first paragraph from the remarks as code

'(## EXAMPLE [^`]+?```\r\n[^`\r\n]+?\r\n)(```\r\n\r\n)([^#]+?\r\n)(\r\n)', '$1$3$2$4'

not as greedy as the previous one; always treats the last paragraph as a remark. It still doesn't work correctly for a single line of code and two paragraphs of remarks. It also doesn't work if there are no remarks at all.

'(## EXAMPLE [^`]+?```\r\n[^`\r\n]+?\r\n)(```\r\n\r\n)([^#]+?\r\n)(\r\n)([^#]+)(#)', '$1$3$2$4$5$6'

Feel free to test the above e.g. on http://regexstorm.net/tester using the below test data:
test data

Generated markdown:

	"---
	external help file:
	Module Name:
	online version:
	schema: 2.0.0
	---

	# Test-PlatyPSFunction

	## SYNOPSIS
	Copies an item from one location to another.

	## SYNTAX

	```
	Test-PlatyPSFunction [-Confirm]
	```

	## DESCRIPTION
	The Copy-Item cmdlet copies an item (...)

	## EXAMPLES

	### EXAMPLE 1
	```
	Test-PlatyPSFunction "Just a single line example, without remarks"
	```

	### EXAMPLE 2
	```
	Test-PlatyPSFunction "Multiline example, code only"
	```

	PS C:\\\> Generated output (no new line between these two lines, but it doesn't really matter)

	### EXAMPLE 3
	```
	Test-PlatyPSFunction "Single line of code"
	```

	Single paragraph of remarks - a new line that separates the code section doesn't matter :(

	### EXAMPLE 4
	```
	Test-PlatyPSFunction "Single line of code"
	```

	First paragraph of remarks - a new line that separates the code section doesn't matter :(

	Second paragraph of remarks - the first paragraph will be treated as code :(

	### EXAMPLE 5
	```
	$Session = New-PSSession -ComputerName "Server01" -Credential "Contoso\PattiFul"
	```

	Copy-Item "C:\MyRemoteData\test.log" -Destination "D:\MyLocalData\" -FromSession $Session
	My output

	The first command creates a session to the remote computer named Server01 with the credential of Contoso\PattiFul and stores the results in the variable named $Session.

	The second command uses the Copy-Item cmdlet to copy test.log from the remote C:\MyRemoteData\ to the local D:\MyLocalData folder using the session information stored in the $Session variable.
	This command does not delete the original file.

	## PARAMETERS

	### -Confirm
	Prompts you for confirmation before running the cmdlet.

	```yaml
	Type: SwitchParameter
	Parameter Sets: (All)
	Aliases:

	Required: False
	Position: Named
	Default value: False
	Accept pipeline input: False
	Accept wildcard characters: False
	```

	## INPUTS

	### System.String. You can pipe a string that contains a path to this cmdlet.
	## OUTPUTS

	### None or an object representing the copied item.
	## NOTES

	## RELATED LINKS

	[Online Version: http://go.microsoft.com/fwlink/?LinkId=821574]()

	"

Original comment-based help template based on https://technet.microsoft.com/en-us/library/hh847834.aspx :
.OUTPUTS
None or an object representing the copied item.

.EXAMPLE
PS C:\> Test-PlatyPSFunction "Just a single line example, without remarks"

.EXAMPLE
PS C:\> Test-PlatyPSFunction "Multiline example, code only"
PS C:\> Generated output (no new line between these two lines, but it doesn't really matter)

.EXAMPLE
PS C:\> Test-PlatyPSFunction "Single line of code"

Single paragraph of remarks - a new line that separates the code section doesn't matter :(

.EXAMPLE
PS C:\> Test-PlatyPSFunction "Single line of code"

First paragraph of remarks - a new line that separates the code section doesn't matter :(

Second paragraph of remarks - the first paragraph will be treated as code :(

.EXAMPLE
$Session = New-PSSession -ComputerName "Server01" -Credential "Contoso\PattiFul"
Copy-Item "C:\MyRemoteData\test.log" -Destination "D:\MyLocalData\" -FromSession $Session
My output

The first command creates a session to the remote computer named Server01 with the credential of Contoso\PattiFul and stores the results in the variable named $Session.

The second command uses the Copy-Item cmdlet to copy test.log from the remote C:\MyRemoteData\ to the local D:\MyLocalData folder using the session information stored in the $Session variable. This command does not delete the original file.

.LINK
Online Version: http://go.microsoft.com/fwlink/?LinkId=821574

I can open a PR for the above, but I'm a bit worried about introducing a breaking change here.
Also, it doesn't support every scenario properly, so I'm pretty sure that it may break things for some people.
Another option is to add this as an optional feature, but then probably just letting people use the above regexes (or different ones) is easier, safer and more reasonable.
The heuristics can be improved by checking if the first paragraph of remarks looks more like code or more like text, but it feels like creating a lot of complexity just to create a  workaround for a bug.
I assume that there is no way to have the Get-Help itself fixed?

First, wow, TIL about this nice trick from you
test data

Foo

test data

Foo

That's awesome, going to use from now one.
I think for the future versions of powershell, we can definitely fix it.
The bug seems to be in this method
https://github.com/PowerShell/PowerShell/blob/bd6fdae73520931f0d27a29d6290e18761772141/src/System.Management.Automation/help/HelpCommentsParser.cs#L496
The code is some state machine, if you feel like opening at issue in the PowerShell repo and maybe even trying to solve it - that would be amazing.

To be more precise, the bug is here:
https://github.com/PowerShell/PowerShell/blob/bd6fdae73520931f0d27a29d6290e18761772141/src/System.Management.Automation/help/HelpCommentsParser.cs#L514,L521
We are cutting off the code_str at the first \n char.
I think it's reasonable to rewrite this hand-written state machine as a regex parsing. The logic in the file is generating xmls on the fly so the performance bottleneck is not going to be in one regex application.

@Greg-Smulko nice job, I just tested this fix in Powershell 7. Is my conclusion correct in that this will only work for adjacent lines, like shown below.
PS> line 1
   line 2
       line 3
   line 4
line 5

The five lines above will be recognized as code by PlatyPS and will be correctly aligned. This line itself, and everything below will be used as the description. It is not possible to use empty lines in the multi line code, code lines must be adjacent.

@bravo-kernel , yes, you're correct. Everything up to the first double new line is treated as code, and then the rest is a description. The reasoning behind this is that a multi-paragraph description is quite common, and otherwise, it wouldn't be possible to figure out where the code ends and description begins (without some heuristics or relying on a prompt PS>).
If you want to take a look at supported examples, please take a look at the tests added as part of the PR in the PowerShell repo.

@Greg-Smulko thank you kindly for confirming, always better to be 100% sure beforehand.
For other users that might be interested in this topic... the Pester documentation website required supporting more complex code examples (that contain double-newlines in the code itself). After trying various solutions, the one that won is Code Fence Detection, applied during PlatyPS post-processing.
It basically allows you to use common markdown code fences in your Get-Help examples. For more information see:

this end-user usage guide with links to various example use-cases
this step-by-step explanation of all required technical steps and regexes used to support this on Powershell 5, 6 and 7

ps this still respects your PS7 native multi-line support 🎉

Marking as closed as it is no longer an issue due to the excellent work done by @Greg-Smulko based on @vors comments.


[test] Revisit P2PCPULatency numbers and modernize tests

Codecov Report

Merging #2130 (c4cb9aa) into master (b5cae2d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2130   +/-   ##
=======================================
  Coverage   85.97%   85.97%
=======================================
  Files          53       53
  Lines        9362     9362
=======================================
  Hits         8049     8049
  Misses       1313     1313

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5cae2d...c4cb9aa. Read the comment docs.

@jenkins-cscs retry none


Made font and text styles uniform across all event pages

Signed-off-by: Suneel Nadipalli<EMAIL_ADDRESS>Fixes #46

I've used CSS classes instead of inline CSS across all event pages and made the text font, style, color, etc uniform


Hello, is anyone looking to maintain this code ?

looking like this has been abandoned... is anyone looking at this site and code ?

Hi . I was asking myself the same question ... Did you get an answer ?

I am not really maintaining this code, I can take a look later today to maybe update the code. This project itself was created by a need for this in a program that I was developing, but I am not really working on this code anymore.


[SQL-CLI] release to Pypi is blocked by naming issue

Publishing to TestPyPI works https://test.pypi.org/project/opensearch-sql-cli/
But when trying to upload to PyPI, it says the name isn't allowed
% python3 -m twine upload --repository pypi dist/*
Uploading distributions to https://upload.pypi.org/legacy/
Uploading opensearch_sql_cli-1.0.0-py3-none-any.whl
100%|██████████████████████████████████████████████████████████████████████████████| 34.9k/34.9k [00:00<00:00, 105kB/s]
Error during upload. Retry with the --verbose option for more details.
HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
The name 'opensearch-sql-cli' isn't allowed. See https://pypi.org/help/#project-name for more information.

According to https://pypi.org/help/#project-name
Once possible reason is that someone else had released it to Pypi with same package name in the past, but deleted it afterwards. However somehow Pypi still keeps a record internally.
A record on the internet indicating it might have been released in the past
https://libraries.io/pypi/opensearch-sql-cli/100.10.7

Issue created in Pypi support
https://github.com/pypa/pypi-support/issues/1616


Syntax highlighting of HTML comments inside .md files fails with multi-paragraph or list-like comments.

VSCode Version: 1.7.1
OS Version: 10.0.14931

Steps to Reproduce:

Open the attached markdown document that's in the zip file.
Note how the syntax highlighting is broken inside of HTML comment blocks when you have multiple paragraphs or prefix any line with a dash.
HtmlCommentHighlightingIssues.zip

Thank you for the quick follow up. I believe #12696 fixed this recently by adding a special case for html comments.

The latest insiders builds should have this fix already, and the fix will become more broadly available in 1.8. Please let me know if something is still not rendering properly.
Thanks.

Excellent, thanks for letting me know!
--
*Kirk Munro *
Poshoholic, Microsoft MVP
Blog http://poshoholic.com/ | Twitter http://twitter.com/poshoholic |
LinkedIn http://ca.linkedin.com/in/kirkmunro | GitHub
http://github.com/KirkMunro | Facebook
http://www.facebook.com/#!/kirk.munro
Need a PowerShell SME for a project at work? Contact me
http://poshoholic.com/contact-me/!
On Mon, Nov 14, 2016 at 4:01 PM, Matt Bierner<EMAIL_ADDRESS>wrote:

Thank you for the quick follow up. I believe #12696
https://github.com/Microsoft/vscode/pull/12696 fixed this recently by
adding a special case for html comments.
[image: screen shot 2016-11-14 at 3 58 53 pm]
https://cloud.githubusercontent.com/assets/12821956/20287744/38301d96-aa83-11e6-8d5c-1423515074e8.png
The latest insiders builds https://code.visualstudio.com/insiders
should have this fix already, and the fix will become more broadly
available in 1.8. Please let me know if something is still not rendering
properly.
Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/15486#issuecomment-260503910,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADWkXSM0M80ZWIiqcB50SzM09q0L3Sztks5q-PZTgaJpZM4Kx9M9
.


Let the android app to work in background (when app is in background and/or screen is off)

Background Service Limitations

cordova-plugin-foreground-service

NOTE: This plugin does not on its own allow the user to execute javascript while the app is in the background. This must be accompanied by another plugin that will create a background process that will give the application background cycles. This plugin mainly exists to solve the problem outlined here. An app will have restricted background processing if it is not considered a "foreground app" for android API 26+ and will prevent background pluggins from functioning properly. With this plugin your application will be a foreground app and let your background services run properly. This plugin may also help with android doze where an application may not run in the background unless it also has a foreground process. Do not expect this plugin on its own to allow your app to execute javascript while in the background.

This plugin allows for android devices to continue running services in the background, using a foreground ongoing notification. This is targeted towards use with plugins such as 'cordova-geolocation' that will not run while the app is in the background on android API 26+.

According to this example it is enough to have foreground service to do something inside it when the app in background and/or screen is off

There is a lot of confusing info about foreground services. For someone it works perfect, for someone it is not. I have these problems with SaveMyLife android application when I was trying to keep my foreground service alive. Sometimes it is just killed even if the service returns START_STICKY and there are no battery optimizations set for my app it settings

I think we need our app to save something always so our background work is long-running

According to this info I guess we need a foreground service.
We have some JS code in our components and I guess we do not need to use useDeepSubscription there to make some work when a specific link is created/updated/deleted in deep.
Subscription and following actions must be executed in foreground service
How can we achieve this? Should we write code inside foreground services ?

I am learning code from capacitor-community and I have found background-geolocation plugin
It created a foreground service
I see this part of code but I still do understand how we should use useDeepSubrciption. Where should it be located to work even if the app is closed and foreground service is active? What our functional components converted to? Can we make our functional component to "work" when foreground service is active?

I have found out how capacitor plugins are used in android project.
They are added as projects to capacitor.settings.gradle and included to dependencies in capacitor.build.gradle

This is not something missing in Ionic. This is something missing the native frameworks. Ionic cannot make plugins for something that Apple and Google don’t support. Basically they do not want you to be able to use all the battery of the device, so they don’t allow this.
For Android, some hacks exist, but for iOS they do not.
There are background workers that will work for a while, but the OS will eventually kill your background thread.
You need remote push notifications sent from a server for this purposes. It is possible to send notifications that are invisible to the user but are only meant to trigger some event in the app, like a background thread fetching data.
I participated on building the Covid detection app in my country, and here there is a specific API (Exposure notification API) which was necessary to keep the app running in the background.
We tried for a long time to build this for our selves, but it cannot be done. You cannot keep a background thread alive infinitely in a custom app. The purpose is to protect the users.
Source

Cordova Background Plugin

Plugin for the Cordova framework to perform infinite background execution.
Most mobile operating systems are multitasking capable, but most apps dont need to run while in background and not present for the user. Therefore they pause the app in background mode and resume the app before switching to foreground mode. The system keeps all network connections open while in background, but does not deliver the data until the app resumes.

...

The system keeps all network connections open while in background, but does not deliver the data until the app resumes.

... 🤔

People on https://forum.ionicframework.com/t/post-location-updates-even-when-screen-is-off-other-application-is-in-the-foreground-ionic-angular/204098 have the same problem but there is no solution :(

https://github.com/capawesome-team/capacitor-background-task#beforeexit allows to do work on background and it says

On iOS this method should be finished in less than 30 seconds.

But no info about android. Can we use it without a foreground service and disabling battery optimizations for our app?

https://developer.android.com/topic/performance/memory-overview#SwitchingApps

For more information about how processes are cached while not running in the foreground and how Android decides which ones can be killed, see the Processes and Threads guide.

https://developer.android.com/training/monitoring-device-state/doze-standby#:~:text=Note%3A You,app is idle.
The amount of information supporting the hypothesis that we need a foreground service is increasing
Ok... Let us imagine we need a foreground service. How can we use javascript functionality inside it? For example use useDeepSubscription hook, create some links like we must do in our functional component. For example when useDeepSubscription "sees" new Vibrate link which is not Vibrated yet it will rerender functional component and useEffect that depends on the values returned from useDeepSubscription must vibrate uses's phone.
How can we do this by using foreground service?

Trying to answer on my questions:

Ok... Let us imagine we need a foreground service. How can we use javascript functionality inside it? For example use useDeepSubscription hook, create some links like we must do in our functional component. For example when useDeepSubscription "sees" new Vibrate link which is not Vibrated yet it will rerender functional component and useEffect that depends on the values returned from useDeepSubscription must vibrate uses's phone.
How can we do this by using foreground service?

The easiest way to communicate between JavaScript and native code is to build a custom Capacitor plugin that is local to your app.

Source - Custom Native Android Code
Example:
package com.example.myapp;

import com.getcapacitor.JSObject;
import com.getcapacitor.Plugin;
import com.getcapacitor.PluginCall;
import com.getcapacitor.PluginMethod;
import com.getcapacitor.annotation.CapacitorPlugin;

@CapacitorPlugin(name = "Echo")
public class EchoPlugin extends Plugin {

    @PluginMethod()
    public void echo(PluginCall call) {
        String value = call.getString("value");

        JSObject ret = new JSObject();
        ret.put("value", value);
        call.resolve(ret);
    }
}

Problem: but I need a foreground service that... Hm 🤔 Should it call our javascript code someway or can we just create a foreground service and code in our functional components will just work?
I think no... Reason:

NOTE: This plugin does not on its own allow the user to execute javascript while the app is in the background. This must be accompanied by another plugin that will create a background process that will give the application background cycles. This plugin mainly exists to solve the problem outlined here. An app will have restricted background processing if it is not considered a "foreground app" for android API 26+ and will prevent background pluggins from functioning properly. With this plugin your application will be a foreground app and let your background services run properly. This plugin may also help with android doze where an application may not run in the background unless it also has a foreground process. Do not expect this plugin on its own to allow your app to execute javascript while in the background.

Source - cordova-plugin-foreground-service

This must be accompanied by another plugin that will create a background process that will give the application background cycles.
🤔 Should I ask them in an issue which plugin sholud I use?

I guess I should try to create a foreground service by using cordova-plugin-foreground-service and use capacitor-background-task
🤔 How should I use capacitor-background-task?
Example from
import { App } from '@capacitor/app';
import { BackgroundTask } from '@capawesome/capacitor-background-task';

App.addListener('appStateChange', async ({ isActive }) => {
  if (isActive) {
    return;
  }
  // The app state has been changed to inactive.
  // Start the background task by calling `beforeExit`.
  const taskId = await BackgroundTask.beforeExit(async () => {
    // Run your code...
    // Finish the background task as soon as everything is done.
    BackgroundTask.finish({ taskId });
  });
});

I cannot use our hook right there. What should I do instead?

I have found out that useDeepSubscription uses useSubscription from apollo/client
It is possible to subscribe by using kotlin:

If we are going to use that we must convert our java code to kotlin
🤔 Why do we need that at all? Will not our useDeepSubscription work in our functional component when a screen is off? I think it is not because the activity can be just closed and foreground service will not make our activity to live forever. I have not found information that is against my hypothesis: https://www.google.com/search?q=foreground+service+is+activity+working&oq=foreground+service+is+activity+working&aqs=chrome..69i57l2j0i271l2j69i60l3.5482j0j1&sourceid=chrome&ie=UTF-8

According to this issue I am not even sure if capacitor-background-task even working. The author says:

A short notice: There is now an Android Foreground Service plugin that allows you to run Capacitor apps (Android only, iOS does not support this without further conditions) permanently in the background (unless they are force closed).
This plugin can be combined very well with other plugins like this or https://github.com/transistorsoft/capacitor-background-fetch.

Should we subscribe to changes? We can use capacitor-background-fetch#example ant fetch data every N minutes.
Problem:

Background Fetch is a very simple plugin which attempts to awaken an app in the background about every 15 minutes.
There is no way to increase the rate which a fetch-event occurs and this plugin sets the rate to the most frequent possible — you will never receive an event faster than 15 minutes. The operating-system will automatically throttle the rate the background-fetch events occur based upon usage patterns. Eg: if user hasn't turned on their phone for a long period of time, fetch events will occur less frequently or if an iOS user disables background refresh they may not happen at all.

🤔

I have tried the query [capacitor subscribe to apollo](https://www.google.com/search?q=capacitor+subscribe+to+apollo&oq=capacitor+subscribe+to+apollo&aqs=chrome..69i57j33i160.4930j0j4&sourceid=chrome&ie=UTF-8]
I have found the answer that tells us to use push-notification:

I think what you need is Push Notifications (@capacitor/push_notifications).

When a subscription happens in your server (eg. new message) you then send a push notification to your devices. The push notification will be displayed in the device and when you click/open the app you can fetch new data from the server.
I have seen that answer already somewhere else. Looks wise. Intuition tells me that Telegram uses this to deliver us notifications about new messages so fast. Should we use this solution?
Then we do not need useDeepSubscription and we need to create a handler that is going to send a push notification a device

Avout fetching data every N minutes. It will workwith https://github.com/transistorsoft/capacitor-background-fetch
It limets us to fetch data to at least every 15 minutes ONLY on IOS but there are no restrictions for android therefore we can fetch data every minute 🤔

According to this I think we can reduce battery consumption if we will be able to do most of work on server and just notify a device to do something 🤔

We are able to subscribe to push notifications and do some work
https://capacitorjs.com/docs/apis/push-notifications#addlistenerpushnotificationreceived-
How I see it for example for the Vibrator package

Server handler that is triggered when a Vibrate link is inserted will send a push notification to a device
The device that is subscribed to push notifications will be able to do some work according what push notification is send

In capacitor push notifications plugin I have found data only notifications section. It says

This plugin does support data-only notifications, but will NOT call pushNotificationReceived if the app has been killed. To handle this scenario, you will need to create a service that extends FirebaseMessagingService, see Handling FCM Messages.
The most interesting place - override onMessageReceived

One more answer that tells that we should use push-notifications https://stackoverflow.com/a/73130700/13545849

I have tried to find info whether firebase can send notifcations to the APP that are not showed to a user. According to this answer it works this way and you are up to show notification  if you want.  You can do what you want when you gen push-notification

According to the info from How can I send notifications to Android devices in Doze / power saving mode? we have to use ignore battery optimization feature or FCM high-priority fallback delivery
[Set and manage message priority](FCM high-priority fallback delivery,) page says

You have two options for assigning delivery priority to downstream messages on Android: normal and high priority. Delivery of normal and high priority messages works like this:

Normal priority. This is the default priority for data messages. - Normal priority messages are delivered immediately when the device is not sleeping. When the device is in Doze mode, delivery may be delayed to conserve battery until the device exits doze. For less time-sensitive messages, such as notifications of new email, keeping your UI in sync, or syncing app data in the background, choose normal delivery priority.
When receiving a normal priority message on Android that requests a background data sync for your app, you can schedule a task with WorkManager to handle it when the network is available.
High priority. FCM attempts to deliver high priority messages immediately, allowing FCM to wake a sleeping device when necessary and to run some limited processing (including very limited network access). High priority messages generally should result in user interaction with your app or its notifications.

allowing FCM to wake a sleeping device when necessary and to run some limited processing

🤔
Does this meet our requirements? What is limited processing? How mush is it limited?

High priority messages on Android are meant for time sensitive, user visible content, and should result in user-facing notifications. If FCM detects a pattern in which messages do not result in user-facing notifications, your messages may be deprioritized to normal priority. FCM uses 7 days of message behavior when determining whether to deprioritize messages; it makes this determination independently for every instance of your application. If, in response to high priority messages, notifications are displayed in a way that is visible to the user, then your future high-priority messages will not be deprioritized. This applies whether the notification is displayed by the FCM SDK via a notification message, or a developer-generated notification via a data message.

...... Fuck? 🤔
Is it fine or should we use foreground service and make our apollo subscription to work in background?

I have created discussion on apollo graphQL website - https://community.apollographql.com/t/how-to-use-apollo-subscription-in-a-foreground-service-in-android/5349?u=freephoenix888

Error
freephoenix888@freephoenix888:~/node-test-project$ npm start

><EMAIL_ADDRESS>start
> node index.js

Error sending message: Error: secretOrPrivateKey must be an asymmetric key when using RS256
    at Object.module.exports [as sign] (/home/freephoenix888/node-test-project/node_modules/jsonwebtoken/sign.js:124:22)
    at ServiceAccountCredential.createAuthJwt_ (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/credential-internal.js:105:20)
    at ServiceAccountCredential.getAccessToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/credential-internal.js:77:28)
    at FirebaseAppInternals.refreshToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/firebase-app.js:45:49)
    at FirebaseAppInternals.getToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/firebase-app.js:37:25)
    at AuthorizedHttpClient.getToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/utils/api-request.js:617:34)
    at AuthorizedHttpClient.send (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/utils/api-request.js:605:21)
    at FirebaseMessagingRequestHandler.invokeRequestHandler (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/messaging/messaging-api-request-internal.js:64:32)
    at /home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/messaging/messaging.js:195:49

Code
var admin = require("firebase-admin");
require('dotenv').config()

var serviceAccount = require("./deep-97e93-firebase-adminsdk-rnzyo-9dddc99b8b.json");

admin.initializeApp({
  credential: admin.credential.cert(serviceAccount)
});

const deviceRegistrationToken = process.env.DEVICE_REGISTRATION_TOKEN;

const payload = {
  notification: {
    title: 'Notification Title',
    body: 'This is an example notification',
  }
};

const options = {
  priority: 'high',
  timeToLive: 60 * 60 * 24, // 1 day
};

firebase.messaging().sendToDevice(firebaseToken, payload, options);

Where I get device registration token from - https://capacitorjs.com/docs/apis/push-notifications#addlistenerregistration-
Where I get code example and private key from

https://www.woolha.com/tutorials/node-js-send-push-notification-message-to-firebase

I have been looking for information about "is Firebase really the solution we should use?" and I have found information about wake locks. Some people use them to not let CPU sleet and do some work. I have tried to google that too and I came to Keep the device awake documentation page where it says:

Alternatives to using wake locks
Before adding wakelock support to your app, consider whether your app's use cases support one of the following alternative solutions:
If your app is performing long-running HTTP downloads, consider using DownloadManager.
If your app is synchronizing data from an external server, consider creating a sync adapter.
If your app relies on background services, consider using JobScheduler or Firebase Cloud Messaging to trigger these services at specific intervals.
If you need to keep your companion app running whenever a companion device is within range, use Companion Device Manager.

I was trying to figure out is Sync adapters really what we need. The Transfer data using sync adapters documentation page says

Note: We recommended WorkManager as the recommended solution for most background processing use cases. Please reference the background processing guide to learn which solution works best for you.

Restricted access to location, camera, and microphone How is our app going to be working if the foreground service that is restarted after phone boot cannot access microphone?

To help protect user privacy, Android 11 (API level 30) introduces limitations to when a foreground service can access the device's location, camera, or microphone. When your app starts a foreground service while the app is running in the background, the foreground service has the following limitations:
Unless the user has granted the ACCESS_BACKGROUND_LOCATION permission to your app, the foreground service cannot access location.
The foreground service cannot access the microphone or camera.

Exemptions from the restrictions
In some situations, even if a foreground service is started while the app is running in the background, it can still access location, camera, and microphone information while the app is running in the foreground ("while-in-use"). In these same situations, if the service declares a foreground service type of location and is started by an app that has the ACCESS_BACKGROUND_LOCATION permission, this service can access location information all the time, even when the app is running in the background.
The following list contains these situations:

The service is started by a system component.
The service is started by interacting with app widgets.
The service is started by interacting with a notification.
The service is started as a PendingIntent that is sent from a different, visible app.
The service is started by an app that is a device policy controller that is running in device owner mode.
The service is started by an app which provides the VoiceInteractionService.
The service is started by an app that has the START_ACTIVITIES_FROM_BACKGROUND privileged permission.

https://stackoverflow.com/a/42593885/13545849

This is a pattern you should avoid because:

The device may disconnect the network from your Android app in doze mode in newer versions of Android. If you're trying to get notified at any time of any change, this is not going to work.

Firebase Cloud Messaging is a better way to reliably wake a device to handle a change that your app needs to know about.

Firebase Realtime Database uses a websocket to let a client know when things change. At least the drain on battery from an open socket is not a big deal. You just shouldn't count on that connection unless your app is visible and has a reliable network connection.

https://stackoverflow.com/a/11789809/13545849

Keeping an idle TCP socket connection open (with no data being sent or received) will not (or at least, should not) consume any more battery than having it closed. That is because an idle TCP connection uses no bandwidth or CPU cycles(*).
That said, keeping a TCP connection open for extended periods may not be a good option for a mobile device, because TCP connections don't interact well with computers that go to sleep. The problem scenario would be this: your Android user puts his Android device to sleep while your app is running, and then the remote user's program (or whatever is at the other end of the TCP connection) sends some data over the TCP stream. The remote user's program never gets any ACKs back from the Android device, because of course the Android device is asleep, so the remote device's TCP stack assumes that the TCP packets it sent must have been lost, and it responds by increasing its timeout period, decreasing its TCP window size (aka number-of-TCP-packets-allowed-in-flight-at-once), and resending the TCP packets. But the Android device is still asleep, and thus the same thing happens again. The upshot is that a few minutes later, the remote end of the TCP connection has slowed down to the point where even if the Android device was to wake up, the TCP connection will likely be too slow to be usable -- at which point your program will need to close the bogged-down TCP connection and start up a fresh one anyway, so why bother trying to keep it open?
So my recommendation would be to go with option (a), with the stipulation that you close the TCP connection as part of your device-is-going-to-sleep-now routine.
One possible caveat would be if Android has a feature where keeping a TCP connection open causes the WiFi or cell-network hardware to remain powered up in a situation where it could otherwise be put to sleep -- if that is the case, then the Android device would pay a battery cost for powering the antenna, which it wouldn't otherwise have had to pay. I'm not aware of any Android logic like that, but I've only used Android a little so that might just be ignorance on my part. It might be worth testing for, at least.
(*) Well, technically TCP does send a "keepalive" packet every so often while a TCP connection is open, and that does use some CPU cycles and antenna power... but the default interval for sending keepalive packets on Android is two hours, so I doubt the power used for that would be noticeable.

Doze restrictions
The following restrictions apply to your apps while in Doze:
Network access is suspended.
The system ignores wake locks.
Standard AlarmManager alarms (including setExact() and setWindow()) are deferred to the next maintenance window.
If you need to set alarms that fire while in Doze, use setAndAllowWhileIdle() or setExactAndAllowWhileIdle().
Alarms set with setAlarmClock() continue to fire normally — the system exits Doze shortly before those alarms fire.
The system does not perform Wi-Fi scans.
The system does not allow sync adapters to run.
The system does not allow JobScheduler to run.

Doze checklist
If possible, use Firebase Cloud Messaging (FCM) for downstream messaging.
If your users must see a notification right away, make sure to use an FCM high priority message. Be sure to only use high priority for messages that will result in a notification. For more guidance, refer to FCM's documentation on message priority for Android.
Provide sufficient information within the initial message payload, so subsequent network access is unnecessary.
Set critical alarms with setAndAllowWhileIdle() and setExactAndAllowWhileIdle().
Test your app in Doze.

https://stackoverflow.com/questions/32286797/wakelock-and-doze-mode

https://stackoverflow.com/a/33757158/13545849:

Also this is actually our recommended practice for this situation -- if you have a long-running foreground service, it should be in a separate process from the activity, so it doesn't force all of the memory associated with the activity to be kept around. (This is also why this bug got through, all of our apps use this pattern.)

FCM attempts to deliver high priority messages immediately even if the device is in Doze mode.

How?

#i_hate_firebase
https://stackoverflow.com/questions/73135325/android-app-not-waking-up-from-doze-mode-even-with-high-priority-message

Using FCM to interact with your app while the device is idle
Firebase Cloud Messaging (FCM) is a cloud-to-device service that lets you support real-time downstream messaging between backend services and apps on Android devices. FCM provides a single, persistent connection to the cloud; all apps needing real-time messaging can share this connection. This shared connection significantly optimizes battery consumption by making it unnecessary for multiple apps to maintain their own, separate persistent connections, which can deplete the battery rapidly. For this reason, if your app requires messaging integration with a backend service, we strongly recommend that you use FCM if possible, rather than maintaining your own persistent network connection.
FCM is optimized to work with Doze and App Standby idle modes. FCM high priority messages let you reliably wake your app to engage the user. In Doze or App Standby mode, the system delivers the message and gives the app temporary access to network services and partial wakelocks, then returns the device or app to the idle state. For time sensitive, user-visible notifications, consider using high priority messages to enable delivery in Doze mode. High priority messages are expected to result in notifications. See FCM's guidance on high priority messages for more information.
For messages that don't result in notifications, such as keeping application content up to date in the background or initiating data syncs, normal priority FCM messages are the correct choice. Normal priority messages are delivered immediately if the device is not in doze. If the device is in Doze mode, they are delivered during the periodic doze maintenance windows or as soon as the user wakes the device.
As a general best practice, if your app requires downstream messaging, it should use FCM. If your app already uses FCM, make sure that it uses high priority messages only for messages that result in user-facing notifications.

Error
freephoenix888@freephoenix888:~/node-test-project$ npm start

><EMAIL_ADDRESS>start
> node index.js

Error sending message: Error: secretOrPrivateKey must be an asymmetric key when using RS256
    at Object.module.exports [as sign] (/home/freephoenix888/node-test-project/node_modules/jsonwebtoken/sign.js:124:22)
    at ServiceAccountCredential.createAuthJwt_ (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/credential-internal.js:105:20)
    at ServiceAccountCredential.getAccessToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/credential-internal.js:77:28)
    at FirebaseAppInternals.refreshToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/firebase-app.js:45:49)
    at FirebaseAppInternals.getToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/firebase-app.js:37:25)
    at AuthorizedHttpClient.getToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/utils/api-request.js:617:34)
    at AuthorizedHttpClient.send (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/utils/api-request.js:605:21)
    at FirebaseMessagingRequestHandler.invokeRequestHandler (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/messaging/messaging-api-request-internal.js:64:32)
    at /home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/messaging/messaging.js:195:49

Code
var admin = require("firebase-admin");
require('dotenv').config()

var serviceAccount = require("./deep-97e93-firebase-adminsdk-rnzyo-9dddc99b8b.json");

admin.initializeApp({
  credential: admin.credential.cert(serviceAccount)
});

const deviceRegistrationToken = process.env.DEVICE_REGISTRATION_TOKEN;

const payload = {
  notification: {
    title: 'Notification Title',
    body: 'This is an example notification',
  }
};

const options = {
  priority: 'high',
  timeToLive: 60 * 60 * 24, // 1 day
};

firebase.messaging().sendToDevice(deviceRegistrationToken , payload, options);

Where I get device registration token from - https://capacitorjs.com/docs/apis/push-notifications#addlistenerregistration-
Where I get code example and private key from

https://www.woolha.com/tutorials/node-js-send-push-notification-message-to-firebase

Note
I use the same registration token on firebase's console to send "test cloud notification" and it is working. I do not think the problem is because device registratin token is not valid

This problem was happening because of old npm version:
freephoenix888@freephoenix888:~/node-test-project$ npm start

><EMAIL_ADDRESS>start
> node index.js

Error sending message: Error: secretOrPrivateKey must be an asymmetric key when using RS256
    at Object.module.exports [as sign] (/home/freephoenix888/node-test-project/node_modules/jsonwebtoken/sign.js:124:22)
    at ServiceAccountCredential.createAuthJwt_ (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/credential-internal.js:105:20)
    at ServiceAccountCredential.getAccessToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/credential-internal.js:77:28)
    at FirebaseAppInternals.refreshToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/firebase-app.js:45:49)
    at FirebaseAppInternals.getToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/app/firebase-app.js:37:25)
    at AuthorizedHttpClient.getToken (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/utils/api-request.js:617:34)
    at AuthorizedHttpClient.send (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/utils/api-request.js:605:21)
    at FirebaseMessagingRequestHandler.invokeRequestHandler (/home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/messaging/messaging-api-request-internal.js:64:32)
    at /home/freephoenix888/node-test-project/node_modules/firebase-admin/lib/messaging/messaging.js:195:49
freephoenix888@freephoenix888:~/node-test-project$ nvm use 18.12.1
Now using node v18.12.1 (npm v8.19.2)
freephoenix888@freephoenix888:~/node-test-project$ npm start

><EMAIL_ADDRESS>start
> node index.js

Successfully sent message: projects/deep-97e93/messages/0:1672834849350838%a6e672eea6e672ee

addListener('pushNotificationReceived', ...) does not work if the application is closed

Push notifications
We do not need to only get push notifications from a deep server. We need every package to get push-notifications to be aware of changed in deep.
How do we  get push notifications for every package or how  to make them aware of them?
Question
How
Work when app is closed and screen is off
We need a lot of packages not only get push notifications but to work all the time when they are enabled - for example geolocation and audio-recording packages
To prevent doze mode - we can disable battery optimizations for our application and every package can run its own foreground service

No answers:

https://stackoverflow.com/q/53526265/13545849
https://stackoverflow.com/questions/59695814/whether-multiple-instance-of-firebasemessagingservice-are-created-to-handle-mult
https://stackoverflow.com/questions/58487634/android-only-one-firebase-messaging-service-is-working-at-a-time

Bad:

https://medium.com/streamotion-tech-blog/support-multiple-firebase-messaging-services-in-an-android-app-9df87c119b47

Possible solution - https://stackoverflow.com/questions/47659458/android-can-an-android-app-have-multiple-firebasemessagingservices
But nothing about it in the documentation. How much reliable is it?

Are all packages will be installed in the applications? If so we can have just one firebase cloud messaging service

How to call capacitor plugins right in kotlin?

https://github.com/DavidBriglio/cordova-plugin-foreground-service/issues/24

https://community.apollographql.com/t/how-to-use-apollo-subscription-in-a-foreground-service-in-android/5349/2?u=freephoenix888

https://stackoverflow.com/a/72422943/13545849

Plugin that can possible solve our problem - https://github.com/flytesoft-software/capacitor-persistent-notification
But not on IOS :(

I do not understand this answer: https://forum.ionicframework.com/t/how-to-get-a-capacitor-app-to-run-in-the-background-on-android/202035/2

https://medium.com/@oriharel/how-to-run-javascript-code-in-a-background-service-on-android-8ec1a12ebe92
Is not this solution will make google market to refuse upload our app? 🤔

https://stackoverflow.com/a/58461878/13545849

Is it fine to just create a wake lock? https://stackoverflow.com/a/13578149/13545849

I have found this plugin but how are we going to use it ? https://github.com/angeloraso/capacitor-plugin-background-mode

https://www.npmjs.com/package/cordova-plugin-background-mode
Is this fine?

The system keeps all network connections open while in background, but does not deliver the data until the app resumes.

https://forum.ionicframework.com/t/going-native-background-execution-of-javascript-just-isnt-100/8603/2
:(

https://github.com/transistorsoft/capacitor-background-geolocation/issues/13#issuecomment-1008425315

I found a solution for this problem. Android will run the code only if it was written in Java. You must write this code in Java if you wont to do something in background. More about this you can find here: https://github.com/transistorsoft/cordova-background-geolocation-lt/wiki/Android-Headless-Mode#step-2a--plugin-version-2132

https://github.com/ionic-team/capacitor-plugins/issues/1195#issuecomment-1256146710
Geolocation does not work in background
But I see BackgroundRunner Plugin


Handle line endings on Windows

The roundtrip tests (see #71) should employ a string comparison rather than a file comparison, to avoid issues with Windows line endings.  The current solution forces unix line endings on test files, regardless of platform.

Fixed in 36fd442e9b81b3a8646b7dde64afb4f00ca2e8af


Steam: popup window not filtered

I'm quite new to komorebi so I apologize if I'm wrong or missing something. Fwiu this part of the file should filter out some "Steam" windows, I suppose popups looking the id vguiPopupWindow.
https://github.com/LGUG2Z/komorebi-application-specific-configuration/blob/b7d1da162f70aff37b77ebc9375d78c6be3c051a/applications.yaml#L1088-L1092
This isn't happening to me: right clicking on Steam's system tray icon, I see a giant window managed by komorebi. I'm not sure how/where I can find the Class.id specified: vguiPopupWindow, but I suppose with AHK spy, because looking at the popup with it I found this:

That's the same id of the "Steam Beta" filter (nb: I'm not using the beta). Also, the popup window looks like it has the same id of the main application window.
https://github.com/LGUG2Z/komorebi-application-specific-configuration/blob/b7d1da162f70aff37b77ebc9375d78c6be3c051a/applications.yaml#L1093-L1103
Not sure how to proceed from here. Thanks to #56 I quite understood matching_strategy, but still not sure about options available and on what float_identifiers does exactly.

I've been playing around with this a bit, and the following composite float rule seems sensible to me:
  "float_rules": [
    [
      {
        "kind": "Exe",
        "id": "steamwebhelper.exe",
        "matching_strategy": "Equals"
      },
      {
        "kind": "Title",
        "id": "Steam",
        "matching_strategy": "DoesNotEqual",
      }
    ]
  ],

Added here: https://github.com/LGUG2Z/komorebi-application-specific-configuration/commit/7acc4f6408101ddd97f7119f48d74d8ad5b5e2b2


Speaker's messages sufficient to communicate goal?

Hi!
The observations of the listener are the messages of the speaker.
This should be sufficient to communicate goal location (one out of three landmarks). However, the speaker only observes the goal color. Which is nothing more than the color of the target landmark.
How can this be sufficient to guide the listener?
The speaker does not know the relative position of the listener (relative to the target landmark), so it cannot say something like "up, down, up, up". Or alternatively, the listener does not see the landmark colors, so it cannot understand messages like "red"....
Hope this can be clearified!

Hi,
Maybe it is very simple like this:
Listener obtains observation like p=[p_red, p_green, p_blue], together with message = [one_hot]. If the one_hot corresponds to a color, it can infer the corresponding entry in the position vector.
For example, it receives "[1 0 0]", which is same as "red", it knows to reduce p_red, so first entry.
Or, it receives "[0 1 0]", translated to "green", it knows to minimize the relative distance of the second entry.
Correct?


Ger error "Oops, it looks like we were unable to contact the selected payment service " when i try to config with stripe sandbox

Here is config in setting.py
PAYMENT_VARIANTS = {
'stripe': ('payments.stripe.StripeProvider', {
'secret_key': 'sk_test_123456',
'public_key': 'pk_test_123456'})}
CHECKOUT_PAYMENT_CHOICES = [
('default', 'stripe')]
when i proceed to payment then i got error message: "Oops, it looks like we were unable to contact the selected payment service "

it works well now, thanks

Hello, here Im having the exact same error with paypal...I need some help please...
PAYMENT_VARIANTS = {
'paypal': ('payments.paypal.PaypalProvider', {
'client_id'<EMAIL_ADDRESS>'secret': 'secretkey123',
'endpoint': 'https://api.sandbox.paypal.com',
'capture': False})}
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
CHECKOUT_PAYMENT_CHOICES = [
('paypal', 'PaypalProvider')]


Critical Alerts detection - Microsoft Defender

Details
Detection -  Detect Critical Alerts from Security Tools
Story - Critical Alerts
Checklist

[ ] Validate name matches <platform>_<mitre att&ck technique>_<short description> nomenclature
[ ] CI/CD jobs passed ✔
[ ] Validated SPL logic.
[ ] Validated tags, description, and how to implement.
[ ] Verified references match analytic.
[ ] Confirm updates to lookups are handled properly.

Notes For Submitters and Reviewers

If you're submitting a PR from a fork, ensuring the box to allow updates from maintainers is checked will help speed up the process of getting it merged.
Checking the output of the build CI job when it fails will likely show an error about what is failing. You may have a very descriptive error of the specific field(s) in the specific file(s) that is causing an issue. In some cases, its also possible there is an issue with the YAML. Many of these can be caught with the pre-commit hooks if you set them up. These errors will be less descriptive as to what exactly is wrong, but will give you a column and row position in a specific file where the YAML processing breaks. If you're having trouble with this, feel free to add a comment to your PR tagging one of the maintainers and we'll be happy to help troubleshoot it.
Updates to existing lookup files can be tricky, because of how Splunk handles application updates and the differences between existing lookup files being updated vs new lookups. You can read more here but the short version is that any changes to lookup files need to bump the datestamp in the lookup CSV filename, and the reference to it in the YAML needs to be updated.

can you test this locally to figure out why is it failing  unit- testing?

Known CI Error . the other jobs look good!


Make follow on items in inventories doesn't correctly orbit if you're moving

Description

If you use the make follow verb on something, like a ghost soft toy, while you are walking and while it is held in your hands it gets stuck offset from you. I'm not sure what the exact requirements are for reproduction, but that works. The distance appears to be related to your movement speed. I'll try to look at it to fix it soon:tm: ;-;

Dupe https://github.com/space-wizards/space-station-14/issues/14078


Support for Django 2.0

Are there plans for supporting Django 2.0 in the future?

@GasparPizarro Yes, I would love to. If you have extended this for Django 2.0, it would make sense to review and merge.


repr(PauliString) on one qubit doesn't round-trip

In[23]: ps = cirq.Z(q0)*1
In[24]: repr(ps)
Out[24]: 'cirq.Z.on(cirq.LineQubit(0))'
In[26]: type(ps)
Out[26]: cirq.ops.pauli_string.PauliString
In[28]: type(eval(repr(ps)))
Out[28]: cirq.ops.pauli_string.SingleQubitPauliStringGateOperation

and it is no longer a PauliString

ps == eval(repr(ps)) is True though, which is perhaps all that matters.

If you try to include a single-qubit pauli string as part of an object for the json_serialization test it doesn't work because it compares jsonify(ps) == jsonify(eval(repr(ps)))

Should cirq.testing.assert_equivalent_repr also test repr(val) == repr(eval(repr(val)))?

AFAIK Python types by themselves aren't expected to be round-trippable.

SingleQubitPauliStringGateOperation inherits from PauliString, so it is technically still a pauli string.

Is this still an issue?

the behavior has not changed (I just ran the snippet provided)


cannot read property 'backgroundMode' of undefined

i have installed plugin and try the code in example
put it inside try and catch
this is error appear cannot read property 'backgroundMode' of undefined

Just put your call inside the "ready" method eg:
$ionicPlatform.ready(function() {
  cordova.plugins.backgroundMode.enable();
})
this solved my problem! I hope it helps!!

thanks sir,
i use it but when close app from recent apps
notification not appear
it is appear only when app put in recent apps

@GamalSebaee If you have closed the app, than the app isnt running anymore. The plugin prevents the app (main thread) from going to sleep while in background.


koord-manager: refactor config validation by github.com/go-playground

Ⅰ. Describe what this PR does
see https://github.com/koordinator-sh/koordinator/issues/1232

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it
Ⅳ. 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

/lgtm


Incident log: Refactoring in 0.13.1 causes outage/breakage in libraries depending on ^0.13.0

Noting this for our collective learnings.
The 0.13.1 release (https://github.com/meltano/sdk/releases/tag/v0.13.1) introduced an "Under the Hood" update which turned out to be a breaking change.
Implementations built on 0.13.0 rightfully had a dependency on SQLConnector existing in a specific module, when it moved we broke existing implementations.

On our side, we should always try to make patch releases 'safe' so that security and other bug fixes get through.
We should bump at least the minor version if the developer needs to do work to adapt.
We didn't anticipate the breakage, so this was an "Under the Hood" change where it probably should been listed in the "Changes" category for purposes of determining the proper version bump method.

Breakage downstream logged here:

https://github.com/MeltanoLabs/target-snowflake/issues/6

No action. Closing.
Logged under incident label so we can analyze over time frequency and patterns.