Problem Description: I am experiencing a sudden connection failure with the App Inventor Emulator in a computer lab environment (all PCs are equipped with recovery cards/deep freeze, so the system environment remains identical). It was working perfectly last week, but since this week, the emulator connection has stopped responding entirely.
When I click "Connect -> Emulator" on the App Inventor website, there is pop-up prompt from the browser, but aiStarter no action.
Entering http://127.0.0.1:8004/ in the browser returns "Error: 405 Method Not Allowed". This confirms that the port is open and aiStarter is indeed listening and responding to local requests.
Troubleshooting Steps Taken:
Environment Consistency: Since we use recovery cards, the system configuration is identical to last week's working state.
Browser Testing: Both Google Chrome and Firefox fail to connect.
Security Settings: In Chrome, I have already tried:
Allowing Local Network Access in Site Settings.
Connection Logs: Despite clicking "Connect" on the website multiple times, the aiStarter console window shows no activity logs (no GET requests or incoming traffic). It seems the request is being blocked or dropped before reaching the local listener.
Do you see any errors in the browser's console. Normally the first thing it does it try to reach http://127.0.0.1:8004/ping/ and you should see that appear in the aiStarter log. If it's not even getting that far, either something in the browser is blocking the connection, or it's a firewall issue, but as you've tested that last one is unlikely.
I don’t know if this is helpful, but this is from another thread with the same issue:
“Troubleshooting Steps Taken:
If I manually type http://127.0.0.1:8004/start/ in the browser, the emulator launches perfectly. This confirms that aiStarter, adb.exe, and the emulator image are working correctly.
I tested this on the main server, ai2-test, and the code server. The issue is identical across all of them.
The issue persists even in Incognito/Private browsing mode.
The Error Log: When I open the Chrome Developer Tools (F12) and click the "Emulator" button, the request never leaves the browser. Instead, the Console is flooded with the following JavaScript crash:
Uncaught TypeError: Cannot read properties of undefined (reading 'XmlHttp')at O (aiblockly-4334f11839034257aba5b6bdd4c0e9e5fc18bb9b474b02760f65aac9eab4e453.cache.js:2051:123)
It appears that the frontend JavaScript is failing to instantiate the XMLHttpRequest object to communicate with localhost, causing the script to crash before sending the command to aiStarter.
Is there a known workaround for this specific JavaScript error, or is this a bug in the current Blockly web deployment? Any guidance would be greatly appreciated!