Webstorm localhost from mobile - mobile

I can't access my Webstrom localhost on port 63342 from mobile.
I opened the port in Windows firewall and ESET (but port online checkers say me that the port still close).
I checked option "Can accept external connections" in Webstorm (but it caused message that Built-in HTTP server on that port disabled).
But when I check 192.168.0.48:63342 in mobile chrome - it still not available.
Please help.

I'd suggest using a different port (8080, 8090) if you need to access the server from another host. External connections to 63342 are not supported for security reasons.
Here are instruction for connecting to WebStorm internal web server from a different host:
- on a remote host, make sure to install JetBrains IDE Support extension into Chrome
- in extension options (chrome-extension://hmhgeddbohgjknpmjagkdomcpobmllji/options.html), specify the IP and port of the target machine
- on a target computer, start WebStorm, make sure that the port specified in Settings/JavaScript/Debugger is the same as above and 'Can accept external connections' is on. Open your project and run your application

Changing the port number to something else than 63342, does work. However I had some difficulties changing the debug port number. If you have the Chrome plugin, changing the debug port number from Webstorm's settings will not override the plugin's default debug port. Thus, you should right click on the plugin, click "Options", change port number and hit apply. At the same time, you should enable external connections in Webstorm's settings: "Settings/JavaScript/Debugger". Then you can access your web app from your smartphone by specifying the IP and port address of the app.

Related

having trouble viewing react app on mobile device

at my wits end here. I am trying to view my react app hosted at: http://localhost:3000 on a mobile device. When I navigate to http://xxx.xxx.xx.x:3000 on my mobile device (x being my ip address) I get the error that the server refused to respond.
-I have tried adding an incoming rule in my windows defender firewall to allow access on port 3000 from tcp connections. Yet the error still persists.
-I have even temporarily attempted to turn off my firewall to test the connection and I still get the same result.
-my mobile and my localhost are on the same network
i have specified an outgoing rule for port 3000 as well
I am using create react app for my boilerplate code so I haven't edited any of the webpack settings. I am hoping someone might have a suggestion for me as to what I can try next?
I used my ipv6 address instead of my ipv4 address which was the incorrect address

Reactjs Script Server not available

"React-scripts", a series of scripts from create-react-app starter pack allows me to use "react-scripts-start" to initialize a server.
Everything works fine, the server turns on and I can access it on localhost:3000 or by using the IP:3000
The problem is when I use other devices from my house. I try to connect to the IP:3000 and it doesn't work. I'm getting "Server not found".
Is it a Windows access problem or am I supposed to set up the server?
I managed to solve my issue. For me, it was not in the firewall, not in the configuration files. Instead, it was the router.
Since I live in UK, I have Hub 3.0 from Virgin Media.
The solution is:
1) Navigate to Connected Devices and copy the IP address for your device. In my case it was xx.xx.0.16/24 so I copied "xx.xx.0.16"
2) Navigate to Advanced Settings > Security > Port Forwarding
3) Click on "Create new Rule". For Local IP will be your IP address, local start port & end port 3000; external start port & end port 3000; Protocol choose both; Enabled on
4) Apply changes
Now here is the trick. When I run the command
npm run start
I'm getting a message which says:
You ca now view your project in the browser:
Local: http://localhost:3000/
On Your Network: http://xx.xx.37.1:3000/
I can navigate to that IP address : 3000 on the hosting laptop however if I want to make other devices access it, I must use the IP address set up in the router which for me is xx.xx.0.16:3000

Not able to access a port on ec2 instance for an Angular app

I am working on an angular app using the angular cli to set things up. Running the ng serve command spawns a server at this address <my_ec2_host_name>:4200. When I try to access the page on the browser it doesn't work (connection timed out error). I believe this is because of security reasons so I added the following rule to my security groups for the ec2 instance:
Port 4200 should now be accessible but I still can't get the page to load. Can someone think of how to get this to work?
Start angular with below command.
ng serve --host=0.0.0.0 --disable-host-check
it will disable host check and allow to access with IP
You can set up the host option like this:
ng serve -host 0.0.0.0
The steps you are doing are correct for opening a port via Security Groups in the EC2 console. Make sure you are modifying the correct security group, and make sure that your changes have been saved.
Your container may have additional firewalls in place, so you will want to check the OS documentation. For Example, RHEL uses iptables as a further security measure: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sect-Security_Guide-IPTables.html.
That looks correct. Are you sure that your server is running and listening for connections?
You should ssh to that server and verify that the page can be loaded locally. Eg:
curl http://<YOUR HOST IP ADDRESS>:4200
eg: curl http://54.164.10.123:4200
You should be careful to use the public ip address (eg: IPv4 Public IP when you're in the EC2 console). I've run into problems in the past where I've got a server listening on one IP address (often localhost) and not the public ip address.
Also maybe a problem: Is your host inside a VPC of some sort?

How to use local macbook server to allow multiple devices to view Reactjs page?

I have a local server running Reactjs on my Macbook. (newbie in React)
1) How could I change the http://localhost:4001 name to something else (e.g. http://www.test.com)
--> I'm using webpack-dev-server --port 4001
2) How could I allow up to 500 iOS/Android device to connect to this local server? (e.g do how to setup a router to broadcast this?)
--> Found this ReactJS-and-ngrok but not sure what's the concurrent users it's able to support.
3) How to allow the device to connect to a wifi without internet access?
First, see what IP is your Macbook in your local network. System Preferences->Network. Suppose your Macbook IP is 192.168.1.70 and your server is on 4001 port. Then you can start your webpack-dev-server with the following options: --output-public-path="http://192.168.1.70:4001/" --host="0.0.0.0" --public="192.168.1.70:4001". You can still access it via localhost name on Macbook, but on other devices use full IP + port number as address.
Can't say anything about setting domain... may be you can configure your router somehow? Sorry, newer had to face such a task

Monaca Localkit Launch Error

When I try to launch the Monaca Localkit application, it shows "Unable to start HTTP server. Maybe the port is occupied. Please change the port and restart the program."
Then, I have changed my port setting many times, but it still shows the same message.
My default port setting is 8001. And I checked whether other application is using this port by netstat command. But no application is using.
I tried to re-install Monaca Localkit application too. But the result is the same as before.
How can I fix this problem? Please give me an advise.
It means that another program is using that port, maybe another instance of localkit? If yes, terminate the program to free the port. You should also check if your firewall allows communications through port 8001.
If you want just to change port, you can open Localkit and go, from the menu bar, to Monaca Localkit -> Preferences and change Listening Port.

Resources