I was using vm xp on MAC. MAC and vm are in a network but I'm unable to run protractor tests.
When I run, after pointing Selenium address to vm PC IP in n config file, I can see the IE browser initiating and see the nodejs app URL but I'm unable to access the app.
The nodejs server is running on port 9001 and the app is running on 9009 on my local computer which is a Mac PC.
I can browse the app manually with the IP address 10.0.2.2 on vm but not with protractor config.
I am missing something. Don't I need to open ports on the Mac?
What baseurl in protractor config should I use?
I have pointed selenium address to vm ip address and it is working.
And also the nodejs server is running at 0.0.0.0:9001 port.
The testing story for VM's is a little rough, but there are a few approaches to this:
adding a common hostname (myapp.local) to /etc/hosts (and the windows host file) and using that as the protractor baseUrl
Separating the IE tests from other tests and using the host machine's ip as your baseUrl: baseUrl: 'http://10.0.2.2:9000/'
Alternately, you can use a service like SauceLabs or BrowserStack and run your tests on IE through "the cloud". If you can afford the cost i'd highly recommend them.
Related
I'm trying some stuff with vms (vmware) and nodejs.
I setup 2 vms runing ubuntu 20.04.5 LTS with static ips let say : 192.168.10.3 and 10.4 each accessible via ssh over internet with my public ip :
ssh -p 103 admin#\<public-ip\>
ssh -p 104 admin#\<public-ip\>
I opened those ports(103 and 104) on windows firewall and forwarded them on the router, everything is fine till now.
In one vm (10.4) i installed the node server running on port 3000 ( which i can access from windows in : 192.168.10.4:3000) and a react app (it can be anything using a different port) on 3001.
How can i access the node server or/and the react app using my public ip ?
i tried on the browser : public-ip:104 but firefox blocked it "This address uses an unusual network port for web browsing. As a security measure, Firefox dropped the request."
public-ip:3000 is not working either
I have installed browsersync using command npm install -g browser-sync in windows 10 x64. nodejs version 10.11.0 browsersync version 2.26.3
everything is working fine in desktop. but when i try to access http://192.168.56.1:3000 from mobile device using same wifi, i get "this site can't be reached"
i have installed another tool named dev-ip which returns this in powershell:
[ '192.168.56.1', '192.168.0.120' ]
the ip series 192.168.0.120 used to work fine in my mobile devices.
now, how to use the ip 192.168.0.120 instead of 192.168.56.1 in browsersync globally?
Just specify the host in your configuration that you want the server to run on.
Eg. In you case it would be
host: "192.168.0.120"
You can refer to the link below for more information.
https://www.browsersync.io/docs/options#option-host
Hi, guys. This is how it worked for me:
Source:
windows 10
all firewalls are closed
network access (from windows) to the PC is disabled
external url from gulp 192.168.56.1:3000
proxying local php site from OpenServer
external device - iphone safari/chrome
external (virtual) device - vwware with macos
make sure that Windows Defender firewall monitor in high-risk mode -> rules for incoming connections -> Node.js: Server-side JavaScript is enabled (and other necessary apps)
Solution:
look at what ip address in the home network my PC has (all devices are connected to the same network) - for example 192.168.1.103
in the gulp file I specify it host: "192.168.1.103",
save
checking it out
Important:
for source - external device - iphone safari/chrome - correct url is only 192.168.1.103:3000
for source - external (virtual) device - vwware with macos - correct urls is 192.168.1.103:3000 and 192.168.56.1:3000 both
Visually in pic:
Result:
Checked on all devices, in virtual devices, on the PC itself
browsersync works
the Internet is not lost
there is no address conflict within the network
Hope this will help someone too 🙂
You don't have to change the settings.
run cmd using Administrator
run ipconfig
copy IPv4 address like 192.168.43.52
Now open google on mobile and add http:// at the front and :3000 or :5500 at the back.
like run http://192.168.43.52:3000
I want to get Xdebug running in a semi secure manner over LAN in the office. Our current setup is as follows:
Local server on LAN network under 192.168.1.1 with Ubuntu Server 16
Multiple instances of docker with PHP / Apache running on Ubuntu server
Jwilder nginx proxy for forwarding all requests to individual docker containers
https://github.com/jwilder/nginx-proxy
Files are directly edited over an internal SMB share where Windows hosts connect to the Linux share. These are the hosts running PhpStorm.
The machine is exposed to the world using port 80. LAN has access to all ports.
I'm at a bit of a loss how to properly setup Xdebug using PhpStorm where only those within our LAN can trigger the debugger and debug from map files from a Linux host on Windows.
A DBGp proxy would be the answer here.
It limits all debugging connections from the web server to a single host inside the LAN.
It allows you to perform multi-user debugging with the help of IDE keys.
JFYI, in Xdebug, it's the web server that initiates a TCP connection to the client (the DBGp proxy in this case), so some Docker networking magic is required here.
I installed Gitlab on a VMWare VM, using NAT, where the VM is running Ubuntu 16.04. Everything installed OK, but I can't access it via the browser. It says I need to configure an external URL. I only need to access the VM from my Mac (where the VM is running). How do I configure a URL so I can access it from my Mac?
Thanks!
When the VM is running locally on the Mac in NAT network config, this means that the ports are available directly on the Mac IP. If you only need to access it from the Mac itself, you could access the application at the port via the loopback (local only) IP 127.0.0.1
If gitlab is running on port 80 in the VM, on the Mac you should be able to access with http://127.0.0.1
If this doesn't work, there are a few options:
Confirm no other service/webserver is running on port 80 locally on the Mac. If there is, you should change the port of the gitlab webserver in your VM, and access using http://127.0.0.1:port
Confirm that port 80 is allowed in the VM firewall, and that the webserver is running https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-gitlab-on-ubuntu-16-04
I guess I will start at the start of my application.
I am making a full mean-stack application and I want it to run in docker. To use docker I am using a virtualbox with Ubuntu. When I run my docker-compose, everything is working on localhost:4200. Now I want to open my application on my host machine (Windows 7).
When I go to my application via (ip addres should be kept secret, right?) xxx.xxx.xx.xxx:4200/login the page looks fine, but I get these errors:
I am using Angular cli 1.4.1 with node 8.4.0
Why am I getting these errors and how do I fix them?
My docker-compose
Your server which is listening on port 4200 is listening on your xxx.xxx.xxx.xxx interface (not necessary to hide lan IP, but nevermind...).
Your angular application is running on your host system. the localhost is the localhost of your host system, not the guest. so you have two solutions:
changing your urls inside the angular application to point to xxx.xxx.xxx.xxx:4200 instead of localhost:4200.
Forwarding your 4200 port from your host to your guest system using virtual box :
shutdown guest.
select guest and click on settings
go to the network tab.
click on "advanced"
then select "ports redirections" and bind your host 127.0.0.1:4200 to your guest's 4200 port