Snaplogic REST POST Snap: Failing with SSL error - snaplogic

I am trying to post a simple json to our backend api through REST POST snap. Everything was working. And then we changed the url to a new url and I updated the url in the snap.
But now request is simply not reaching our new api server.
In fact, the snaplogic pipeline also completes successfully, with all snaps turning green. Only when I click on the properties of pipeline, I get to know that REST POST snap has failed, with attached screenshot error.
Please note that we are able to reach the new api server via postman or any other rest client. Nothing has changed at all except for the url.
Can you please help me understand, what exactly is going wrong and where? How to debug this?

Just for everyone's reference, I was able to find out the root cause.
Reason was that the api url was not accessible to snaplogic pod running in our enterprise because of Zscaler firewall.
The confusing part here was the error message returned which says "SSL issue, connection was reset". So if you see issue saying "Connection was reset", assume that snaplogic is unable to access the url as the first problem. Only after making sure, it is not the case, go and look for what exactly the error says.

Related

Error when setting up webhook with Ngrok/WhatsApp

I am trying to setup a WhatsApp bot using voiceflow, based on the tutorial found here. I've set this up before and everything has worked fine, but now I can't seem to configure the webhook.
The steps I'm performing are as follows:
Clone the repo here
Checked ngrok is installed (version 3.0.7), and its location (/usr/local/bin/ngrok)
Created a .env file at the root with the VERIFY_TOKEN, PORT, and WHATSAPP_TOKEN
Started the app from root with npm start
Started ngrok with ngrok http 8000 (the same port as specified in my .env)
Checked the resulting address works in the browser
According to the documentation, I then configure the webhook by adding "/webhook" to the end of the URL, and adding the same VERIFY_TOKEN as specified in my .env file. This, however, gives me the following error:
The callback URL or verify token couldn't be validated.
Please verify the provided information or try again later.
I've had a look around at similar questions here, but could not find what was wrong. I have also spoken to others who encountered similar issues over the last few weeks. This process was working up until recently (Nov 2022).
The error msg: The callback URL or verify token couldn't be validated. Please verify the provided information or try again later. usually means you are not returning a 200 response to the webhook origin. I would make sure your code is returning a 200 to whatsapp.
As an alternative, try to set the webhook on glitch as explained here:
https://developers.facebook.com/docs/whatsapp/sample-app-endpoints#cloud-api-sample-app-endpoint
so that you can check if your meta account is valid.
From what I have found it seems that feature is now behind a paywall. It worked fine a few months ago on the free tier of ngrok. So you will need to upgrade your ngrok subscription for WhatsApp to start validating. You can read about it here. Try using Cloudflare tunnel.

Not able to verify callback on Gupshup WhatsApp APIs

I am following this guide to build NodejS bot using Gupshup whatsapp https://www.gupshup.io/developer/docs/bot-platform/guide/gupshup-bot-library-for-node
I am running the code and getting the ngrok URL:
But when following steps are given, I get an error as below:
Not sure what is wrong here. Please let me know how can I solve this issue?
Sometimes ngrok service can be not reachable (for any reason).
First - make sure you can open ngrok link in the browser or by curl and make sure it reaches your server api.
Also if your backend check incoming requests for specific app key in header, you should also add it to url params, due to you have no way to manage GupShup api caller.
for the first time setting callback you need to return a 200 status.
res.status(200).send('ok');
Use this as first line for first time for setting callback and after call back is set you can comment this out. And save and relauch your code (make sure address of your hosted code is same don't restart ngrok :P) is same

Calling APIM Manager API failing

I am trying to register an event hub logger with an APIM instance and I am getting an error, like the URL does not exist at all (if i try in a browser, the url resolves fine).
I used the same format of message and call for an APIM instance in another environment and it worked fine.
Any Ideas?
Looks like you are testing in postman as seen in the above image. Also through the browser you mentioned it works fine.
Can you do the following settings on your postman to resolve the issue
Go to postman settings.
Under General tab disable SSL Certification verification to off state.
Let me know if this helps!! Cheers!
I created a new tab to query it and copy and pasted what I had from the other. It then went through fine. So the issue was postman in the end with regards to the tab

Azure SignalR: HubException method does not exist

I am finding we receive this error:
Failed to invoke 'CreateChatRequest' due to an error on the server. HubException: Method does not exist.
at _this.callbacks.<computed> (chat.min.js:2060)
at HubConnection.processIncomingData (chat.min.js:2154)
at WebSocketTransport.HubConnection.connection.onreceive (chat.min.js:1881)
at WebSocket.webSocket.onmessage (chat.min.js:3922)
The method does exist. The code does work, then after a while of testing, it returns this and won't stop.
What seems to temporarily fix the issue is restarting the Azure SigR service, but it comes back. This issue does not occur when targeting local SigR during development; it only happens against Azure SigR.
According to documentation, this seems to be a catchall error when something errors up on the server but, no exceptions are being logged. I've turned on detailed errors, but that didn't change the error coming back from the server. I've also tried catching the exception and sending back a HubException to see what is going on, but that didn't change the error message either.
TIA for any help.
So the answer, for me, was that i'd checked in (to source control) my azure service's connection string, so other devs were also using this and pointing their versions of the API service at that azure service. So when i ran my code sometimes azure would hit my API service with the new method in and it would work, sometimes it would hit someone else's API service and so fail because their code didn't have the new method in.

azure 502 bad gateway

has anyone seen this before so I am getting a 502 bad gateway error on my app, the issue I have is that the detailed error information I am getting says my requested url is https://SOX:80/api however my site is configured to use https://sox.domain.com and the site largely works pulling the various JS files required
my app service name is SOX in the azure dashboard so I assume that is where it is picking up SOX from but I have no idea why it is using this.
So overall the issue had me perplexed... however with more testing I soon figured out what was going on.
my backend is Dotnet core Azure throwing the 502 bad gateway was its way of handling exceptions ultimately the problem was code based.
I am mentioning this purely so that it will help others
my first issue was based on cert handling it seems dotnet runs in a container that is specified by your app name as i mentioned above https://SOX:80
the below was causing my issues
sslPolicyErrors = X509StoreStoreHelper.ValidateSSLPolicy(cert.Thumbprint, cert);
after commenting this out for testing my problem went away(we are putting in a proper fix )
my second issue came from using an unsupported view in Azure SQL master.sys.master_files which again just threw a 502 bad gateway error referencing https://SOX:80
please note I have used https://SOX:80 as a reference to mask the real site.
hope this helps the next person.
Based on your description, I have checked your site (https://sox.azurewebsites.net/) and found that it contains three static files (index.html,generic.html,elements.html). I viewed your website in Chrome incognito window as follows:
I did not find any requests against https://SOX:80/api in your html page or JavaScript files. Please try to access your website in a new incognito window to isolate the cache issue or just press CTRL + F5 to refresh your current page to narrow this issue. Moreover, you need to check whether you have configured URL Rewrite. If you still could not solve this issue, you need to update your question with the details for us to reproduce this issue.

Resources