Interpreting Error Code -102 Nightmare.js Scraping - node.js

I'm just getting started with Nightmare.js. I'm building off of their demo, which targeted duckduckgo.com and worked beautifully. I set my sights on imdb.com and got . . .
{ message: 'navigation error',
code: -102,
details: 'ERR_CONNECTION_REFUSED',
url: 'https://imdb.com/' }
My questions are 1) whether or not this came up because imdb.com knew it was being scraped or some other reason and 2) is it a Nightmare thing, a Node.js thing, or an Electron thing? I've tried googling about for the specific code and gotten very nonspecific answers. Any thoughts?

url: 'https://imdb.com/'
Make it just
url: 'http://imdb.com/'
If you try navigating to https://imdb.com in any other browser you get redirected to http://imdb.com. It seems they don't provide https: on their homepage. Changing the code to use the http version made it work for me.

Related

500(Internal Server Error): Forge deployed on Azure

I am new to this topic. I have deployed my app to Azure (following the tutorial from Autodesk). When I try to press to the login to BIM360 is return an error 500 (internal Server Error). I have changed the FORGE_CALLBACK_URL = "htttp://forgeSample1234.azurewebsite.net/api/forge/callback/oauth"
The code has no problem when in localhost.
Does anyone has the same problem?
Please note that when updating the callback URL, you actually have to change it in two places:
in your code (that's typically the FORGE_CALLBACK_URL)
in your Forge app page in https://forge.autodesk.com/myapps
And of course, the URL has to match exactly in both places.
Also, it looks like there might be a typo in your URL: you say htttp instead of http, and I'm also wondering if you shouldn't be using https?

Cypress can't access a website from its automated browser (used to work normally and other browsers access normally)

I was hoping one of you could help me out here. I ran out of ideas already.
I have a script with Cypress.io that basically access a website and clicks on a link for LOGIN. I have reduced the code to only access the LOGIN page directly, which was working perfectly for the past 1-2 months, but in the past week I ran the script and it's no longer working.
When it tries to access the URL https://sso.tce.sp.gov.br/cas-server/login it gives the error below.
The most weird thing is that I can access this URL manually from the other non-automated (EDGE, Chrome), but when I try to do it with the Cypress automated browser it doesn't work.
cy.visit() failed trying to load:
https://sso.tce.sp.gov.br/cas-server/login
We attempted to make an http request to this URL but the request
failed without a response.
We received this error at the network level:
Error: Parse Error: Duplicate Content-Length
Common situations why this would fail:
you don't have internet access
you forgot to run / boot your web server
your web server isn't accessible
you have weird network configuration settings on your computer
Apparently it's doesn't look like a proxy thing nor a code thing, do you guys have any idea of what it could be?
Code:
describe('Test', () => {
it('Access AUDESP Website', function () {
Cypress.config('chromeWebSecurity',false);
//cy.visit('https://www.tce.sp.gov.br/audesp')
//cy.get('.menu-superior-itens > [href="https://sso.tce.sp.gov.br/cas-server/login"]').click()
cy.visit('https://sso.tce.sp.gov.br/cas-server/login')
})
})
Any ideas would be very helpful!!
Thank you!
UPDATE:
Guys, I'm still with this error, but I have found out that the website is sending a duplicate header, but cypress is not able to process it. The browser, outside of Cypress, ignores it apparently... any ideas on how to fix it on Cypress?

Angular 8: Loading module from "url" was blocked because of a disallowed MIME type (“text/html”)

I have created the application in Angular 8 and Node 12.
After creating angular 8 build I am facing this problem while opening a new tab or page reload I have searched all around the internet did not found any solution.
Firefox console:
Google Chrome console:
TSCONFIG:
Other than that everything works.
Thanks in advance.
I was roaming around the internet I found the answer here:
Angular 2 Remove Hash (#) from the URL
So basically there was a # URL problem which I come across and by setting up RouterModule.forRoot(routes, { useHash: true }) I am able to successfully run the application.
Thank you guys for helping me

How to capture error 503 in chrome extensions?

I want to capture errors on POST requests inside of all tabs in Google Chrome.
I used the following block of code to observe the firing of onErrorOccurred in extensions:
chrome.webRequest.onErrorOccurred.addListener(
function(details) {
console.log("xxxxx");
console.log(details);
},
{urls: ["<all_urls>"]});
But unfortunately this code cannot observe the error code 503. For example I made the following page that returns error 503.
http://mjza.rf.gd/index.php
I also tested the following code related to WebNavegation class but it does not work also:
https://developer.chrome.com/extensions/examples/api/webNavigation/basic.zip
It would be great if someone can help me.
Thanks in advance.

API Error Code: 100 using passport-facebook in nodejitsu

I've been developing this app during the last few weeks, which uses a login system based on passport-facebook, and everything was working fine on my dev computer until I decided to test it on nodejitsu.
The error that im getting is:
API Error Code: 100 API Error
Description: Invalid parameter Error
Message: redirect_uri URL is not properly formatted
The redirect_uri is: https://www.facebook.com/dialog/oauth?display=popup&response_type=code&redirect_uri=http%3A%2F%2Ftookie_beta.jit.su%2Fauth%2Ffacebook%2Fcallback&scope=email%2Cuser_website&client_id=399936936740982&type=web_server
Which looks fine to me, so I'm kinda lost.
This was the configuration that i was using on my local machine:
And this is the configuration that I have now:
Does anyone knows what's going on, or what i'm missing here ? Thanks !
I believe that your Site URL is wrong. Shouldn't it point to http://your-subdomain.jit.su?
Hasn't nodejitsu dropped its service as it was bought out by GoDaddy :(
Link: https://blog.nodejitsu.com/nodejitsu-joins-godaddy/

Resources