Deploying new code doesn't work on Heroku - node.js

I've updated my backend code and deployed but something weird happening. It only works in some cases and it looks like not updated.
The updated API works well with Postman and with my local frontend code.
BUT it looks like not updated with the live frontend site.
I think there's a delay to update heroku in all locations.
How to resolve this issue?
I see this error.

Like you said, there is a delay on Heroku, it may be helpful for you to include information like how long you've been waiting. If you've waited longer than five minutes, check your logs.

Related

Scraping AWS with Puppeteer runs locally but fails on Heroku

I know it sounds a lot like other issues here in Stackoverflow, bear with me, it's not (not that I could tell)
I have a scraping app (using Puppeteer) that I use to scrape an Amazon public page.
It works great, I've debugged it by setting the headless: false and I see it works, and it gives me back the expected result.
The same app fails on Heroku, but the problem is not with launching or using Puppeteer (I have several indications), but probably because I'm being identified as a robot.
The error returned is:
waiting for selector `#link_continue input` failed: timeout 30000ms exceeded
Important to say that the error is a generic Puppeteer error that indicates that the selector I'm waiting for just doesn't appear on-page.
I know it should as it's a selector on the first page I navigate to, and it works locally (as mentioned before) - the selector always exists if the page loads.
I had the exactly same error when I've tried to run the scraping on my local machine before setting a User-Agent header. But at that time I could use the headless:false so I saw in my eyes that I'm being rejected due to illegal operations on their page (robots-like operations) so I was redirected to an error page that didn't contain this selector on it.
For this reason, I suspect it recognizes me as a robot, but I don't know how to debug it, it drives me crazy.
Now, if you'd like to reproduce the problem:
You need to wait for the mentioned selector on this site:
https://sellercentral.amazon.com/hz/fba/profitabilitycalculator/index
and then deploy it to Heroku and try to run it maybe 2-3 times
** Two questions: **
How can I proceed from here, I'm 99.9% sure it's the same issue I had previously, but I can't verify... any suggestions?
Given that this is actually the problem, can anyone suggest an easy-to-use/deploy hosting that also allow easy VPN configuration? I think Heroku doesn't give you to do that unless you have an enterprise account
Thanks
I would like to point out that Amazon is very good at blocking IPs. It is very likely that they already blacklisted IPs of cloud services like Heroku, Azure, etc... Previously I have observed services like Cloudflare, Akamai etc... blacklisting these known IPs.
In this scenario Rotating proxies could help you to avoid getting blocked.

Deployed angular project 'GET' request not working

I have an built angular project that I'm trying to run. I have copied the folder that I got from 'ng build' and put it in the folder where I have my back end code (used express). I'm running it on my laptop at port 3000.
While all the post requests in my application work fine, none of the GET requests seem to work.
Here is the exact error I'm getting.
If more information is needed to find out what I'm doing wrong, please ask.
Edit 1:
This is what I'm getting in the network tab. The response says html. But when I was working before deployment all my responses were coming as intended.
After looking into the images that you mentioned here, it look like that is has a http failure duing parsing in header:
Take a look here in order to resolve the same:
https://github.com/angular/angular/issues/18396
Thanks

Why does POST work on local Firebase server, but not on the deployed server?

I thought I had trouble with uploading files with to Google Cloud Storage (GCS), but it looks like there might be something completely different that is wrong. (I am not going to post any code here at the moment because I do not know if it is relevant. I will add code if we find something that could help.)
The situation is this:
I am POSTing (with fetch, using FormData) to a Firebase server.
The server decodes the post with Formidable.
There are (currently) no <input type="file"...> in the form, but this makes no difference.
This works on the local Firebase server, but not on the deployed server.
The deployed server times out.
If I instead of POST use GET the deployed server does not time out.
I have no idea what could be going on here. Ideas?

Parse-server app not working gcloud

I have server based backend deployed on app engine and it's working(free trial), but it have too much resources. I want to deploy an updated version of it with more fine tuned app.yaml and some minor updates. The problem is: new version is not working. It have some redirect code and it works, when i directly type:
https://myapp/parse
it shows:
{"error":"unauthorized"}
it's all good.
But when i try to do login, or other CRUD it just writing logs and doesn't do anything.
Because of that all i can do is return traffic to old version, which is working just fine, and beg for help.
May be google did some updates in last month and i have to redo something in my app?
UPD
Backend always returns 307 redirect when i do authorized request, old(deployed in november 16) version works great.
It is not 100% clear for me the issue. If it is possible to show us the whole output.
But apparently, it is the HTTPS in your URL. Try it with HTTP. It is the most common scenario for the unauthorized error.

Heroku response for API times out when requested from a Blackberry App - but not from cURL

I am working on an RESTful API in Node.js as a contractor, which is currently being used by a couple of blackberry apps written by other contractors. The stack is very common: Node, Express and Mongoose, running on heroku.
Consider the following API call:
curl "https://my-app.herokuapp.com/v2/rest/documents/?view=tree&annotate=ratings,accessible"
When a Blackberry app written in Java makes this call, it works fine every time.
Now consider this one:
curl "https://my-app.herokuapp.com/v2/rest/documents/?view=tree&annotate=ratings%2Caccessible%2CcontentSize"
When an Adobe Air Blackberry app makes this call, it often gets an HTTP 503 from Heroku with the Heroku Error code H12, which means that the request timed out. Although, on the BB app it does display "501 Error" when this happens. The logs show no 501s, only a 503.
However, if I make the same call to the server using curl, the response is successful, and for a while afterwards it is successful on the same BB app which previously had trouble with it, too. Almost as if the response succeeded, was cached on Heroku's side and then stayed cached for a while (this is speculation).
The main difference is the inclusion of contentSize in the annotate query-string parameter. But clearly, it isn't slowing it down too much since it seems to work fine when called through curl.
Sadly, I do not have access to the source code of either of the BB apps, and the developers are generally quite slow to respond since it is not their only project.
So I was hoping that somebody on SO might have some experience with this kind of a problem and maybe point me in the right direction.
Thanks!
Is the app in question scaled enough to prevent idling? I ask in particular as the "curl-ing then allows BB to work for a while". Perhaps the timeouts are occurring when BB app is trying to access the idled service? Not sure off the top of my head outside of that, but might be a good place to start looking at least.

Resources