Exporting the AIA file isn't working (or the import is broken?)

397 views
Skip to first unread message

mtnerd

unread,
Apr 22, 2017, 4:06:49 PM4/22/17
to mitappinv...@googlegroups.com
We're working on the Technovation Challenge and the apps will be due on Wednesday, so I figured I better test the export system to make sure it's working.  (The projects need to be exported to .aia files.)  Wouldn't want the girls to be exporting empty files for the judging.

I created a single screen project which pulls data from a Fusion file and displays it on the screen. There are no image files.  Just labels, a button and a couple listviews.  I exported the project to an .aia file, transferred it to another laptop and then tried to import it into another MIT App Inventor account. (Similar to what will probably happen with when the girls upload their project .aia files to the Technovation website and then the files will be downloaded and tested by the Technovation judges.) 

It's not working.  The problem is that when I try to import the .aia file into MIT App Inventor, I get an error message "Server error: could not upload project. Please try again later."  The file exports to 8K.    I've been trying again for over an hour.  There are no errors or warnings on the block page.  I found some documentation that said if the server error comes up repeatedly, there's a problem with the export system. 

What can I do to make this work? 

Feeling desperate,
mtnerd

Taifun

unread,
Apr 22, 2017, 4:37:14 PM4/22/17
to MIT App Inventor Forum
When I try to import it on another login, the system says there's a problem with the server, try again later
for large project you might want to use this server code.appinventor.mit.edu

see the following general tips and in your case especially #1 and #2

  1. Use different screens wisely
    Before starting to create another screen, first you should think about is it really necessary? See also Building apps with many screens and SteveJG's post about advantages/disadvantagesbecause in only one screen you also can use vertical arrangements to simulate different screens, just set the arrangements to visible = true/false as needed... See also Martyn_HK's example about how to use Tabs in App Inventor and another example from Cyd
          
    The recommended method of switching screens in App Inventor

  2. App Inventor works best if you use images whose size matches the size you want them to appear on your screen. If you import larger images into your app, your app may run out of system memory. Using Images with App Inventor

  3. Avoid redundancy
    Probably it helps to read chapter 19 - 21 in Dave's book http://www.appinventor.org/book2 to get an idea how to do DRY programming with App Inventor - Don't repeat yourself 

  4. See SteveJG's monster list of tips and tricks

  5. How to overcome the App Inventor project limit of 10 MB

  6. Backup your project frequently
Taifun

Trying to push the limits of App Inventor! SnippetsTutorials and Extensions from Pura Vida Apps by  Taifun. 




mtnerd

unread,
Apr 22, 2017, 5:03:46 PM4/22/17
to MIT App Inventor Forum
Thank you for the advice Taifun.  We've been warned about the screen quantity limitation and have designed accordingly.

The file that I tried to export/import was a one screen test with no images.  So project/image size is not the source of the problem.  The screen is linked to a Fusion table, but it would be very odd if that was the source of the problem.  It would also be a disaster as these projects need to have external data sources.  

I'll keep looking for a solution.  
mtnerd

SteveJG

unread,
Apr 22, 2017, 6:18:05 PM4/22/17
to mitappinv...@googlegroups.com
The comments provided are not helping us provide specific suggestions mtnerd.

You said "The file that I tried to export/import was a one screen test with no images." ... what kind of file did you try to export / import and from where?  Are you creating an aia file  or something else?  You said a one screen test ... was this just a part of your larger app?   If you have multiple screens, you may have serious issues.

You said " So project/image size is not the source of the problem."  OK but if your app has lots of layouts, especially embedded in one another, that design can ALSO create issues.  However, we cannot see your code and you did not provide any blocks so who knows?

You said "The screen is linked to a Fusion table, but it would be very odd if that was the source of the problem."   Why would you think that?  Issues can occur anywhere.

You said "these projects need to have external data sources"  ... what type of sources are they linking to?  Web pages, Google Spreadsheets, DropBox or just to a Fusion Table?

Taifun provided a lot of general advice.  Forum members are willing to help but you will have to provide more information.

Even though there are several app development competitions going on at the moment and lots of schools are finishing final projects, the load on the MIT build servers seems high but there is some free space.  I .  I just checked and will see if I can find someone at MIT.  The probability your inability to build a project is something in your Project code.   Just so we are straight, is the problem than you cannot compile the Project or that the compiled Project cannot link to your external data sources?  When you link, how large and what type of file are you linking to

Regards,
Steve


Hossein Amerkashi

unread,
Apr 22, 2017, 6:25:46 PM4/22/17
to MIT App Inventor Forum
Are you able to export import your other apps?

If yes, its possibly corrupted file.

If okay with you, can you share your .aia so that we check it?

Hossein.

Susan Clarke

unread,
Apr 22, 2017, 6:26:17 PM4/22/17
to MIT App Inventor Forum
We are doing Technovation challenge too and I have tried so many suggestions from the forum and to no avail. I either get a YAIL message or a server message file is under 4 Mgs 
Sometimes I get 95%, once even 100% but it still failed to build. Then the next time 10% I have 10 screens, small amount of coding, I made a smaller icon, deleted extra media images, removed all images and put back in. Very new to this.
Desparate and so frustrated. Don't want to disapoint the girls and our school.  It's for fair trade. I am sending code Can anyone help?
Tried it at home on my laptop and at school.   Are there some other websites that convert aia to apk?
Thanks
-Tired Mom
april24.aia

Taifun

unread,
Apr 22, 2017, 6:32:41 PM4/22/17
to MIT App Inventor Forum
@Susan: you forgot to follow the image recommendations...
App Inventor works best if you use images whose size matches the size you want them to appear on your screen. If you import larger images into your app, your app may run out of system memory. Using Images with App Inventor
it probably would have been a good idea to start a new thread instead of hijacking another one?
Taifun



SteveJG

unread,
Apr 22, 2017, 6:43:22 PM4/22/17
to mitappinv...@googlegroups.com
@Susan ... in addition to Taifun's comments , are you aware this Project is not closing screens properly after opening them?

see his suggestions:

Use different screens wisely
Before starting to create another screen, first you should think about is it really necessary? See also Building apps with many screens and SteveJG's post about advantages/disadvantagesbecause in only one screen you also can use vertical arrangements to simulate different screens, just set the arrangements to visible = true/false as needed... See also Martyn_HK's example about how to use Tabs in App Inventor and another example from Cyd
      
The recommended method of switching screens in App Inventor


also your hopfulness.png used as the screen icon is  204 x 204 pixels ... this NEEDS to be  48 x 48  ...this error alone will prohibit your app from compiling.

mtnerd

unread,
Apr 22, 2017, 7:40:09 PM4/22/17
to MIT App Inventor Forum
Hi Steve,
I see your point - definitely didn't provide enough information in my initial post.  I've edited the post so that new readers won't wondering about the same issues you've address and will address them here as well.  
  1. I'm trying to export/import an .aia file from/to MIT App Inventor.  I exported the file, mailed it to another google account.  Downloaded the file on another laptop and then tried to import it on that account.  (Used one google account to export, another google account to import.  
  1. I created a single screen project which pulls data from a Fusion file and displays it on the screen. There are no image files.  Just labels, a button and a couple listviews. 
  1. It just seems odd that the variables involved in connecting to the Fusion table would create a problem that would obstruct the App Inventor from importing the .aia file.  Sure, issues can occur anywhere but if the code works on one system with no warnings or errors, would the Fusion table variables be a likely cause of the problem?  
  2. The projects are supposed to link to external sources such as Google maps, calendar, etc.  However, this particular example is only linking to the fusion table.  
I'm not trying to compile the project, just transfer it to another MIT App Inventor account.  That's all we're required to do for the project.  (I know the project is compiled on the fly when we run it through the emulator - there are systems that let the user see the app on an android phone or run an emulation program.  That works fine.) 

The problem is that when I try to import the .aia file into MIT App Inventor, I get an error message "Server error: could not upload project. Please try again later."

I hope this fills in the blanks I've left in my original post.

Thank you for your guidance,
mtnerd

mtnerd

unread,
Apr 22, 2017, 8:07:18 PM4/22/17
to MIT App Inventor Forum
Okay, I've got it working!  Steve & Taifun - your links and advice made the difference.  I rebooted the laptop, cleared out the tabs (although there was no music/streaming video on any of the tabs), tried it again and it worked.  

Steve, your Monster List of Tips & Tricks is a terrific resource.  I'm worried that at least one of our teams will have some problems because of image sizes, and other issues covered in your List.  But at least we'll know where to start fixing.  

Susan, as a Mom and Mentor on this project, I'm okay with your frustration and participating on the thread.  I hope the information provided was as helpful to you as it has been to me.  

THANK YOU ALL!!  Now to move on to the next part of this program!

mtnerd

SteveJG

unread,
Apr 22, 2017, 8:09:46 PM4/22/17
to MIT App Inventor Forum
1)  At the moment there are some MIT build server issues.  Asmall project aia transferred by email as you say should not be an issue. for the person on the other side to upload on to their Designer. I currently can build with no issues and download an aia. I frequently build aias then email them to others and that works fine.  What you do should also work.  

Try this:   build an aia for   a Project and download it to your PC..    downloaded.aia  for example.   Now rename this to something like testAIA.aia  and now important the aia into your Designer.  Does that work?

   --you said you get the  Server error...please try again later  ... MIT is currently experiencing apparent heavy loads on their servers and are looking at the issue.  At my location I can build with no issues on the few test cases I just made.   So just   "Please try again." as the error message indicates.   It may be as simple as that.

Just to be sure ,   try building a simple NEW Project.  Call it newProject   .   It is simple, just place a button on the designer screen.   Now create an aia.  Can you create the aia?   Now try to reload it into your Designer after renaming it.  Does it work?

Thanks for the additional info.   Ordinarily what you say about your Projects should not cause severe issues, so please run the test .. it will help figure out what might be going on.

-- Steve

SteveJG

unread,
Apr 22, 2017, 8:20:23 PM4/22/17
to MIT App Inventor Forum
Thanks for the heads-up mtnerd.  Glad all is working.  Sometimes a reboot will work miracles.  The other magical cures are to change Browsers ...these may be indicative of caching issues and the browsers messing up..they just sometimes work wonders.

In my opinion there are three danger areas for students finishing Projects:
1) Images too large  -- may inhibit compilation and causes issues with compiled apps when loaded on a device.
2) Using a custom Screen1 icon  larger than 48 x 48 pixels  - will prevent a compile on its own
3) Switching screens without closing them properly on moving to another screen -- will eventually cause the nice app to crash because of un-freed memory.   It runs out of memory used by the operating system.

Good luck with all the projects.

-- Steve

mtnerd

unread,
Apr 22, 2017, 8:36:02 PM4/22/17
to MIT App Inventor Forum
You're right, your 3 issues will be hotspots for the getting the projects to the .aia format.  When I read the Monster List, I realized that.  We've been working in a bubble and weren't warned about those significant issues.  

I shared a large portion of the information you and Taifun provided to the Slack channel for Technovation Mentors.  It may keep some of the students and their mentors from going nuts this weekend!!  

SteveJG

unread,
Apr 22, 2017, 8:45:12 PM4/22/17
to MIT App Inventor Forum
We understand.  Every year about this time we are flooded with 'panic' requests.

The other thing many programs forget to teach their students is to frequently save aia files of their project.  App Inventor has no unDo feature and often developers, in a frenzy to finish what might be a great project, get tired and make a stupid mistake, and then cannot get back to the 'good' version.  Save aias frequently...my rule of thumb is one for each hour of programming so when things go wrong, there is a safety valve.

Also frequent builds avoids the sometimes reality of discovering that the Project runs in the emulator or Companion/device but does NOT compile...better to discover an issue as soon as possible.

Feel free to share all the forum free advice.  Several very experience programmers answer questions and provide help here.

mtnerd

unread,
Apr 22, 2017, 9:02:54 PM4/22/17
to MIT App Inventor Forum
I'm copying and pasting your last post right now!  It may save some team a world of hurt!
Reply all
Reply to author
Forward
0 new messages