iOS Question Connect failure with B4i bridge

Tom2525

Member
Licensed User
Longtime User
I can't seem to get the B4i Bridge to connect properly. I've read the thread that describes how to do it but still nothing. I get this output:

Building designer app. 0.09
Building Xcode project 0.02
Sending data to remote compiler. Error
Communication error: ConnectFailure

I'm using a MAC and have used Xcode for 18 months.
 

Tom2525

Member
Licensed User
Longtime User
Are you running the builder server on this Mac?
Is that the .jar file?

I downloaded two folders. One folder was labeled "macserver" In that folder is a file named "B4iBuildServer.jar." Maybe this is where I'm stuck. I can't seem to do anything with it. FWIW, I don't have a problem running the B4A bridge when building Android apps.
 
Last edited by a moderator:
Upvote 0

cirollo

Active Member
Licensed User
Longtime User
I'm start thinking to buy mac rental service, as I cannot succeed in local compiling to work....

by the way, I've setted static ip address to the mac 192.168.1.180, adjust the setting in build server configuration of the ide, killed the b4imacserver on the macbook, and reinstalled again (first it war referring to a DHCP ip), then compiled the b4i bridge app, this is the result:

B4X:
Building designer app.                  1.23
Building Xcode project                  0.38
Sending data to remote compiler.        3.02
    Open mobile Safari and navigate to:192.168.1.180:51041/cirollo
Then click on the Install button.
Troubleshooting:
1. Make sure that B4I certificate is installed (www.b4x.com/ca.pem).
2. Make sure that the provisioning file includes the target device UDID.
3. Check the link for typos.
Compilation completed successfully.

and this is the bridge running on macbook

B4X:
Last login: Thu Nov 13 15:11:37 on ttys000

MacBook-Pro-di-Ciro-Marciano:~ cirollo$ cd macserver-aa

MacBook-Pro-di-Ciro-Marciano:macserver-aa cirollo$ java -jar B4iBuildServer.jar

Build server version: 1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2014-11-13 15:14:01.681:INFO::main: Logging initialized @226ms

Loading default configuration file.

AppPath=/Users/cirollo/macserver-aa

2014-11-13 15:14:01.853:INFO:oejs.Server:main: jetty-9.1.z-SNAPSHOT

2014-11-13 15:14:01.883:WARN:oejh.MimeTypes:main: java.util.MissingResourceException: Can't find bundle for base name org/eclipse/jetty/http/encoding, locale it_IT

2014-11-13 15:14:01.907:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@61a52fbd{/,file:/Users/cirollo/macserver-aa/www,AVAILABLE}

2014-11-13 15:14:01.911:INFO:oejs.AbstractNCSARequestLog:main: Opened /Users/cirollo/macserver-aa/logs/b4j-2014_11_13.request.log

2014-11-13 15:14:01.938:INFO:oejs.ServerConnector:main: Started ServerConnector@357246de{HTTP/1.1}{0.0.0.0:51041}

2014-11-13 15:14:02.298:INFO:oejs.ServerConnector:main: Started ServerConnector@214bf60b{SSL-http/1.1}{0.0.0.0:51042}

2014-11-13 15:14:02.300:INFO:oejs.Server:main: Started @855ms

Build server is ready

https://192.168.1.180:51042

http://192.168.1.180:51041

Adding user to keychain: cirollo

15:14:54| Compilation time: 2725, cirollo, queue: 0, success: true

15:16:12| Compilation time: 2401, cirollo, queue: 0, success: true

15:21:04| Compilation time: 2387, cirollo, queue: 0, success: true

when i get from the iphone to the url 192.168.1.180:51041/cirollo and click on the circular button install app it says that is impossibile to connect to 192.168.1.180.....why?????????

ps note that 192.168.1.180:51041/test show me the server is running!
 
Last edited:
Upvote 0

cirollo

Active Member
Licensed User
Longtime User
I checked, there are two certificates:

configurations profile
B4I
received 6 nov 2014
expire 19 july 2024

forniture profile (i think it's the beta one!)
development
received 6 nov 2014
expire 6 nov 2015
 
Upvote 0

cirollo

Active Member
Licensed User
Longtime User
I made it when I was using the beta....the device is always the same iphone4
I copied the keys folder from the beta to v.1.00 with all the certificates inside....could be that? should i made new certificates from apple site?
 
Upvote 0

cirollo

Active Member
Licensed User
Longtime User
Please contact [email protected]. We will send you a temporary user id for the hosted builder to see whether the problem is in the builder or the client.

ok Erel, the strange thing is that iphone told me that it cannot connect to the ip, even if in the page I see the circular button install app and the name of the last project compiled from the ide with correct date and time, so I think the link between b4i on win pc and builder on mac is working!

obviously, without installing bridge I cannot test anything on the device. Do you think could be a problem of the certificates, maybe with version 1.0 I should make a new private sign key and upload to apple? now i'm using the same of b4i beta....
 
Upvote 0

Tom2525

Member
Licensed User
Longtime User
What am I doing wrong? I open a terminal and when I put in "java -jar B4iBuildServer.jar" I get the following response:
"Unable to access jar file B4iBuildServer.jar."

I've installed JDK 8.
 
Upvote 0

Tom2525

Member
Licensed User
Longtime User
That resolved the issue, thanks. So what do I do from here? I've verified that the build server is running on my MAC. I can access ports 51042 and 51041 from my device however when I try to build the bridge app I get a connect failure.
 
Last edited:
Upvote 0

cirollo

Active Member
Licensed User
Longtime User
Erel, I've got your mail, I'll try in the afternoon when I'll come back to office.....

I'll give you feedback, thank You

Ciro
 
Upvote 0
Top