Connecting to netlify on localhost with chrome and firefox - cassandra

I am trying to follow this tutorial.
At 55:39 Ania is able to connect to her localhost:8888/.netlify port to see the records she has read from the graphql playground.
I am trying to do the same but cannot connect to the page. I have tried in both chrome and firefox and in both cases, I get a connection refused error message.
My firewall has permitted access for both chrome and firefox, and I even tried disabling the firewall. The error still returns.
I tried it without my vpn turned on.
I have logged into netlify (I have nothing on github yet, so it's just a local deployment).
Is there something special I need to do to be able to run local host with netlify?
The full text of the error message is:
This site can’t be reachedlocalhost refused to connect. Try:
Checking the connection Checking the proxy and the firewall
ERR_CONNECTION_REFUSED Check your Internet connection Check any cables
and reboot any routers, modems or other network devices you may be
using. Allow Chrome to access the network in your firewall or
antivirus settings. If it is already listed as a program allowed to
access the network, try removing it from the list and adding it again.
If you use a proxy server… Check your proxy settings or contact your
network administrator to make sure that the proxy server is working.
If you don't believe you should be using a proxy server: Go to
Applications > System Preferences > Network > Advanced > Proxies and
deselect any proxies that have been selected.
In relation to #1, I am connected to the internet. I can run the local host on port 3000 and get the react app to load. it does not read anything from graphql. When I console log the datastax data from the react app, I get null as a result (where Ania gets the records created in the first hour of the tutorial).
In relation to #2, chrome and firefox are both added to my firewall
In relation to #3, no proxies are used - except the box to use FTP Mode PASV is checked. I tried unchecking it but it makes no difference.
I tried adding the local host 8888 url as a Bypass proxy settings for these Hosts & Domains in my system preferences - but it makes no difference.
My console shows:
◈ Netlify Dev ◈ ◈ Ignored general context env var: LANG (defined in
process) ◈ Injected .env file env var: ASTRA_GRAPHQL_ENDPOINT ◈
Injected .env file env var: ASTRA_DB_APPLICATION_TOKEN ◈ Loaded
function getGenres
http://localhost:8888/.netlify/functions/getGenres. ◈ Functions server
is listening on 55302 ◈ Starting Netlify Dev with Create React App $
react-scripts start (node:55384)
[DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning:
'onAfterSetupMiddleware' option is deprecated. Please use the
'setupMiddlewares' option. (Use node --trace-deprecation ... to show
where the warning was created) (node:55384)
[DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE]
DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated.
Please use the 'setupMiddlewares' option. Starting the development
server...
Compiled successfully!
You can now view nextflix-datastax-clone in the browser.
Local: http://localhost:3000 On Your Network:
http://10.0.0.1:3000
Note that the development build is not optimized. To create a
production build, use yarn build.
webpack compiled successfully
ONE CLUE: I have cleaned my mac, I have cleared my cache (don't know why this would have worked since localhost 3000 loads the react app, but without the datastax data). A little box appears on my mac that says 'verifying AID.dylib'. I understand dylib means a shared database (maybe this some sort of Datastax reference? The process has been running almost 48 hours and the progress bar is at about 10%. Whatever that program is, it hasn't been verified. I wonder if this is why I can't load localhost:8888/.netifly in the same way that Ania can?
ANOTHER CLUE: I just found this post: https://github.com/netlify/cli/issues/3617 which suggests that Netlify can't read functions in v17. I don't know if that's still current. I'm currently stuck in my efforts to check if this is the source of the problem because my brew commands wont run in my terminal. I think this may be because of some incompatibility with the macOS Monteray upgrade that I just installed. I will update this post if I find a way to configure my computer to be able to follow a basic beginner's tutorial.

Related

TestCafe - Error : Cannot establish one or more browser connections

Testcafe was able to connect browser and trigger test cases before. All of sudden, it stopped working. The main issue is test cafe is able to open browser but it's not connecting to browser and unable to hit URL. Browser is getting opened and being closed by itself after some time. Browser shows following message.
This site can’t be reached XXX.XXX.X.XX took too long to respond.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_TIMED_OUT
I didn't make any changes to softwares except changing my machine's login password. I changed the password in all required places like .npmrc etc.
Appreciate your help if anyone can provide solution.
Software versions:
node -v
v14.17.5
npm -v
7.20.5
testcafe -v
Using locally installed version of TestCafe.
1.15.2
command to trigger my tests : testcafe chrome test.js
Note: This issue happening for all browsers.
Error : ERROR Cannot establish one or more browser connections.
1 of 1 browser connections have not been established:
chrome
Hints:
Increase the value of the "browserInitTimeout" option if it is too low (currently: 2 minutes for local browsers and 6 minutes for remote browsers). This option determines how long TestCafe waits for browsers to be ready.
The error can also be caused by network issues or remote device failure. Make sure that your network connection is stable and you can reach the remote device.
Check permissions, owner and group in /tmp/Crashpad

Local server for Firebase Hosting causing frequent HTTP errors in React app

A developer working in Cebu City, Philippines is receiving frequent networking errors using a common configuration between Firebase and Create React App. We use firebase serve to start a local server for static assets in one terminal window. It starts up:
i hosting: Serving hosting files from: build
✔ hosting: Local server: http://localhost:5000
In a separate window, we run yarn start on a Create React App repo with a "proxy": "http://localhost:5000", entry in the package.json file. We frequently observe the following error:
Proxy error: Could not proxy request /__/firebase/8.1.2/firebase-app.js from localhost:3000 to http://localhost:5000. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (HPE_INVALID_CONSTANT)
with ERR_STREAM_WRITE_AFTER_END exceptions killing the Create React App process.
Note: occasionally the error does not occur.
I can't replicate this problem in the US. With all of the software configurations I can think of being equal, I suspect there might be networking issues in the way as the firebase server does its Reserved URL "magic".
Do you think I'm on the right track to suspect a networking problem? If so, can anyone assist with lower-level networking config that might alleviate the problem? (I'm thinking connection/timeout adjustments).
If you init your project from hosting URLs in public/index.html (like me), try to update URLs to the latest version (8.2.3), so all scripts would look like this:
<script src="/__/firebase/8.2.3/firebase-app.js"></script>
This is what worked for me. I hope so :)

Debug in WebStorm where the address is not localhost

I am trying to debug a project which needed a mapping in the hosts files from localhost to some other address like this
127.0.0.1 devproject.com
I can access the web app fine with a port number like this: devproject.com:3000 however this settings doesn't work when I try to debug in WebStorm?
Is there a way to tell WebStorm about this hosts file settings? Or I need to use a whole new settings? I am using node.js debug profile.
When debugging, you need using same URL as you normally use to access your application; so, to start debugging, you just need to specify http://devproject.com:3000 as URL in JavaScript Debug Run configuration. See https://confluence.jetbrains.com/display/WI/Starting+a+JavaScript+debug+session#StartingaJavaScriptdebugsession-Startingadebugsessionwhenusingadifferentwebserver

Accessing NodeJS server from remote machine on local network shows a blank page

I wanted to test my ReactJS + NodeJS website on another machine on my LAN, so I changed the server host ip from localhost to 0.0.0.0 as described in this answer. I noticed that although I could access the server from a remote machine, all I could see was the title and favicon (the rest was a blank page). I tried another approach of using the ngrok module as described here (which happens to be the answer to the same question as the previous link). I still got the same blank page.
The GET requests to the server are shown below (as shown by ngrok).
/landing is a page I was trying to access. Can someone explain whats happening?
PS: The server is running on a Mac and I'm trying to access the page on an Ubuntu machine. Also, I'm using this react-redux boilerplate. Webpack is also being used along with hot reloading.
Did you try changing port settings in firewall?
Go to firewall settings and allow the respective port for inbound

Why does ec2 instance not display my website? Using nodejs

I am running a m1.microinstance of aws, using CentOS. I downloaded Yeoman, git, npm and all of the dependencies are present. I am trying to run a MEAN stack on this server, so, mongo, express, angular and node. However, when I visit my public DNS, my site gives me this error: "Oops! Google Chrome could not connect to ec2-54-191-0-63.us-west-2.compute.amazonaws.com". On my admin control panel, I see my instance status, and it says it is running. I understand that if I had used apache, the page that displays is in the /var/www/html directory.. So, how do I get a directory similar to apaches, to display my html files, or whatever I would like the public to see? I have my security groups configured, for inbound, to listen to SSH port 22, for everyone, as well as HTTP port 80, for everyone.
Yeoman set up a nice app folder for me, but for some reason it does not display. I thought maybe I was missing a server.js, but that does not seem to have fixed anything when I added it. Any advice? Thanks!
Make sure you are matching the port all the way through - your browsers URL:PORT, the EC2 routing rules and your NodeJS settings. It looks like you might be listening to a port higher than 80 on the server.
As you mentioned in your comment, if you want to listen on a port below 1024 you will need to run the command as a privileged user.
I didn't run node as root on my AWS server, so it was not setting up my nicely built app that Yeoman made for me.
http://www.stackoverflow.com/questions/9164915 was where I realized my mistake. I am new to linux OS soo, I am learning. :)

Resources