Get-WinEvent output is truncated - get-winevent

I want to get the records from the Event file but it keeps truncating the messages.
Get-WinEvent -LogName 'Microsoft-AppV-Client/Admin' -MaxEvents 5
TimeCreated Id LevelDisplayName Message
10/21/2021 2:29:20 PM 19102 Error Getting server publishing data failed....
10/21/2021 2:29:20 PM 19203 Error HttpRequest sendRequest failed....
10/21/2021 2:29:05 PM 19102 Error Getting server publishing data failed....
10/21/2021 2:29:05 PM 19203 Error HttpRequest sendRequest failed....
10/21/2021 2:28:50 PM 19102 Error Getting server publishing data failed....

Related

Nodejs busboy is not a constructor

I just containerised a nodejs based serverside app and getting this error below any assistance will be greatly appreciated. i had this same app running on ec2 instance without any issue at all
0|src | GET /.env 404 1.499 ms - 43
10|src | 2022-03-23T18:05:11.118Z - error: \*\* Error: Status: 500 Message: Busboy is not a constructor
10|src | POST / 500 2.442 ms - 27
11|src | GET /ping 200 1.145 ms - 18
13|src | GET /ping 200 2.026 ms - 18
12|src | GET /ping 200 1.166 ms - 18
15|src | GET /ping 200 1.128 ms - 18
14|src | 2022-03-23T18:05:55.508Z - error: \*\* Error: Status: 500 Message: Busboy is not a constructor
14|src | POST /lessons?downloadLanguage=en&localize=false&allowMT=false 500 1.425 ms - 27
9|src | GET /ping 200 1.154 ms - 18
8|src | GET /ping 200 1.128 ms - 18
any time i want to upload a file i get this error
I changed the docker node image version from v10 to v14 and connect-busboy version from v0.0.2 to v1.0.0.0 and it take care of the busboy is not a constructor error for me

Lambda execution failed with status 200 due to customer function error

I'm creating a simple Lambda function to serve a POST in AWS Gateway:
import json
import boto3
from datetime import datetime
def lambda_handler(event,context):
wf = event['WF']
if wf == 'start1':
body = 'Suceeded'
return {
"isBase64Encoded": False,
'statusCode': 200,
'body': json.dumps(body),
'headers': {
'Content-Type': 'application/json'
}
}
else:
body = 'Failed'
return {
"isBase64Encoded": False,
'statusCode': 400,
'body': json.dumps(body),
'headers': {
'Content-Type': 'application/json'
}
}
If I send a POST with this body is successful:
{
"WF": "start1",
"Context": "OK"
}
Returns:
Test Event Name
test
Response
{
"isBase64Encoded": false,
"statusCode": 200,
"body": "\"Suceeded\"",
"headers": {
"Content-Type": "application/json"
}
}
Function Logs
START RequestId: 91663a9d-d8b6-4aad-b8b6-eb2f15ff0354 Version: $LATEST
END RequestId: 91663a9d-d8b6-4aad-b8b6-eb2f15ff0354
REPORT RequestId: 91663a9d-d8b6-4aad-b8b6-eb2f15ff0354 Duration: 1.74 ms Billed Duration: 2 ms Memory Size: 128 MB Max Memory Used: 66 MB Init Duration: 300.73 ms
Request ID
91663a9d-d8b6-4aad-b8b6-eb2f15ff0354
But if I run a test in the API Gateway service in AWS I get:
Fri Jun 04 13:45:22 UTC 2021 : Sending request to https://XXXXXXX
Fri Jun 04 13:45:22 UTC 2021 : Received response. Status: 200, Integration latency: 15 ms
Fri Jun 04 13:45:22 UTC 2021 : Endpoint response headers: {Date=Fri, 04 Jun 2021 13:45:22 GMT, Content-Type=application/json, Content-Length=159, Connection=keep-alive, x-amzn-RequestId=d479fdac-6737-42fa-96a3-9e991056b48d, X-Amz-Function-Error=Unhandled, x-amzn-Remapped-Content-Length=0, X-Amz-Executed-Version=$LATEST, X-Amzn-Trace-Id=root=1-60ba2e72-ff62f051febbd21d6cc9d114;sampled=0}
Fri Jun 04 13:45:22 UTC 2021 : Endpoint response body before transformations: {"errorMessage": "'WF'", "errorType": "KeyError", "stackTrace": [" File \"/var/task/lambda_function.py\", line 7, in lambda_handler\n wf = event['WF']\n"]}
Fri Jun 04 13:45:22 UTC 2021 : Lambda execution failed with status 200 due to customer function error: 'WF'. Lambda request id: d479fdac-6737-42fa-96a3-9e991056b48d
Fri Jun 04 13:45:22 UTC 2021 : Method completed with status: 502
Why line 7 is wrong?
Is there another way to parse the body of the POST?
The solution was found by disabling Lambda Proxy Integration in the POST - Integration Request.
It looks like your API Gateway invocation is not populating the event parameter of your Lambda function. When you create a test event your lambda function's page, you get to create your own test event. API Gateway will not use this test event, it will instead send an empty event (probably null).
I.e.
import json
import boto3
from datetime import datetime
def lambda_handler(event,context): # Event is null here
wf = event['WF'] # Attempting to read the attribute 'WF' of null results in an error
In my instance, I had received this error when invoking my Lambda function via API gateway, it was also completely fine when invoking directly the lambda function expecting a simple JSON body.
my expected payload:
{"Email": "foo3#foo.com"}
It turns out Lambda Proxy Integration in the POST in the configuration API gateway changes the payload structure before passing into Lambda, and I was getting the error missing Key attribute Email. I noticed that line Endpoint request body after transformations: in cloudwatch. I learned that it was changing the payload.
How I debug this:
Invoke Lambda using test events ensuring the both the error scenario and success scenarios are working.
Ensure there are no permission issues via API gateway by making sure that your API gateway can invoke the Lambda and have appropriate IAM roles/policies
Ensure your lambda has the API gateway as the trigger
I tried removing all the security token first via API gateway to verify I am able to invoke the API
I tried both HTTP methods POST And GET, seeing the same error (Email was missing) was the key to figuring this out as I was already passing the payload in the request body in the POST method.

How could I handle the Err of TLS certificate with fabric-sdk-node

I'm trying to build a web front end of a fabric-network, and after I completed the registerAdmin and registerUser, I got err when I was tring to run my js code.
root#oyu-virtual-machine:~/hyperledger-fabric/test/webapp# node get.js
Load privateKey and signedCert
Get History
Assigning transaction_id: 35e9ed932366df66448d789fbf5989e6ba31be555f96eaca3197475a1602749c
E0429 15:09:28.130483373 4413 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
returned from gethistory
Gethistory result count = 1
error from gethistory = Error: 14 UNAVAILABLE: failed to connect to all addresses
at Object.exports.createStatusError (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/common.js:91:15)
at Object.onReceiveStatus (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1209:28)
at InterceptingListener._callNext (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:618:8)
at callback (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:847:24) {
code: 14,
metadata: Metadata { _internal_repr: {}, flags: 0 },
details: 'failed to connect to all addresses'
}
Response is Error: 14 UNAVAILABLE: failed to connect to all addresses
In my opinion, the most important message is
E0429 15:09:28.130483373 4413 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
It's not generated by my code, but system generated it.
I do hope someone could help me. Thanks in advance.

Strange Config file error

I am working on an application which requires AWS (Amazon Web Services) push notification services.
I am running this on a node server, when I run the curl http request I get this error:
Registering user with deviceId: nodeserver
{ [Error: Missing credentials in config]
message: 'Missing credentials in config',
code: 'SigningError',
time: Tue Nov 17 2015 13:52:20 GMT+0000 (GMT),
originalError:
{ message: 'Could not load credentials from any providers',
code: 'CredentialsError',
time: Tue Nov 17 2015 13:52:20 GMT+0000 (GMT),
originalError:
{ message: 'Connection timed out after 1000ms',
code: 'TimeoutError',
time: Tue Nov 17 2015 13:52:20 GMT+0000 (GMT) } } }
Does anybody know what this error is or if anybody has had this type of error before and knows how to go about fixing it?

Reduce the retry time in CoreData - see below

This is what appears in the log, see the Retrying after delay: 60 seconds
2013-10-09 15:21:59.807 MyApp[4848:6507] -[PFUbiquitySafeSaveFile waitForFileToUpload:](299): CoreData: Ubiquity: <PFUbiquityPeerReceipt: 0x15e09de0>(0)
permanentLocation: <PFUbiquityLocation: 0x15e22100>: /var/mobile/Library/Mobile Documents/HHWT75NS6T~com~xyz~MyApp/CoreData/New Project retry 2/mobile~A3BF465A-15C7-46F2-8C68-AC8F49FD15AB/New Project retry 2/W8MckEJ0x2d~HZZIeUH2be6hs41TEOONzKIrCuLcuP4=/receipt.0.cdt
safeLocation: <PFUbiquityLocation: 0x15ec4660>: /var/mobile/Library/Mobile Documents/HHWT75NS6T~com~xyz~MyApp/CoreData/New Project retry 2/mobile~A3BF465A-15C7-46F2-8C68-AC8F49FD15AB/New Project retry 2/W8MckEJ0x2d~HZZIeUH2be6hs41TEOONzKIrCuLcuP4=/mobile~A3BF465A-15C7-46F2-8C68-AC8F49FD15AB.0.cdt
currentLocation: <PFUbiquityLocation: 0x15ec4660>: /var/mobile/Library/Mobile Documents/HHWT75NS6T~com~xyz~MyApp/CoreData/New Project retry 2/mobile~A3BF465A-15C7-46F2-8C68-AC8F49FD15AB/New Project retry 2/W8MckEJ0x2d~HZZIeUH2be6hs41TEOONzKIrCuLcuP4=/mobile~A3BF465A-15C7-46F2-8C68-AC8F49FD15AB.0.cdt
kv: (null)
Safe save failed for file, error: Error Domain=NSCocoaErrorDomain Code=260 "The operation couldn’t be completed. (Cocoa error 260 - Request for item properties on non-existent item.)" UserInfo=0x15eaedf0 {NSDescription=Request for item properties on non-existent item.}
2013-10-09 15:21:59.809 iProjectiPad[4848:6507] -[PFUbiquitySetupAssistant finishSetupWithRetry:](811): CoreData: Ubiquity: <PFUbiquitySetupAssistant: 0x15e4e520>: Retrying after delay: 60

Resources