Can't connect to phone from PC via Wifi for simple project with assets

If I create a simple app with just a single label in it, it connects via Wifi to my phone (Samsung Galaxy A52 running Android 13) fine. The Android App is version 2.67 (most recent at time of this post). However, if I try and include 2 assets (both less than 200kB), it fails at the point (20%) where it tries to establish a secure connection. Following the Wifi troubleshooting instructions: Troubleshooting for App Inventor 2 I am able to ping the phone from my PC (Windows 11 home, tried with Firefox and Chrome browsers). However, I can't connect using telnet to the phone on either of the ports 8001 and 9987. I am assuming that this is probably the issue with the simple app I am trying to make. However, I am now in over my head in trying to solve this.

I therefore have two questions:

  1. is the firewall blocking these connections likely to be the PC or the router?
  2. Are there any basic instructions on how to reconfigure the router and/or windows firewall to allow the required connections?

ok, this is more complicated than I thought. If I just include the image and not the audio file in the app, then it does connect fine. Does this mean the troubleshooting instructions are wrong and you don't need to telnet to the device ?

Now I am really confused, I've built an almost identical app from scratch and it works fine.

So something different in the first app that AI2 Companion didn't like?

it must be but the same 2 assets (one image, and one audio clip) are identical files, the designer elements are essentially the same (and very basic stuff, I am really at "Hello world" level here). The original one crashes the android app when it tries to upload the assets.

I have also gone back and double checked that the original app still does crash AI2 companion so it's not a Heisenbug.

1 Like

I have never used telnet for setup.

Where did you see that?

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

re telnet - its in the troubleshooting instructions under Connecting the phone over wifi: " If all of these steps succeed and Wireless App Inventor still doesn't work, then there may be a firewall between the computer and phone that is blocking ports 8001 and 9987. If you have a "telnet" program, you can attempt to telnet from the computer to the phone on these ports. If the connection won't complete, then there is likely a firewall in place that is blocking connections to the phone."

This was a rabbit hole as the problem is to do with a single app - unfortunately it was also my first ever app.

Here is the aia file: HelloItsMe (1).aia (208.6 KB)

I also wonder if some of the people with the problem at 20% in this thread are suffering a similar problem: AI Companion fails at 20% loading - there seem to be multiple reasons why the connection fails at this point but there may be one which hasn't been found before? I think possibly, I should split this into 2 parts:

  1. incorrect/misleading troubleshooting steps (you don't need to be able to connect via telnet)
  2. problem with the specific app I have (which might or might not be a bug)

It is your image that is causing the crash. ( was able to load another simple image without a crash. However, it seems setting the button shape to rectangular is causing the problem.Set to default and your aia project works in Companion. Possible bug, but needs more testing....

1 Like

thanks @TIMAI2 - I'd really like to know whether there are any more steps I need to take here. I am happy to close this now (I have the App Inventor working in other use cases). I am also happy to open an issue on Github for both the problem with my tiny app and the misleading documentation if that is the most appropriate. In that case though, I'd appreciate some help in identifying the right repo for each of these issues.

This is the place to report both of these things.

Start a new topic in category Bugs and other issues, or Feedback. We can assign it to MIT devs.

1 Like

I uploaded your AIA project to Companion without problems, over my wifi.

1 Like

Confusing documentation opened for the documentation question

app crash now here: App crashes when loading project at 20%

One more question, are you creating the project on a computer or on a phone with companion installed?

I created it on Windows 11 in Chrome.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.