it won't build my project or allow me to save the aia to my computer

494 views
Skip to first unread message

James Murray

unread,
May 17, 2014, 6:27:04 AM5/17/14
to mitappinv...@googlegroups.com
When building: "Server error: could not build target. Please try again later!"
When exporting, I check the project and click export selected project from the menu.  Chrome says "Waiting for ai2.appinventor.mit.edu..." for quite some time and then appears to just give up on ever getting a response back because the status eventually disappears, and I get no file.

SteveJG

unread,
May 17, 2014, 8:14:21 AM5/17/14
to mitappinv...@googlegroups.com
There are several possibilities here.

1) Is your project larger than 5Mb in size including resources (images, sound files etc.).   Ai2 projects will not compile if the project is larger than 5Mb.
2) Are there coding errors in your project?   Look in the Blocks editor, lower left corner.  There is a yellow and a red triangle... next to the red triangle is there a 0 (zero).   If that is the case fine; however if the number is a 1 or larger the AI2 debugger has determined there is a coding error on the Blocks somewhere on the screen that shows a red triangle.  AI2 will not compile code that has coding issues.

These are the likely suspects.  Are any of these true?

Also, the following (which can be accessed by using the AI2 Browser Help button) may help  http://appinventor.mit.edu/explore/ai2/support/troubleshooting

Regards,
Steve


James Murray

unread,
May 17, 2014, 8:45:25 AM5/17/14
to
Hi Steve,

Thanks for the help.

When you say "larger than 5Mb," that part is easy to check as far as the resources go (816k), but how would I check the size of the non-resource portion of the app?  The resources themselves are not too big.

There is one red flag.  I will try figuring out where it sees a problem and see what it is.  However, it had been compiling in spite of the red warning for multiple builds.

SteveJG

unread,
May 17, 2014, 8:45:16 AM5/17/14
to mitappinv...@googlegroups.com
OK James,

1)There is one red flag.  I will try figuring out where it sees a problem and see what it is.  However, it had been compiling in spite of the red warning for multiple builds.
 Hover or left click on the block that has the red flag (I don't remember which command) and it will post a message that might help you.   I suspect this is the issue.
One thing you can do is right click on the block and select Disable block temporarily and attempt to compile.

To find out file size, you need to build the aia.   Yeah, bummer as you can't do that at the moment.   Build the aia, download to your PC and view the size of the aia file.

Good luck.   Let us know how it goes.

--Steve

James Murray

unread,
May 17, 2014, 9:20:22 AM5/17/14
to
I've got a backup aia from May 5 that is only 488k, and I haven't added anything to it except a bunch of graphics files and not very many blocks, the total of which couldn't exceed the 816k I know the resources consume.  So, we're looking at like 1,500k max in terms of size.

At 3,475 blocks, it's going to take me a while to find this error that didn't matter before.  It doesn't show up at the top level when the blocks are compressed.  :(

James Murray

unread,
May 17, 2014, 9:37:43 AM5/17/14
to
I found the cause for the red warning.  It took less time than I thought luckily.  The cause was that I was making reference to a variable that didn't exist.  I guess I must have deleted the variable at some point thinking it was out of use.  Anyway, I recreated the variable, and now there's no red warning.

However...
I still can't build it, and I still can't save the aia either.  Any other ideas?

If I can just get the aia, I can use one of those personal build servers instead as I start to approach the 5Mb limit.  That's the really scary part.  All of these issues that affect the build server shouldn't really affect just saving off the aia should they?

Hal Abelson

unread,
May 17, 2014, 9:42:07 AM5/17/14
to mitappinv...@googlegroups.com
What is the name you use to login to app inventor, and what is the name of your project?

James Murray

unread,
May 19, 2014, 12:56:57 PM5/19/14
to
Hi Hal,

I log in with amorphite(at)gmail.com.
This project has the name of FantasyTactics_NewMovement.  (The former being the game's name and the latter a naming convention signifying what I was working on.)

Thank you for looking into this.

Hal Abelson

unread,
May 17, 2014, 10:20:14 PM5/17/14
to mitappinv...@googlegroups.com, Jeff Schiller
James,

I don't see your project in the data base.   Are you positive that you sent the right project name?

Do you see this listed on your projects page?  If the project was deleted we're unlikely to be able to get it back.

== Hal


James Murray

unread,
May 19, 2014, 1:19:53 PM5/19/14
to
I have made no changes at all to the project since my last post.  However, I took the aia and tried to upload it to the test server.  The test server refused to accept it.  I have detailed this in this other topic: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/mitappinventortest/gAuqIxPqQl0/HQih8-K1qXQJ

So I went back to AI2 and tried to export it again since I'm being told I must have a corrupt aia file.  It doesn't export it.  It just sits there doing nothing.
Here's something else: I can't save it under a new name either.  It says "Server error: could not copy project. Please try again later!"

Hal, can you help with this?  What do you want me to do?

jeffrey.schiller

unread,
May 19, 2014, 2:49:08 PM5/19/14
to mitappinv...@googlegroups.com
So the project exists now in the production AI2 server or in the test server? I can look at it directly to see if it is in good shape or not.

-Jeff

James Murray

unread,
May 19, 2014, 2:50:38 PM5/19/14
to mitappinv...@googlegroups.com
Yes Jeff, it's there.  Thanks for taking a look.

jeffrey.schiller

unread,
May 19, 2014, 3:16:41 PM5/19/14
to mitappinv...@googlegroups.com
So I found your project. The problem is that you have 722 files as part of your project, most all of them images. App Inventor is layered on top of Google's App Engine and App Engine incurs a cost (in terms of time) for each file and there is an overall limit on the total amount of run-time permitted for each request. With that many files, it cannot upload or download a project within the time allotted. Stand alone versions do not have this limitation.

If you have copies of your images (assets), I can extract the blocks files and put them into a smaller project.

-Jeff

James Murray

unread,
May 19, 2014, 3:34:46 PM5/19/14
to mitappinv...@googlegroups.com
Thanks Jeff.  Ok, that explanation makes sense to me.  What I'll need to do then is use a stand-alone version from now on.  I haven't used AI2U yet past just installing it, so I'm not stuck to it yet.  Do you have a suggested stand alone version?  I am open to suggestion.

Another way I could deal with this limitation would be to host all my graphics and download them inside the app.  I'm trying to avoid needing to host anything though since that can get more expensive the more successful your app becomes, so it's good I can still keep building if I'm using a stand alone version.

If you wouldn't mind extracting the blocks, that would be very nice of you.  Do you think if I deleted my graphics and tried to save off the aia that would work?  Or are you doing it a different way?  I have backups of every resource, so it's ok to delete them for the purposes of saving the block work.

M. Hossein Amerkashi

unread,
May 19, 2014, 3:39:35 PM5/19/14
to mitappinv...@googlegroups.com
@James - You could also take a look at my stand-alone version HERE. I have brought it in sync with MIT AI2 May 18th release.

-Hossein.

James Murray

unread,
May 19, 2014, 3:43:17 PM5/19/14
to mitappinv...@googlegroups.com
I am downloading it now Hossein.  Thank you sir!

James Murray

unread,
May 20, 2014, 8:55:26 AM5/20/14
to mitappinv...@googlegroups.com
So Jeff, I'm just staying out of there until I hear back from you.

Enis

unread,
May 20, 2014, 12:56:57 PM5/20/14
to mitappinv...@googlegroups.com
Actually James, you can use other techniques to get those files into your app on first run...

Here are some solutions from Hossein & Taifun on Taifun's pages: http://puravidaapps.com/filebyfile.php



James Murray

unread,
May 20, 2014, 1:38:48 PM5/20/14
to mitappinv...@googlegroups.com
That's an interesting way of doing it.  I'm not sure how I feel about hardcoding 700 to 1400+ blocks though.  It looks like when you make the listFilename variable, you have to make a list of every file you want to download.  That means dragging new list blocks to make the "make a list" 700+ items long and then creating 700+ text blocks with the unique file names.  About 1/4 of all the blocks in the app would be dedicated just to instantiating the assets.  The speed would surely suffer as well.  Plus it's still got to pull it from somewhere, which means web hosting (though that bit about Google Drive may get around that concern, but I wonder how Google Drive handles a lot of requests at once).  Thanks for the idea though.  In a smaller project, that might work.

Taifun

unread,
May 20, 2014, 1:59:25 PM5/20/14
to mitappinv...@googlegroups.com
well, downloading 700-1400+ files will take its time...

but with a little bit of server logic you can get a list of all filenames in a specific directory on your server, then just use this list instead of hardcoding the list in App Inventor...

Taifun

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

James Murray

unread,
May 20, 2014, 2:08:49 PM5/20/14
to mitappinv...@googlegroups.com
That's a really good thought.  If I start to push up on 5Mb, I will take your suggestion.  Thank you for it!  For me though, the issue was the number of files rather than the size, and I'm satisfied with the workaround of using Hossein's local version of AI2.  At this point I'm just waiting to wrap up with Jeff.

M. Hossein Amerkashi

unread,
May 20, 2014, 2:10:49 PM5/20/14
to mitappinv...@googlegroups.com
+700 media files is A LOT of files. Maybe you could re-visit your design to see what could be changed to reduce it.

-Hossein.

James Murray

unread,
May 20, 2014, 2:34:09 PM5/20/14
to mitappinv...@googlegroups.com
The bulk of those are for character animations.  Each frame of animation for each character is in its own file.  I wasn't sure how to parse a spritemap in AI, so I just hacked up all my sprites into individual 32x32 files.  That allowed me to use a naming convention like c1b1, c1b2, c1b3, c1b4, which are the walking sprites for character 1 when he's facing up.  So I can use a counter variable with the naming convention and a clock to making my characters "move."  They also do other stuff, and there are animations for objects and eventually the background too.  I could try to eliminate duplicates from the sprite patterns, but then my counter system wouldn't work anymore.  It would go 1, 2, 1, 4 instead of 1, 2, 3, 4.  I think the workaround would make more blocks than the problem.

James Murray

unread,
May 27, 2014, 6:09:25 PM5/27/14
to mitappinv...@googlegroups.com
For anyone who's interested, it let me export it after I deleted 368 of the assets.  Thanks again for the help everyone.

M. Hossein Amerkashi

unread,
May 27, 2014, 6:18:19 PM5/27/14
to mitappinv...@googlegroups.com
That is a LOT OF assets!

-Hossein.

Enis

unread,
May 28, 2014, 3:36:01 AM5/28/14
to mitappinv...@googlegroups.com
You know James... you mentioned up above in response to my post that while teh loading of files on first run was a nice idea, you didn't want to create 700+ blocks.

WHY would you be creating 700+ blocks anyway?  Just make a csv list, read it into a list, and cycle through the list... 10 or so blocks total!

I will tell you that if I downloaded an app that wanted to bring 50MB of files with it, I'd delete that puppy incredibly fast from my system.

Why could you possibly need that many assets?

Taifun

unread,
May 28, 2014, 10:23:42 AM5/28/14
to mitappinv...@googlegroups.com

James Murray

unread,
May 28, 2014, 1:23:48 PM5/28/14
to mitappinv...@googlegroups.com
Enis, videogames are big.  I don't know where you got 50Mb from, but the total of the 700+ files is still under 3Mb.  This is not a size issue.  This is an issue with AppInventor failing to deal with a large number of assets, all of which need to exist.  If you have ever played a videogame, you have files for each frame of animation.  700 files, in context, for a videogame, is a tiny number of files, particularly when they are all less than 1kb each.
Reply all
Reply to author
Forward
0 new messages