iOS Question B4i Simulator debugging no longer connects to IDE

marcick

Well-Known Member
Licensed User
Longtime User
Hi,
I'm having a strange issue with B4i simulator debugging that never happened before.

My setup has always worked fine for years:

  • Windows PC with B4i IDE
  • Mac on same LAN running B4i Build Server
  • Xcode + iPhone Simulator
I hadn't used the Mac for about 2 months. Today I powered it on again and now I have this problem.

Honestly, I have the feeling that I'm simply forgetting something stupid or obvious, but I can't figure out what.

Current behavior:

  • Build succeeds correctly
  • App gets installed and launched in iPhone Simulator
  • Then immediately I get the white screen saying:
"No WiFi connection! Waiting for IDE to connect"

What I already checked:

  • Build Server works correctly (compilation succeeds)
  • Windows ↔ Mac connectivity OK
  • Ping works both directions
  • Firewall disabled on Mac
  • Network is Private on Windows
  • Simulator reset / erased
  • Restarted Mac, Windows, Xcode, Simulator, Build Server
  • Cleaned project / Objects folder
  • Ports reachable from Windows to Mac
Interesting detail:
On the Mac, while the app is running, these ports are listening:

58192
58193
58194

(using lsof -nP -iTCP -sTCP:LISTEN)

and they belong to my app process.

But on Windows, B4i.exe sometimes tries connecting to different ports like:

192.168.1.57:58191
or
192.168.1.57:58196

and the connection stays in SYN_SENT.

It looks like the simulator/debugger ports and the IDE are somehow out of sync.

I did NOT change:

  • B4i version
  • Build Server version
  • Project
  • LAN configuration
The only thing that changed is that the Mac had been powered off for a couple of months.

Any idea what could cause the simulator debugger handshake to fail like this?

Thanks!
 

marcick

Well-Known Member
Licensed User
Longtime User
Are you able to run the app on a connected real device?
Yes, with a real iPhone connected directly to the Mac everything works correctly through Apple Configurator, including debug and release builds.

But with the iOS Simulator I have problems, and I'm pretty sure I'm simply forgetting the correct steps.

These are the steps I'm currently doing:

  1. Build Server running
  2. Tools → Device IP Address → Simulator
  3. Tools → Build Server → Build Simulator Release App → works correctly
  4. Tools → Build Server → Build B4iBridge App → returns:
"Error: cfgutil: error: no devices found"

I no longer remember how I am supposed to install B4i-Bridge on the simulator.
 
Upvote 0

GabOlg

New Member
Hi,
I'm having a strange issue with B4i simulator debugging that never happened before.

My setup has always worked fine for years:

  • Windows PC with B4i IDE
  • Mac on same LAN running B4i Build Server
  • Xcode + iPhone Simulator
I hadn't used the Mac for about 2 months. Today I powered it on again and now I have this problem.

Honestly, I have the feeling that I'm simply forgetting something stupid or obvious, but I can't figure out what.

Current behavior:

  • Build succeeds correctly
  • App gets installed and launched in iPhone Simulator
  • Then immediately I get the white screen saying:
"No WiFi connection! Waiting for IDE to connect"

What I already checked:

  • Build Server works correctly (compilation succeeds)
  • Windows ↔ Mac connectivity OK
  • Ping works both directions
  • Firewall disabled on Mac
  • Network is Private on Windows
  • Simulator reset / erased
  • Restarted Mac, Windows, Xcode, Simulator, Build Server
  • Cleaned project / Objects folder
  • Ports reachable from Windows to Mac
Interesting detail:
On the Mac, while the app is running, these ports are listening:

58192
58193
58194

(using lsof -nP -iTCP -sTCP:LISTEN)

and they belong to my app process.

But on Windows, B4i.exe sometimes tries connecting to different ports like:

192.168.1.57:58191
or
192.168.1.57:58196

and the connection stays in SYN_SENT.

It looks like the simulator/debugger ports and the IDE are somehow out of sync.

I did NOT change:

  • B4i version
  • Build Server version
  • Project
  • LAN configuration
The only thing that changed is that the Mac had been powered off for a couple of months.

Any idea what could cause the simulator debugger handshake to fail like this?

Thanks!

While I wait for a fix to this connection mess, I’m just taking a break to play games on https://mostbet.net.in/ where everything runs smoothly.
You don't install B4i-Bridge on the simulator. The bridge app is only for real devices, which is why cfgutil is failing.
For the simulator, you just need to select Simulator under Device IP Address and click Build Simulator Debug App. It will launch the app automatically without needing the bridge.
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Where is Simulator Debug App ?

1779794318471.png
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
That's true. No special instructions for the simulator. You just need to choose Device IP Address - Simulator and then run the app (debug mode). Or Alt + T + B + R for release mode.

"Build Simulator Release App" was added for users who build with the hosted builder. It allows creating a simulator build without running it.
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Now it works, but the strange thing is that I'm basically doing the exact same things I was doing yesterday, when after compilation the app seemed to launch and then got stuck on the white screen with the message:

"No WiFi connection! Waiting for IDE to connect"

Before posting here I had already made many attempts.

At some point I started wondering if maybe B4i-Bridge was required for the simulator, but even trying that the correct way did not work.

Mystery...

Anyway .. thanks everybody :)
 
Upvote 0
Top