2017년 8월 3일 목요일

AI2 page doesn't load correctly and AI2 bug pop-ups


I have a couple of classes starting with AI2 and have roughly half (10 students) in each class where the ai2 page http://ai2.appinventor.mit.edu/ loads but with no content, just the grey background.

I also have about ten students in each class who keep receiving bug pop-ups when they are doing anything with connection, via ai2 companion, reset etc.

These two issues are catastrophic in terms of being able to complete the class. Suggestions on methods of solution very welcome.

--
Does each student have a separate log in account to use?

What you see might be an issue with the ability of the school network to support 20 students simultaneously.  ALL the students are using WIFI?    Have you considered using the emulator?

Are the students that can not get a load with content always the same students?  If they are, this might be an issue with the version of Chrome installed on those PCs, make sure all versions of Chrome are the same.  Another possibility is to try Firefox on those PCs.     If it is different students, are these the students that log in later (I am guessing students who log in first might have no issues and those logging in later do have issues...is that a possibility?).  I would check the browsers and see if they are updated, I would also clear the browser cache, doing so sometimes clears up issues with the AI2 browser interface.

Bug-pop ups when doing something with a connection:  this is something that could be related to their projects.  Do these students have lots of buttons, images and Layouts?  Projects that have MANY objects load slower.

Here is my standard comments regarding connections, most apply to using WIFI , the emulator, USB and compiling an APK:

One of the following  possibly applies to your code (all may not apply to your code):

1)  You have coding errors in your blocks.  In the Blocks editor, look in the lower 
left corner of the window for the yellow and red triangle icons. If the red icon has a value larger than 0, 
you have a serious coding error.  Find the block in your code that has a red triangle and 
fix it.   Red triangles always inhibit creating an apk or running a project in the 
emulator or possibly creating an aia file.     Yellow triangles are more forgiving, 
however, sometimes, these need to be fixed because they trip an internal warning and not filling puzzle piece sockets that are left un-filled can sometimes cause issues if the app needs a value that is not filled.

2) Your source file (the aia file) is larger than the 5Mb limit allowed in AI2 (the aia can not be larger than 5Mb). You may have put images or other resources in your Media (resources) that you do not use in the app. 
 All the images and sounds in resources count toward the 5Mb limit along with the source code.    You can program 
apps larger than 5Mb in the browser, but the apps will not compile and might not run in the 
emulator or the project may not save as an aia. If this is the case you need to reduce 
the size of your image and/or sound files.   Most image files can be made quite small 
by resizing them using a photo manipulation program on your PC to less than 50Kb each.

3)  You might have more than 10 Screens in your app.  AI2 becomes unstable when more 
than ten screens are used.  Projects CAN be built with slightly more screen but then you should expect your app to occasionally behave erratically.

4) You might have set a Screen icon in the Designer Properties for your project that is too large. Use an image 
sizeof 48x48 px or 96x96px instead and only use jpg or png images.  *.ico files are not 
supported.  The 'icon' (actually an image) can be as large as 520x520 (I think that is the size GooglePlay apps require).  The smaller 'icons' work fine otherwise.

5) You did not code the entire project using App Inventor 2.   If you used one of the 
third-party AI2 clones,you might not be able to load a Project into the AI2 compiler or 
create an apk with the standard AI2.

6) If you incorrectly modified the project's Manifest files using a third-party tool, you may have issues.

7)  Sometimes, if you have LOTS of Layouts on a single screen,  the apk might not 
compile. How many is a lot?  I do not know, keep adding layouts and buttons, compile and try again...when the server crashes, you got a lot.

8)  The network you are using may be overloaded (possibly a school network), or you have other applications running in the background on your computer, or your virus checker is doing a scan.  Sometimes, just trying to access the MIT server a few minutes later will give you a more favorable response.

9)  If you have BlueStacks on your home PC (BlueStacks is a special emulator that allows Android apps to run on a PC).  The Google emulator on AI2 cannot run unless BlueStacks is disabled and all of the BlueStacks processes are shut down.  On a Windows PC, you use the Task Manager to 'kill' running processes.

10)  Are you using Sensor controls (except for the clock)?   Most Sensor controls or controls related to sms or the phone do not work in the emulators.  They need to be tested on a device.

11) If this is an issue about the Project loading slowly on your device or on the emulator:  Be aware, the more images, layouts, components you have on a screen, the longer it takes for the emulator and Companion to render the graphical screen.  How fast the emulator renders is partially a function of your hardware...how much ram you have, your cpu clock speed etc. Sometimes, with lots of graphics, the emulator will just give up.   Can you develop live using WIFI or using USB? These options almost always render faster than the emulator but will not be at lightning speed if you have lots of graphics.  Be patient.

12)  This happens too:   We have seen instances where it is probable the Google Cloud messed up; other instances where an older PC has had memory issues and caused file corruption of the Project and instances where a user is using a very slow Internet connection (like dial-up) and it is just too slow.

13)  Do you have an AVG, Eset or AVAST virus checker.  Some versions of these products have been reported inhibit running the emulator unless (in the case of AVG) the Advanced Link settings on the software are set to allow AI2 communication.


14) Get the error:  The blocks area did not load properly. Changes to the blocks for screen xxxxxxx_Screen1 will not be saved.
One users had this error, he had too many comment boxes exposed at once for the browser to handle.  Try minimizing all blocks,
and opening in another browser,like Chrome or Firefox.

16)  Having issues getting AI to run at all, perhaps your firewall is blocking.  Don't turn your firewall off, just allow AI2.

Perhaps none of these is the issue.   Tell us if anything applies and works and especially tell us what you tried and did not work.  Someone here will try to get ALL your students up and running but you have to answer questions because we cannot 'see' your equipment working (not working).

--
Thanks SteveJG for your reply and notes on the commented issues. I realized in my hast to reach out for some assistance, I didn't give very clear information about my situation. Here's a attempt to give some extra information about my set up/situation:

Situation
- School is located in Vietnam. Has very good IT infrastructure - virtually best in Vietnam. However, Vietnam is experiencing very slow internet as a result of a break in the international line through Hong Kong. We are hopeful that bandwidth will be restored during the week of January 30th. The school's internet provider has prioritized our traffic and clearly we have (at the moment) better access than home users to international sites. I am still able to stream audio and watch youtube videos at HD. At home, I could barely watch a youtube video at home, even at 240p!
- I have 2 classes of max 23 students.
- No other classes on campus are accessing AI2.

Teacher set up
- I have a Mac. I tested in Dec 2014 (on my Mac) at school, on the same network the students would use... the set up instructions, network connections and beginner 'I have a dream' app on my Mac machine (along with about 6 other apps build) using up to date Chrome. Other than the occasional need to reset the connection (for AI2 companion via wifi) when testing on a phone, I didn't have any problems.
- The teacher Mac I have does not have the web filter that is installed on the students machines (I was unaware of this until today). I'm working with IT to see if this is the cause of the different experience.

Students set up
- Laptops are new Fujitsu Lifebook T Series running Windows 7 Professional, Chrome (Version 39.0.2171.95 m)
- All students are on a school WIFI network. Not the primary network, but our guest network. Students have their own individual login and password for the 'guest' wifi.
- Students are using Chrome profiles to only have one google account for each profile.

Issues:
1) http://ai2.appinventor.mit.edu/ page content doesn't load. Only grey-textured background appears. 
Experienced by roughly 10 students each class, different students each time. Even in one lesson, a student had the page loaded and then went to re-fresh the page and the content wouldn't load any more. 
Students tried clearing cache/browser data etc, restarting machines, using Firefox... without luck.
This is a major issue, as nothing can be done if the AI2 page doesn't load and only about 10 students can do any work. 
I will try to get them to log on in groups of five in the future, but I just borrowed a student PC machine and can't even get the page content to load, and there's no students in class accessing the AI2 site at this moment. Just me.

2) Pop-ups reporting ai2 had a bug when trying to connect with AI2 companion, emulator and reset connection.
Experienced by about 10 students each class, different students each time when trying the activity, "I have a dream" using the .aia starter app, before they had gone to the blocks editor to add any blocks. Their apps were very basic, ranging from nothing in the app (just linking first time via AI2 companion), to having one image, label and media player.
Students tried, refreshing the page, closing Chrome, using Firefox. 

3) http://ai2.appinventor.mit.edu/ blocks page content doesn't load completely. Blocks and viewer 'frames' appear, but have no content.
Experienced by 2 students in the latest lesson.

4) When connecting to phone via AI2 companion, app button images do not appear. 
Button functionality still works though. Experienced by about 8 students across both classes. I just got them to ignore the issue and continue. This is the only issue involving the AI2 companion app via WIFI.

5) When importing project "I have a dream" .aia from computer, server error occurs.
Experienced by 1 student. 

I have been unable to replicate any of these errors on my Mac, but got the first major issue (page content won't load) the first student machine I borrowed.
I know how difficult it is to help when you can't be here to see it live, so any assistance/time given is greatly appreciated.

--
UPDATE: My IT department believe they have identified where the issue is occurring. Apparently, it's occurring as a result of the webroot proxy server that filters our web. However, they are not sure why some students are affected and some not. They are apparently seeking to have the AI2 website added to the 'bypass list', so it won't go through the proxy, but directly to AI2 site.

--
Thank you for the update Stefan.   I suspect your IT has found the issue ...that along possibly with diminished Internet capability.    Let us know how this works out.  Appreciate your recap of the school's situation.

--
I am discussing parts of your issues with MIT.   Here is what I learned; it may be helpful to you guys with Chromebooks:

Chromebooks should be able to support App Inventor  provided you use a physical device.  MIT is going to add that information to the documentation on the site.

Chromebooks cannot run the emulator, yet  although LINUX PCs can.  MIT has a plan for how to make the emulator work on a Chromebook, but it's not yet moved to the top of the list for development.  Maybe in a couple of months.

So, perhaps for next term the Chromebook may be able to work with a Chromebook in addition to developing using WIFI on the devices.  

--

댓글 없음:

댓글 쓰기