Error: Unable validate connection VS Code and Prophet extension - visual-studio-code

I'm working on salesforce project. I'm trying to upload the code using Prophet tool. Unfortunately it is not working and throwing HTTP Authentication error like
Unable validate connection!
Please check your credentials (login, password, etc)
Error: Error: 401
But with the following credentials I can login in the browser. Only problem is not able to upload.
Note Same configuration it is working fine in other laptop. What could be the issue?
Here the configuration model for dw.json
{
"hostname": "xxxxx",
"username": "xxx",
"password": "xxxxx",
"version" : "xxxx"
}
Tools
Visual Studio code version 1.48.2
Prophet extention version 1.13.23
Error Info'

I had the same issue, and it was related to my BM access/role.
So, you have to recheck your BM access/role to your sandbox or ask the administrator about this.

Related

Write access to project denied when trying to deploy to Firebase hosting

I have been working on a project for a couple of months and when I tried to deploy updates today I was met with the following error: HTTP Error: 403, Write access to project was denied
This is not the first time I have called firebase deploy for this project but I haven't had any issues before.
The relevant section of the log generated with firebase deploy --debug:
[2023-02-14T09:05:36.343Z] >>> [apiv2][query] POST https://cloudfunctions.googleapis.com/v2/projects/galimbang-192cf/locations/us-central1/functions:generateUploadUrl [none]
[2023-02-14T09:05:37.947Z] <<< [apiv2][status] POST https://cloudfunctions.googleapis.com/v2/projects/galimbang-192cf/locations/us-central1/functions:generateUploadUrl 403
[2023-02-14T09:05:37.947Z] <<< [apiv2][body] POST https://cloudfunctions.googleapis.com/v2/projects/galimbang-192cf/locations/us-central1/functions:generateUploadUrl {"error":{"code":403,"message":"Write access to project 'galimbang-192cf' was denied","status":"PERMISSION_DENIED"}}
There was an issue deploying your functions. Verify that your project has a Google App Engine instance setup at https://console.cloud.google.com/appengine and try again. If this issue persists, please contact support.
⚠ functions: Upload Error: HTTP Error: 403, Write access to project 'galimbang-192cf' was denied
Error: HTTP Error: 403, Write access to project 'galimbang-192cf' was denied
[2023-02-14T09:05:37.950Z] Error Context: {
"body": {
"error": {
"code": 403,
"message": "Write access to project 'galimbang-192cf' was denied",
"status": "PERMISSION_DENIED"
}
},
"response": {
"statusCode": 403
}
}
I should also note that this project uses the Next.JS firebase integration.

Error - Failed to add 'SAP-Connectivity-Authentication' header for on-premise connectivity

I am connecting an On-premise S/4 HANA with SAP Cloud Platform trial account. I am using SAP Cloud SDK to fetch all Business Partners from S/4 HANA.
My Cloud Connector is set
My Destination at Sub-Account level is set and can ping to my on-premise system
My Service instances - XSUAA/Destination/Connectivity is set with the application
But I have the following error
Failed to add 'SAP-Connectivity-Authentication' header for on-premise connectivity: no JWT bearer found in the 'Authorization' header of the request. Continuing without a header. Connecting to on-premise systems may not be possible
The code which I am using is -
final List<BusinessPartner> businessPartners =
new DefaultBusinessPartnerService()
.getAllBusinessPartner()
.select(BusinessPartner.BUSINESS_PARTNER)
.execute(destination);
It seems AppRouter is the recommended for Authorization and Access and hence I tried implementing one- but my approuter shows - Not Found
Approuter App -Name - approuter-demo
Below is the xs-app.json
{
"routes": [
{
"source": "^/s4ext/(.*)",
"target": "/s4ext/$1",
"destination": "******"
}
]
}
The Manifest file is as below:
---
applications:
- name: approuter-demo
routes:
- route: approuter-demo-*****trial.cfapps.eu10.hana.ondemand.com
path: approuter
memory: 128M
env:
TENANT_HOST_PATTERN: 'approuter-demo-(.*).cfapps.eu10.hana.ondemand.com'
destinations: '[{"name":"******", "url" :"https://s4ext-***.cfapps.eu10.hana.ondemand.com", "forwardAuthToken": true }]'
services:
- xsuaa-demo
- connectivity-demo
- destination-demo
Kindly guide me. Thanks.
Your destination type might be wrong. The authorization header is set via the destination.
Try other types in sap cp -> connectivity.
Reading your question again I can identify two issues:
This error message in your log:
Failed to add 'SAP-Connectivity-Authentication' header for on-premise connectivity: no JWT bearer found in the 'Authorization' header of the request. Continuing without a header. Connecting to on-premise systems may not be possible
It may be that this error message is actually superfluous and hence indicating a problem which is actually none. In your case this header is possibly not necessary and the SAP Cloud SDK should not try to add it. But in any case, this will not influence the actual connection, so this error message is at most confusing, but not harmful in the sense of altering functionality.
Still, I am asking you to add the stack trace of this exception to your question to be very sure here.
Your app router shows "Not Found":
Here I am missing more information. When does what exactly show "Not Found"? Is it that your browser cannot find your app router, or can your app router not find the target URL of the application?

Could not connect to ibm WML

I am trying to do follow the ibm tutorial for object detection (https://cloud-annotations.github.io/training/object-detection/wml/) and i have a problem when I try to connect to the machine. Here are the credentials
{
"apikey": "kIlCEVrah4Yi2Jexs4f6ryxtXK_UmlRRYbEHFDZPj3-U",
"iam_apikey_description": "Auto generated apikey during resource-key operation for
Instance - crn:v1:bluemix:public:pm-20:eu-
gb:a/ba2f381a117d49a8898e3b9d244488cc:07c9e765-ab56-4303-a02d-ff487a394db0::",
"iam_apikey_name": "auto-generated-apikey-0cb1a7b2-7037-45d8-9221-73116bf42f7b",
"iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
"iam_serviceid_crn": "crn:v1:bluemix:public:iam-
identity::a/ba2f381a117d49a8898e3b9d244488cc::serviceid:ServiceId-
6f725bc1-f6d1-4a62-a7da-d8701494ad1e",
"instance_id": "07c9e765-ab56-4303-a02d-ff487a394dba",
"password": "0fda17b6-5b97-4cf3-ba69-ed355555b45a",
"url": "https://eu-gb.ml.cloud.ibm.com",
"username": "0cb1a7b2-7037-45d8-9221-73116bf42f7a"
}
and when i paste the username / password and instance_id i get the next error:
Status code: 404, body: {"trace":2894125269067430410,"errors":
[{"code":"not_found","message":"User with given credentials not found.","target":
{"type":"field","name":"token"},"moreInfo":null}]}
Any help would be awesome! Thank you!
If you are following the instructions in the link you provided, then you are have most likely taken the wrong instance_id or not specified the url in the connection.
Your service credentials are showing https://eu-gb.ml.cloud.ibm.com which will be running on the UK hosted servers, which I am guessing will not be the default.

EPROTO error on google action verification

I am working on an action on google using Actions SDK, however when i enabled the Actions; verification as described at:
https://developers.google.com/actions/reference/rest/verify-requests
I am getting the below error, this only comes when i am behind corporate proxy, can anyone suggest a solution for this?
{
"error": "ID token verification failed: Error: Failed to retrieve verification certificates: Error: write EPROTO 139904972138304:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:825:\n\n at OAuth2Client. (/opt/app/node_modules/actions-on-google/node_modules/google-auth-library/build/src/auth/oauth2client.js:580:31)\n at step (/opt/app/node_modules/actions-on-google/node_modules/google-auth-library/build/src/auth/oauth2client.js:57:23)\n at Object.throw (/opt/app/node_modules/actions-on-google/node_modules/google-auth-library/build/src/auth/oauth2client.js:38:53)\n at rejected (/opt/app/node_modules/actions-on-google/node_modules/google-auth-library/build/src/auth/oauth2client.js:30:65)\n at propagateAslWrapper (/opt/.npm-global/lib/node_modules/ca-apm-probe/node_modules/async-listener/index.js:502:23)\n at /opt/.npm-global/lib/node_modules/ca-apm-probe/node_modules/async-listener/glue.js:188:31\n at /opt/.npm-global/lib/node_modules/ca-apm-probe/node_modules/async-listener/index.js:539:70\n at /opt/.npm-global/lib/node_modules/ca-apm-probe/node_modules/async-listener/glue.js:188:31\n at :null:null\n"
}
I am using v2.5.0 of actions-on-google
So i was able to sort this issue, the underlying issue is with axios library being used by google auth library (v1.3.2)
here is the issue : https://github.com/axios/axios/issues/662
The workaround for me was to replace axios with request promise in google auth library and then publish it in our private npm registry, this solved the issue for now.

How to impersonate the user in Jira add-on to use Jira REST API on behalf of user

I'm looking for help of somebody who knows something about Jira add-ons.
I'm trying to implement Jira add-on with an ability to create issues on behalf of a user.
So, I completed all steps (as I think) leading me to my goal, but I faced a problem with impersonating. When I try to create an issue using Jira REST API, I receive the following error:
{
"error": "Add-on 'com.example.myapp' disallowed to impersonate the user because 'no valid active user exists'"
}
What was done:
Folowing the getting started tutorial I created the add-on descriptor:
{
"name": "Hello World",
"description": "Atlassian Connect app",
"key": "com.example.myapp",
"baseUrl": "https://url.ngrok.io",
"vendor": {
"name": "Example, Inc.",
"url": "http://example.com"
},
"authentication": {
"type": "jwt"
},
"scopes": [
"act_as_user",
"read",
"write",
],
"lifecycle": {
"installed": "/api/created",
},
"apiVersion": 1
}
I also implemented webhook to handle 'installed' callback from add-on like described here. So, when a user installs the add-on the webhook will receive the following object:
{
'key': 'com.example.myapp',
'clientKey': '<client key>',
'oauthClientId': '<OAuth client ID>',
'publicKey': '<public key>',
'sharedSecret': '<shared secret>',
'serverVersion': '100095',
'pluginsVersion': '1.250.0',
'baseUrl': 'https://<user's domain>.atlassian.net',
'productType': 'jira',
'description': 'Description',
'eventType': 'installed'
}
Using this data I generated JWT signed with the shared secret like described in the tutorial. So, my JWT payload includes the following claims:
{
'iss': 'urn:atlassian:connect:clientid:<OAuth client ID>',
'sub': 'urn:atlassian:connect:useraccountid:<client key>',
'tnt': 'https://<user's domain>.atlassian.net',
'iss': '<created at>',
'exp': '<created at + 1 minute>'
}
The next step I performed is access token generation using auth.atlassian.io/oauth2/token endpoint and the following parameters:
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=<my JWT>&scope=ACT_AS_USER READ WRITE
The result of all these actions is an access token witch I can use to perform REST API requests. But the error described above returned every time I try to create Jira issue performing POST [user's domain].atlassian.net/rest/api/2/issue/ with Authorization: Bearer [access_token] header.
What I've noticed is that account ID in installed callback object (clientKey) has 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' (uuid) format. But when I open my account in Jira (account in witch the add-on is installed) I see that the account ID in URL has 'YYYYYY:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' format. I prepended the subject in my JWT payload with YYYYYY part:
'sub': 'urn:atlassian:connect:useraccountid:'YYYYYY:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
and generated a new access token using this JWT. I've used new access token to create an issue and it was successfully created, the reporter of the issue is a user installed my add-on, just like I wished.
Finally, the question is: where can I find that YYYYYY part for my add-on? How to get it automatically? What I've missed following the tutorials? Any help will be appreciated.
Thank you!