Meteor Google OAuth Error: "Failed to complete OAuth handshake with Google" Error 401 Unauthorized - meteor

I've been trying to set up Google OAuth Login on my Meteor Web App and I've been getting this error every time I try to log in. I've verified the domain on the search console and added the correct redirect URI's and Javascript origins. The Google login works up until this point. Sorry if I haven't given enough information but is there any other reason that could be causing this error?
Btw I also tried to set the ROOT_URL like this: ROOT_URL="https://domainnamehere.com" meteor deploy when I deploy to galaxy hosting but when I try typing Meteor.absoluteUrl in the browser console, I get this error:
"Must pass options.rootUrl or set ROOT_URL in the server environment...
This is the main error that I've been getting though:
2021-10-04 18:05:17-04:00{"line":"405","file":"oauth_server.js","message":"Error in OAuth Server: Failed to complete OAuth handshake with Google. failed [401] { \"error\": \"invalid_client\", \"error_description\": \"Unauthorized\" }","time":{"$date":1633385117461},"level":"warn"}8136p
2021-10-04 18:05:17-04:00Exception while invoking method 'login' Error: Failed to complete OAuth handshake with Google. failed [401] { "error": "invalid_client", "error_description": "Unauthorized" }8136p
2021-10-04 18:05:17-04:00 at getTokens (packages/google-oauth/google_server.js:105:7)8136p
2021-10-04 18:05:17-04:00 at Object.getServiceData [as handleOauthRequest] (packages/google-oauth/google_server.js:80:58)8136p
2021-10-04 18:05:17-04:00 at OAuth._requestHandlers.<computed> (packages/oauth2/oauth2_server.js:10:33)8136p
2021-10-04 18:05:17-04:00 at middleware (packages/oauth/oauth_server.js:170:5)8136p
2021-10-04 18:05:17-04:00 at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:408136p
2021-10-04 18:05:24-04:00{"line":"405","file":"oauth_server.js","message":"Error in OAuth Server: Failed to complete OAuth handshake with Google. failed [401] { \"error\": \"invalid_client\", \"error_description\": \"Unauthorized\" }","time":{"$date":1633385124123},"level":"warn"}8136p
2021-10-04 18:05:24-04:00Exception while invoking method 'login' Error: Failed to complete OAuth handshake with Google. failed [401] { "error": "invalid_client", "error_description": "Unauthorized" }

Related

I cannot publish a sample app via Ingress.: failed to call webhook

※I am a beginner, so if you have any information you need, please comment.
Based on the yaml file, I am trying to publish a sample app that has already been launched in Pod via Ingress.
$kubectl apply -f ./overlays/stg/bookinfo-ingress.yaml
■Errormessage
Error from server (InternalError): error when creating "./overlays/stg/bookinfo-ingress.yaml": Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": failed to call webhook: Post "https://ingress-nginx-controller-admission.ingress-nginx.svc:443/networking/v1/ingresses?timeout=10s": x509: certificate signed by unknown authority

Failed when trying out in publisher portal

Environment details:
wso2am-4.0.0
new keystore with self-signed certificate "my.domain.somewhere.com"
I follow this doc to create newstore.
When test from tryout page in publisher portal , fails response:
{
"code": "900901",
"message": "Invalid Credentials",
"description": "Invalid Credentials. Make sure you have provided the correct security credentials"
}
in devportal , tryout is ok.
the error in console :
TID: [-1] [] [2022-03-16 15:30:11,365] WARN {org.apache.synapse.transport.passthru.SourceHandler} - I/O error: Received fatal alert: certificate_unknown
TID: [-1] [] [2022-03-16 15:31:03,204] WARN {org.apache.synapse.transport.passthru.SourceHandler} - I/O error: Received fatal alert: certificate_unknown
TID: [-1234] [] [2022-03-16 15:31:03,333] ERROR {org.wso2.carbon.apimgt.gateway.handlers.security.authenticator.InternalAPIKeyAuthenticator} - Invalid Internal Key. Signature verification failed.
TID: [-1234] [] [2022-03-16 15:31:03,333] WARN {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler} - API authentication failure due to Invalid Credentials
For the Publisher tryout key validation, WSO2 uses the gateway_certificate_alias in the client-truststore. So you need to update that also with the public key of your new cert.

DTS, ODTC are not allowed for Package and "code": 404, "message": "Not Found. Could not get object", "status": "GET_OBJECT" }

When I was debugging this error messaging coming on my console. Network is connected, Location is enabled. Why is that? Is that issue on Firebase Storage?
D/libGLESv2(11719): STS_GLApi : DTS, ODTC are not allowed for Package : com.demo.dev
W/zygote64(11719): Skipping duplicate class check due to unrecognized classloader
I/DynamiteModule(11719): Considering local module com.google.android.gms.flags:3 and remote module com.google.android.gms.flags:3
I/DynamiteModule(11719): Selected local version of com.google.android.gms.flags
W/DynamiteModule(11719): Local module descriptor class for providerinstaller not found.
D/ConnectivityManager(11719): requestNetwork; CallingUid : 10868, CallingPid : 11719
I/DynamiteModule(11719): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(11719): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/zygote64(11719): find the special shared library, skip check
I/zygote64(11719): find the special shared library, skip check
I/zygote64(11719): Failed to open app image /data/app/com.google.android.gms-hB2cPXA9qy2DYi6Ad6koKA==/oat/arm64/base.art Failed to open '/data/app/com.google.android.gms-hB2cPXA9qy2DYi6Ad6koKA==/oat/arm64/base.art'
W/BiChannelGoogleApi(11719): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzak#d4dec1
V/NativeCrypto(11719): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 286 native methods...
D/NetworkSecurityConfig(11719): No Network Security Config specified, using platform default
I/ProviderInstaller(11719): Installed default security provider GmsCore_OpenSSL
D/ConnectivityManager(11719): requestNetwork; CallingUid : 10868, CallingPid : 11719
W/BiChannelGoogleApi(11719): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzak#d4dec1
D/FirebaseAuth(11719): Notifying id token listeners about user ( 9zD91GkB5aX8jd4m428nVwOg8yB3 ).
W/Firestore(11719): (21.3.0) [FirestoreCallCredentials]: Failed to get token: com.google.firebase.firestore.FirebaseFirestoreException: getToken aborted due to token change.
I/zygote64(11719): Do full code cache collection, code=120KB, data=84KB
I/zygote64(11719): After code cache collection, code=107KB, data=62KB
I/zygote64(11719): Do partial code cache collection, code=124KB, data=73KB
I/zygote64(11719): After code cache collection, code=124KB, data=73KB
I/zygote64(11719): Increasing code cache capacity to 512KB
D/ViewRootImpl#24391fb[MainActivity](11719): Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 495703769088} changed=false
I/System.out(11719): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(11719): (HTTPLog)-Static: isSBSettingEnabled false
E/StorageException(11719): StorageException has occurred.
E/StorageException(11719): Object does not exist at location.
E/StorageException(11719): Code: -13010 HttpResult: 404
E/StorageException(11719): { "error": { "code": 404, "message": "Not Found. Could not get object", "status": "GET_OBJECT" }}
E/StorageException(11719): java.io.IOException: { "error": { "code": 404, "message": "Not Found. Could not get object", "status": "GET_OBJECT" }}
E/StorageException(11719): at com.google.firebase.storage.network.NetworkRequest.parseResponse(com.google.firebase:firebase-storage##17.0.0:455)
E/StorageException(11719): at com.google.firebase.storage.network.NetworkRequest.parseErrorResponse(com.google.firebase:firebase-storage##17.0.0:435)
E/StorageException(11719): at com.google.firebase.storage.network.NetworkRequest.processResponseStream(com.google.firebase:firebase-storage##17.0.0:426)
E/StorageException(11719): at com.google.firebase.storage.network.NetworkRequest.performRequest(com.google.firebase:firebase-storage##17.0.0:280)
E/StorageException(11719): at com.google.firebase.storage.network.NetworkRequest.performRequest(com.google.firebase:firebase-storage##17.0.0:294)
E/StorageException(11719): at com.google.firebase.storage.internal.ExponentialBackoffSender.sendWithExponentialBackoff(com.google.firebase:firebase-storage##17.0.0:70)
E/StorageException(11719): at com.google.firebase.storage.internal.ExponentialBackoffSender.sendWithExponentialBackoff(com.google.firebase:firebase-storage##17.0.0:62)
E/StorageException(11719): at com.google.firebase.storage.GetDownloadUrlTask.run(com.google.firebase:firebase-storage##17.0.0:74)
E/StorageException(11719): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
E/StorageException(11719): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
E/StorageException(11719): at java.lang.Thread.run(Thread.java:764)
The object you are trying to read from Firebase Storage Bucket does not exist at the path/location. Hence the error
Object does not exist at location.
Also The HTTP Error Code 404.
So you can check the path in your code and check the object in firebase storage console ( refresh page every time you perform a upload or delete operation)
I had the same issue, and I was checking the documentation and my problem was the MinSDK Version:
I go to android/app/build.gradle and there I change the minSdkVersion: 16 to minSdkVersion: 21, because firebase need that at least MinSDK Version 19.

SSL error when creating vue.js app using api platform client generator

I tried to create client app of my API created using API Platform. I follow this guide https://api-platform.com/docs/client-generator/vuejs/.
I use Laravel Homestead for the VM when developing it.
I've added myapp .crt file to Keychan Access.
Problem was, when I try to execute
generate-api-platform-client --generator vue https://myapp-api.local/api src/
It return error message like this:
{
api: Api { entrypoint: 'https://myapp-api.local/api', resources: [] },
error: FetchError: request to https://myapp-api.local/api failed, reason: unable to verify the first certificate
at ClientRequest.<anonymous> (/Users/permana.jayanta/.config/yarn/global/node_modules/node-fetch/index.js:133:11)
at ClientRequest.emit (events.js:209:13)
at TLSSocket.socketErrorListener (_http_client.js:406:9)
at TLSSocket.emit (events.js:209:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
name: 'FetchError',
message: 'request to https://myapp-api.local/api failed, reason: unable to verify the first certificate',
type: 'system',
errno: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
},
response: undefined,
status: undefined
}
I'm thinking this is related with SSL certificate. That node doesn't recognise the certificate. How to make node.js recognise the custom SSL certificate generated by Homestead?
it failed to verify https signature.
To disable it, type in shell
export NODE_TLS_REJECT_UNAUTHORIZED=0

keyTemplateRetriever Failed retrieving throttling data WSO2

I was setting up prepackaged WSO2 identity server with WSO2 API Manager.Also was configuring the domain urls.
Now while starting WSO2 API Manager , below error is printed in the logs
[2017-05-12 05:37:35,237] INFO - CarbonEventManagementService Starting polling event receivers
[2017-05-12 05:37:55,848] WARN - KeyTemplateRetriever Failed retrieving throttling data from remote endpoint: Received fatal alert: handshake_failure. Retrying after 15 seconds...
[2017-05-12 05:37:55,850] WARN - BlockingConditionRetriever Failed retrieving Blocking Conditions from remote endpoint: Received fatal alert: handshake_failure. Retrying after 15 seconds...
[2017-05-12 05:38:01,861] WARN - FileSystemPreferences Could not lock System prefs. Unix error code 32693.
[2017-05-12 05:38:01,861] WARN - FileSystemPreferences Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
[2017-05-12 05:38:10,877] WARN - KeyTemplateRetriever Failed retrieving throttling data from remote endpoint: Received fatal alert: handshake_failure. Retrying after 15 seconds...
[2017-05-12 05:38:10,878] WARN - BlockingConditionRetriever Failed retrieving Blocking Conditions from remote endpoint: Received fatal alert: handshake_failure. Retrying after 15 seconds...
[2017-05-12 05:38:25,940] WARN - BlockingConditionRetriever Failed retrieving Blocking Conditions from remote endpoint: Received fatal alert: handshake_failure. Retrying after 15 seconds...
[2017-05-12 05:38:25,940] WARN - KeyTemplateRetriever Failed retrieving throttling data from remote endpoint: Received fatal alert: handshake_failure. Retrying after 15 seconds...
Can anyone tell me what could have i done wrong..May be i did some configuration wrong.Where should i check to find the problem?
Can it be because of SSL issues? I have not yet set up SSL.
Yes, this seems to be from SSL handshake failure specially since you have used hostnames. The default certificates that come with WSO2 Servers are created for localhost.
You can try creating self-signed certificates for APIM and IS hostnames. Then export the public certs of APIM to trust-store.jks of IS and vice versa. This should resolve the SSL handshake failure.
So what happens is when APIM boots up it makes an HTTP call to a web app in Key Manager (throttle data at KM_URL/throttle/data/v1/keyTemplates). APIM decides the URL of the KM from the URL configured in the api-manager.xml
You are seeing the error,
WARN - KeyTemplateRetriever Failed retrieving throttling data from remote endpoint: Received fatal alert: handshake_failure. Retrying after 15 seconds...
because the APIM cannot make this HTTP call retrieve throttle data from KM.

Resources