Blackberry Connection refused when deploying Phonegap app to device - blackberry

)
I want to deploy my app that is created with Phonegap to my BlackBerry Z10 device.
I created some Hello World basic app with Phonegap, then in the terminal (Mac OS Lion) I ran following command:
/Users/macbook/Documents/BB10APP/cordova/run BBZ10
Everythings seems to work fine, but in the end I get a connection error:
[BUILD] BAR packaging complete
Error: Error: Cannot connect: Connection to https://169.254.x.x:443 refused. Please check IP address settings for the target. You may have to reboot the target.
What could be the problem with the connection?
And is there some other tools that I can use to just send the app via USB to the device like on Android?
Thanks :-)

I found a solution if anyone wants to know:
You have to use the device IP address and not the developer IP that is found in the developer settings on the device (where you see your developer token).
And then it will work (don't ask me what the developer ip is for, just annoying to lead developers in a wrong direction).
The device ip can be found in some settings entry on the device (I don't remember in which unfortunately, but it is there). Just dont use the ip from the developer menu that wont work :-)

There are two IPs in Blackberry
IP that is appearing on bottom part of Controller EX. ( 192.168.139.129)
IP that is configured in Blackberry simulator (Security and Privacy -> Development Setting)
EX. ( 169.254.0.1)
Using Controller IP "Network connection problem" issue will be solved
D:\bbndk\hello\platforms\blackberry10\cordova>target.bat add mydevice 192.168.139.129 -t device --password 0000 --pin 00000000

Related

How to connect to localhost on a real device in react native on iOS?

I have a server running on localhost:5000 on my desktop, and when I make http requests through my react-native app when running on the iOS simulation to it, it works. However, when I connect to a real device, the http requests don't work. What am I doing wrong? Is there something I have to configure?
localhost in your desktop is not the same ip of the localhost of your device.
Get the ip of your computer by typing ifconfig in a terminal, then replace localhost by this ip, you should type something like that in your device browser:
192.168.0.23:5000
Maybe my answer is too late but I ran into a similar situation today and I got it to work by running my node server using the IPv4 of my desktop and then making the request to that IP.
For example, I am running my nodejs development server at http://192.168.0.135:3000(local IP of my desktop) instead of localhost and then I make the fetch API request from my react-native app to http://192.168.0.135:3000/.
Just make sure your nodejs server and your app are on the same local network. My react-native server (metro bundler) is running on a separate PC also in the same wifi network.
If your are on macOS go to settings -> Wifi / and show more,
on bottom you see "IP address", it's your correct localhost for ios physical device !

React-Native Could not connect to development server

I've been testing my project on my iPhone6s and it worked perfectly. But today Xcode and Node.js keeps giving me the 'Unable to execute JS call: __fbBatchedBridge is undefined' error.
I'm sure the IP address is correct, my phone is under the same Wifi network with server. The simulator works fine with the server ip. To test if it is something wrong with the project I start another AwesomeProject and changed the IP but still not working. Anyone know any possible solutions?
I faced the same issue in my office Wifi network connection also. This is because of the router configuration. There are two ways to make it work.
Expose the local server using ngrok. But, It will be slow since it is sending everything to server.
Connect your phone using USB cable and type the following command in the computer adb reverce tcp:8081 tcp:8081

Test XCode app running on physical device with local server

I have searched high and low for a solution to this which I am sure must exist but I have failed to find one that works.
I am running XCode 7.3 and iOS 9.2 on an iPhone.
I have a test server running on 127.0.0.1:8000
I cannot get my app running on the iPhone to connect to either 127.0.0.1:8000 or 192.168.1.200:8000 (which is the local ip address of my server).
There must be a way to give the iPhone app access to the local server if only I knew how!
The best solution to this problem, that many app developers have, is to download ngrok which acts as a proxy website.
ngrok is insanely easy to use:
Download from https://ngrok.com/
Run: ngrok http 8000 in terminal (where 8000 is your port)
Cut and paste the displayed ngrok url (e.g. http://a021v2tc.ngrok.io) into your app
So simple. And works!
Check if iPhone connect the same wifi with your server.
You can use Fiddler as iPhone agent to get the detail error message.
There is the link how to capture traffic from IOS device.
here

Able to make a VPN connection from client to the tunnel_server (using apple's SimpleTunnel app) but unable to browse the internet on the device

I built the SimpleTunnel sample app (provided by apple) and am running the VPN client on a IOS device and the VPN server (tunnel_server) on a MAC running OS 10.11 (OS X El Capitan)
On MAC :-
$ sudo ./tunnel_server 550 ../../tunnel_server/config.plist
Response :-
tunnel_server[87725:2604682] Starting network service on port 550
tunnel_server[87725:2604682] Network service published successfully
On IOS device :-
Next I ran the PacketTunnel app on my IOS device. Added a VPN configuration with the correct IP address (the IP address of the MAC running the tunnel_server) and the port number (port number for the tunnel_server which is 550).
Next I try to connect to the VPN from the IO device and this seems to go through fine as I see the VPN sign in status bar.
Response on the screen running tunnel_server :-
tunnel_server[87739:2606312] Accepted a new connection
tunnel_server[87739:2606312] Allocated address Optional("10.8.0.15")
However I am not able to browse the internet using Safari on the IOS device (it times out), but am able to do the same from the MAC.
Any insights on what I might be missing ?
Please note that my MAC doesn't have OS X server installed. Also I did run the following two comands from a terminal before starting the tunnel_server on the MAC
sudo sysctl net.inet.ip.forwarding=1
sudo sysctl net.inet.ip.fw.enable=1

Error when testing app from mobile device - ERR_CONNECTION_REFUSED

After upgrading to OSX Yosemite, I can no longer test my app on a mobile device by using my development machine's (MacBook Pro) IP address. For example, I used to be able to view a Rails app on a phone by going to http://192.168.0.4:3000, but now I get the following error:
ERR_CONNECTION_REFUSED
I get the same error when testing an AngularJS app using the grunt server running at http://192.168.0.4:9000
Any help will be greatly appreciated.
It could help to bind the server to your local IP, like
rails s -p9000 -b192.168.0.4
to start your rails app
Consider giving a try to Pow. Its pretty simple to install, and a great solution to share a local development across multiple devices.
Like it explains in their homepage, you can install it with just :
curl get.pow.cx | sh. To prevent any errors, install in Terminal app outside a Tmux session.
And just symlink your app :
cd ~/.pow
ln -s /path/to/myapp
You can access your app at http://myapp.dev/, and at http://myapp.[your ip address].xip.io from another device.
Not a direct response to your issue, but an alternative to setting yourself a configuration in your preferences.
Turn IPv6 off. It Prevented me from connecting to my localhost from other computers on my LAN. And, with the newer versions of OSX there is no way to turn it off in the Network Preferences Panel so you have to do it from terminal.
Open Terminal and enter to turn it off:
networksetup -setv6off Wi-Fi
And this to turn it back on:
networksetup -setv6LinkLocal Wi-Fi
If you are connected via Ethernet or something else just run this command to list the available options:
networksetup -listallnetworkservices
and replace "Wi-Fi" with the appropriate device.
I don't have a mac, but that seems to be the server not accepting connections, if that is the case, it's only accepting localhost connections, try binding de server to accept all connections or bind it to 0.0.0.0 ip
Can you access that IP from Browser? are you sure your IP is in the same range with 192.168.0.4? It is your mobile device connected on the same network? Maybe you used internet sharing before update to Yosemite and now is off?
I think your IP address changed. Telnet from console(terminal) your I.P. port. If 192.168.0.4 is your real Ip then maybe add(as root or via sudo) an entry in /etc/host file an entry as 127.0.0.1 192.168.0.4. Restart network or reboot. Also you can try nmap ( on ip to see open ports). Nmap has been ported to OSX just google for installer.

Resources