Our team is trying to setup a repository to share all the API tests. We decided to host the repository ourself with Bitbucket Server, but end up with an error while using the Git Sync function in Insomnia. We followed the documentation to get the authentication token (HTTP access token) and tried different user/author names. Any suggestions on how we might fix this problem?
Error code while trying to Sync:
HttpError: HTTP Error: 404
at GitRemoteHTTP.discover (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/isomorphic-git/index.cjs:6665:13)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async _fetch (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/isomorphic-git/index.cjs:7315:22)
at async _clone (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/isomorphic-git/index.cjs:7692:42)
at async Object.clone (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/isomorphic-git/index.cjs:7815:12)
at async GP (file:///Applications/Insomnia.app/Contents/Resources/app.asar/index.c4312761.js:1886:6051)
at async gz.onSubmitEdits [as _onSubmitEdits] (file:///Applications/Insomnia.app/Contents/Resources/app.asar/index.c4312761.js:1895:11562)
Related
Tried configuring MS outlook adapter in Oracle Integration Cloud (OIC) Env.
The connection was successful. But when testing the complete implementation getting below error.
https://outlook.office.com/api/v2.0/me/sendmail returned a response status of 403 Forbidden
"error":{"code":"ErrorAccessDenied","message":"Access is denied. Check credentials and try again."
<genericRestFault><errorCode>403</errorCode><errorPath><![CDATA[POST https://outlook.office.com/api/v2.0/me/sendmail returned a response status of 403 Forbidden]]></errorPath><instance><![CDATA[{"error":{"code":"ErrorAccessDenied","message":"Access is denied. Check credentials and try again."}}]]></instance></genericRestFault>
:Application Error
I am successfully able to test the OIC Microsoft Outlook adapter to send email with attachment.When you configure the Adapter,please make sure that you have correctly set the followings.
Client Id:
Client Secret:
Scope: https://outlook.office.com/mail.send offline_access
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.
I am working with python + the requests library + github access to get a hook URL.
When I try to access a hook from my personal public git repo, I get the response smoothly:
import json
import requests
token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
response = requests.get("https://api.github.com/repos/josenrihernand/github-personal-repo/hooks", auth=("josenrihernand", token)).json()
print("RESPONSE: ", response) ---> IT WORKS (I get the hook url)
However, if I try with a enterprise / private github account, I get an HTTP 401 error message:
import json
import requests
token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
response = requests.get("https://MY_DOMAIN/repos/ENTERPRISE_USER/REPO_PATH/hooks", auth=("ENTERPRISE_USER", token)).json()
print("RESPONSE: ", response) ---> I got a 401 error message.
I am sure that the token is ok.
What could be the root cause of that error ?
Is the get address properly formed ?
thanks a lot!
Github entreprise base URL for v3 API is :
http(s)://hostname/api/v3/
check Rest v3 API doc
I guess in your case it would be :
https://your.domain/api/v3/repos/USER/REPO/hooks
I followed the documentation here: and here: Trying to integrate to a Personality Insights service via Android Java.
However, after the app runs, and using the correct username and password as mentioned in the guide... (the guide is not clear (2nd bullet point in "Before you begin") on which set of credentials to use - It says get the "service credentials" and credentials from the new service created - I tried with both and both fail with the same error below.)
Error:
12-11 01:49:56.201 29584-29632/? I/CredentialUtils: JNDI string lookups is not available. 12-11 01:49:56.269 29584-29632/? D/NetworkSecurityConfig: No Network Security Config specified, using platform default 12-11 01:49:56.723 29584-29632/? D/OkHttp: --> POST https://gateway.watsonplatform.net/personality-insights/api/v3/profile?version=2017-10-13 http/1.1 (1297-byte body) 12-11 01:49:56.803 29584-29632/? D/OkHttp: <-- 401 Not Authorized https://gateway.watsonplatform.net/personality-insights/api/v3/profile?version=2017-10-13 (78ms, unknown-length body) 12-11 01:49:56.863 29584-29632/? E/WatsonService: POST https://gateway.watsonplatform.net/personality-insights/api/v3/profile?version=2017-10-13, status: 401, error: Not Authorized 12-11 01:49:56.865 29584-29632/? E/ERROR: Unauthorized: Access is denied due to invalid credentials
com.ibm.watson.developer_cloud.service.exception.UnauthorizedException: Unauthorized: Access is denied due to invalid credentials at com.ibm.watson.developer_cloud.service.WatsonService.processServiceCall(WatsonService.java:492) at com.ibm.watson.developer_cloud.service.WatsonService$2.execute(WatsonService.java:254) at com.upen.personalityapp.MainActivity$RetrieveFeedTask.doInBackground(MainActivity.java:105) at com.upen.personalityapp.MainActivity$RetrieveFeedTask.doInBackground(MainActivity.java:87) at android.os.AsyncTask$2.call(AsyncTask.java:306) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:244) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) 12-11 01:49:56.866 29584-29584/?
This is the code I am using; I am trying to pass a "text" input to the service.
service = new PersonalityInsights("2017-10-13");
service.setUsernameAndPassword("{myUsername}", "{myPassword}");
Profile profile = service.getProfile(text).execute();
System.out.println(profile);
return profile.toString();
I am using the com.ibm.watson.developer_cloud:personality-insights:3.8.0 dependency.
I tried connecting to the URL in the error (https://gateway.watsonplatform.net/personality-insights/api/v3/profile?version=2017-10-13 ) via a browser. It prompts for a username/password combo. I entered my details from my IBM Cloud Lite service but it throws the HTTP Error 405. Is this how it's supposed to work on the browser?
For someone in the future;
Instead of service.setUsernameAndPassword(username, password);, I tried service.setUsernameAndPassword("username", "password"); and it worked.
I'm using Microsoft.AspNet.Membership.OpenAuth when I create a new asp.net webform .net 4.0 and I config AuthConfig.cs:
OpenAuth.AuthenticationClients.AddFacebook(
appId: "my appId",
appSecret: "my appSecret");
In Facebook app config:
Website with Facebook Login: http://www.tindep.com
But when I login with facebook it's error:
Server Error in '/' Application.
The remote server returned an error: (400) Bad Request.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The remote server returned an error: (400) Bad Request.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The remote server returned an error: (400) Bad Request.]
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +283
System.Net.WebClient.DownloadString(Uri address) +100
DotNetOpenAuth.AspNet.Clients.FacebookClient.QueryAccessToken(Uri returnUrl, String authorizationCode) +235
DotNetOpenAuth.AspNet.Clients.OAuth2Client.VerifyAuthentication(HttpContextBase context, Uri returnPageUrl) +142
DotNetOpenAuth.AspNet.OpenAuthSecurityManager.VerifyAuthentication(String returnUrl) +239
Microsoft.AspNet.Membership.OpenAuth.OpenAuthManager.VerifyAuthentication(HttpContextBase context, String returnUrl) +116
Microsoft.AspNet.Membership.OpenAuth.OpenAuth.VerifyAuthentication(String returnUrl) +82
EVNSoft.Website.Account.RegisterExternalLogin.ProcessProviderResult() +205
EVNSoft.Website.Account.RegisterExternalLogin.Page_Load() +24
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +9808229
System.Web.UI.Control.OnLoad(EventArgs e) +92
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18055
Although Google, Twitter, msdn login successful (Check tindep.com/Account/Login.aspx)
It's only error at hosting (tindep.com/Account/Login.aspx). localhost:57846/Account/Login.aspx login facebook success.
Please, help me find cause.
Thanks alot of!
There was a defect open related to this:
https://github.com/DotNetOpenAuth/DotNetOpenAuth/issues/203
but that library is apparently no longer being maintained:
https://github.com/DotNetOpenAuth/DotNetOpenAuth/issues/317#issuecomment-29580565
... although it is still referenced in many Microsoft documents. Investigating that related to another defect.
See also: facebook login using oauth fails on live server