I am on the first tutorial of Substrate, running substrate on Windows Subsystem for Linux. The substrate network is running correctly, but when I open the frontend on the browser i get this erros:
Because you run on the subsystem I would recommend you to check the network configuration for that. here is my be help :
Sharing Network Resources WSL
I have encountered and resolved this problem. WSL share the same ip with host, you known. you should make sure weather your wsl's ip is the same one that your frontend connect to. Generally, it is same one. I just closed the wls terminal console window and reopen it, it can be works! I don't know why, Perhaps, the bugs of wsl lead to it. Good Luck, guy!
From what I've experienced, getting Windows and WSL communicating through localhost is tricky and prone to falling over. I resolved the issue by making use of WSL's internal network IP address.
When you run the front-end server (yarn start) it shows you the internal network IP you can use to open the frontend. Or you can run
ip addr | grep -E "\b*inet.*global" | sed -E s/inet(.*)\/.*/\1/
(which I got from https://github.com/microsoft/WSL/issues/4636)
Next, you have to run the node-template with the --ws-external flag (in addition to the --dev and --tmp flags), so that it binds to 0.0.0.0 and allows you to connect to from windows.
Finally, you have to edit the src/config/development.json so that the PROVIDER_SOCKER variable uses the internal IP address and not 127.0.0.1.
Related
I have created a React Application with multiple frontends, I need to run that on my ipad Mini so that I can demo that it works on it. How can I do it, please advise?
I have tried using the IP configuration but to no avail.
First solution (approximate)
You can open such a view called device mode in a browser (chrome example). But keep in mind: This is only intended as a first-order approximation of how your page would look and feel like on another device. It is just being simulated and not guaranteed to be exactly the same. Chrome does support iPad Mini previews.
Second solution (accurate)
You would need to use your computers IP address in your local network and make sure that your device is on the same network as your computer.
On Linux and Mac you can check your IP with ifconfig and ipconfig on Windows. Once you know the IP address of your computer and your react dev server is running on port 3000 you can access your app with:
http://{IP_ADDRESS}:3000
I wanted to try localhost in my mobile, so I can see if it is really responsive cause in the chrome there are only few selections like iPad,etc.. so My PC has a mobile hotspot. Is it possible to share my localhost to the connected devices?
Why are you using your PC as mobile hotspot? Isn't there another network that both your PC and other devices can connect to and find each other on?
Either way, localhost is just a shorthand for the local loopback IP address (127.0.0.1), which is used for a computer to handle network requests to itself. Now, if the other devices can connect to the PC, then all you need to do is find out what your IP address on the local network is, if XAMPP's Apache server is listening for requests on the network and if any local Firewall isn't blocking access.
(Windows)Before you do anything else, make sure Windows IIS isn't running! It occupies the default http port (80) and is going to cause problems if it's there!
First up, figuring out your IP address:
(Windows)Open the commandprompt (start -> search cmd.exe or run and enter cmd) // (Linux/Unix/Mac)Open a terminal
(Windows)run ip-config and look for the line that specifies your IPv4 address, write it down if you have to // (Linux/Unix/Mac)run ifconfig and look for the line stating inet.
Either way, this address probably looks like 192.168.X.Y
Next, check to see if Apache is listening
As this is often the default setting, it probably is. So grab any other device connected on the same network and open a browser
In the address bar type the 192.168.X.Y IP address of the PC running XAMPP
If you don't see an error, go to your files and enjoy!
If you do get an error, change the config for Apache (httpd.conf) and search for a line containing "Listen 80", if you can't find it then it's probably listening to 0.0.0.0:80 and you need to edit that line to "Listen 80" as that will allow it to listen to all addresses on the network.
Finally, you can't reach it so check if your firewall is blocking access. This is usually Windows firewall not trusting anything that doesn't carry a Microsoft label
Go to Control Panel > Windows Firewall > Allow a program to communicate through windows firewall > Add another program Name: http Port: 80
If it still doesn't work and you're running Windows, refer to this Stack Overflow question as you are not the first person that has trouble setting things up.
I have an instance of couchdb running on my local port 5984.
My ultimate goal is to run couchdb on a server within a closed network, and be able to send requests to this server from mobile devices within the network.
This post seems to provide a solution, provided I can open a terminal and make an ssh tunnel:
ssh -f -L localhost:15984:127.0.0.1:5984 user#remote_host -N
But I obviously won't be able to access the command line on mobile devices to make the tunnel. How does one go about accessing applications from mobile devices within closed networks? (I can't just deploy it to some web server as I don't have access to the internet)
You CAN run command line on Android, for example with this terminal emulator you can copy a statically linked ssh binary to /data/data/jackpal.androidterm/app_HOME then cd $HOME and ./ssh to execute it
and there are graphical ssh clients, some of which might have the functionality
also termux should have an ssh client available, you probably need to "apt install ssh" when in the app to get it.
You can create a SSH tunnel if the client supports port forwarding. Those I know are :
The paid version of JuiceSSH : Setting up a New Port Forward Profile
Connectbot : Long press in the hosts list and choose "Edit port forwards". The parameters are straightforwardly adapted from the -L option.
You can write a client via sudo apt-cache search libssh; it supports tunneling AKA forwarding.
#include <libssh/libssh.h>
http://api.libssh.org/master/libssh_tutor_forwarding.html
I'm trying to test my application that I develop using the Google AppEngine.
When I want to test from the computer I use to develop the application ("localhost:8888" in my browser) everything works perfectly.
But when I want to test it from my android device's browser, using "192.168.5.194:8888" (the local IP adrress of the computer), it gives me nothing (it just tries to connect to the site unsuccesfully).
So, my computer and my browser are on the same LAN. The comp is running a win7. I use eclipse (Kepler) to develop.
Your help is appreciated.
In the documentation under command line arguments there is a parameter called host.
You can start you local environment like
./dev_appserver --host=0.0.0.0
You have to replace 0 with your actual network ip address, something like 192.168.0.42 which can be found with ifconfig command in a linux all mac terminal, ipconfig for windows.
If you visit from your favorite browser your actual ip address for example 192.168.0.42:8080 at 8080 port if you didn't set one manually you will be able to access your local machine from any browser on the network.
The above instructions apply only in a non graphical environment if you are using the application for starting your server I haven't checked it out, and I can't right now cause I am running on Linux, but I am quite confident that you can define a host somewhere in the parameters.
Add the following command line flag to the App Engine launcher: --host=0.0.0.0
I work while traveling at the moment. I'm at the point where I want to start setting up the paypal integration, but I can't because I can't open port 80 up so that paypal sandbox can communicate with my computer. I've tried getting my own USB modem w/ sim card (data plan) but it seems they are really aggressive with blocking ports on those also.
So, i can't get to the routers in the hotels since it would be wrong (and i don't have the passwords).
Is there some kind of trick that I can use so I can mess with paypal sandbox integration? I've tried using hosting (godaddy) but it's awful slow to keep uploading changes to a host just to see if what you did worked (not to mention problems with debugging).
Looks like i didn't get any help this time, but i found a way around it! I created a VPN in Windows 7 in my home network (so my work laptop can connect back home). I checked the setting that allows remote vpn connections to pick their own IP address so my work laptop would have a static ip.
I then simply opened up port 80, and forwarded it to the static IP set for my laptop. I can't believe it, but it works!