iOS Question [Solved] B4iBuilder connection from iPhone problem

Okan Özcan

Member
Licensed User
Hello,
Following the post from here https://www.b4x.com/android/forum/threads/b4i-bridge-problem.90515/#post-576728

After uninstalling it from the phone, I am unable to re-install B4iBridge to my phone. I am using a local mac builder. I can connect to mac server from my PC while iPhone's Safari fails to connect.

Mac, pc and phone all are in the same local wifi. I have re-created all certificates, provisions etc. to make sure all of them are proper. Building the B4i Bridge App from the IDE works fine. I can see the install app button when I connect from pc.

I was able to install B4iBridge last week with the same setup. I honestly don't know what changed.

Here is B4iBuilder's output:
B4X:
Build server version: 4.6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-03-30 21:54:59.024:INFO::main: Logging initialized @484ms to org.eclipse.jetty.util.log.StdErrLog
Loading default configuration file.
AppPath=/Users/ozok/Desktop/B4iBuildServer
Mac version: 10.13.3
Xcode path: /Applications/Xcode.app/Contents/Developer
Xcode version: Xcode 9.3
Build version 9E145

2018-03-30 21:55:00.997:INFO:oejs.Server:main: jetty-9.4.z-SNAPSHOT
2018-03-30 21:55:01.094:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2018-03-30 21:55:01.094:INFO:oejs.session:main: No SessionScavenger set, using defaults
2018-03-30 21:55:01.098:INFO:oejs.session:main: Scavenging every 600000ms
2018-03-30 21:55:01.112:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@53b32d7{/,file:///Users/ozok/Desktop/B4iBuildServer/www,AVAILABLE}
2018-03-30 21:55:01.153:INFO:oejs.AbstractNCSARequestLog:main: Opened /Users/ozok/Desktop/B4iBuildServer/logs/b4j-2018_03_30.request.log
2018-03-30 21:55:01.204:INFO:oejs.AbstractConnector:main: Started ServerConnector@13805618{HTTP/1.1,[http/1.1]}{0.0.0.0:51041}
2018-03-30 21:55:01.282:INFO:oejus.SslContextFactory:main: x509=X509@25bbe1b6(rootca,h=[],w=[]) for SslContextFactory@5702b3b1(file:///Users/ozok/Desktop/B4iBuildServer/key/key.jks,null)
2018-03-30 21:55:01.283:INFO:oejus.SslContextFactory:main: x509=X509@69ea3742(jetty,h=[192.168.1.32],w=[]) for SslContextFactory@5702b3b1(file:///Users/ozok/Desktop/B4iBuildServer/key/key.jks,null)
2018-03-30 21:55:01.590:INFO:oejs.AbstractConnector:main: Started ServerConnector@4221ea36{SSL,[ssl, http/1.1]}{0.0.0.0:51042}
2018-03-30 21:55:01.592:INFO:oejs.Server:main: Started @3063ms
Build server is ready
https://192.168.1.32:51042
http://192.168.1.32:51041
Build server version: 4.60
Adding user to keychain: b4i_default
success: true, 139
success: true, 65
21:55:20| Compilation time: 7288, b4i_default, queue: 0, success: false
success: true, 65

Cheers.
 

aminoacid

Active Member
Licensed User
Longtime User
When you say "iPhone's Safari fails to connect.", do you mean Safari just times out - "Safari could not open page........ " ?
 
Upvote 0

aminoacid

Active Member
Licensed User
Longtime User
Upvote 0

Okan Özcan

Member
Licensed User
I cannot connect to http://192.168.1.32:51041/test from phone either. I cannot ping to pc or mac from phone. I turned off cellular as you suggested and phone seems to have local ip, 192.168.1.20. I also tried https://www.b4x.com/android/forum/threads/b4i-bridge-problem.90515/#post-572216 but it still doesn't work.

I also downloaded the server example for B4j, and ran it in both mac and pc. While both of them connect to each other, phone still fails.

Trying a different approach, iPhone can connect to the ftp server running on my pc.

I guess something is wrong with my phone's configuration.
 
Upvote 0

Okan Özcan

Member
Licensed User
Things are getting a bit strange here :D

After a bit of research online, I found that turning wifi on/off on mac could solve this. It indeed helped. Trouble is B4iBuildServer reports a very strange IP (169.254.151.235). I could not compile b4ibridge using this IP so I entered 192.168.1.32 under IDE settings which worked.

I can now install B4iBridge and it shows designer preview. However it does not install and launch the app I am trying to debug. When I go to Safari on phone (to 169.254.151.235), I can install the app just like installing B4iBridge. I can debug the app in IDE using this method.

Also if I leave B4iBridge open long enough, it displays a message saying "Cannot connect: 192.168.1.32"
 
Upvote 0

Lakhtin_V

Active Member
Licensed User
Longtime User
IP address that is displayed in the bridge depends on the settings of the wifi router in your home or office. If one and the same phone connect to a computer in the office or home will be used different IP.
 
Upvote 0

Okan Özcan

Member
Licensed User
I have fixed the problem by entering the IP manually as you guys said, reseting my modem and phone's network settings several times.
 
Upvote 0
Top