Annoying error: Server error: could not upload file. Please try again later!

Because with 23 files the project works perfectly without any error.

Oh, in your OP you said 1.9mb :wink:

And just to confirm, AI2 will happily load your project, in full, just not allow the addition of another file in the Media folder?

Not sure there is much more I can do without getting hands on with your aia project.

At the moment i don't have time to read the whole thread, but have you tried loading the project into code.appinventor.mit.edu? The server hosted at ai2.appinventor.mit.edu runs in Google's App Engine and it puts a number of constraints on the running processes. In particular, there is a hard 1 minute runtime to receiving the project, unpacking it, and storing its files into the datastore. The latter operation is linear in the number of files in the project (each Screen is 2 files), plus a metadata object, plus an object for each of the assets. If you get the error after about 1 minute it's likely that you're hitting that hard limit.

The code.appinventor.mit.edu server runs on our own custom server code running out of AWS. Since we control the runtime there isn't an upper bound the running time, so even if you have a slow connection it should be able to receive your project successfully.

Taifun is there a known limit on the number or on the size of asset files? I will try to upload on the other server, what should be interesting also if a little bit off topic is to know if they differs in source code and what of the 2 is the origin for AI2Offline.

No, I will try, I did not know there were different limitations between the 2. Also if a little bit off topic, as I wrote in the thread, I tested my app also with AI2Offline and it has the same problem.

I haven't looked, but my believe is that all offline versions of App Inventor are essentially a wrapper around a compiled version of the App Inventor sources from GitHub and the Google App Engine development server. The server likely is simulating the same error you'd see in production. Please note that none of the offline versions are provided by MIT and we do not provide support for them.

It was not an error, was the original situation. When I had the problem I also tried to cut some code and some data duplications to see if may help and surprisingly very few modifications cutted the app size from 1.9MB to about 350-387KB.

Yes, you understood well.

Yes, I know, but knowing that the mainteiner uses the code of http://ai2.appinventor.mit.edu explains why both shows the same problem so you gave me a valuable information. Also the http://code.appinventor.mit.edu source code is open sourced and available on GitHub? I found some instructions to install AI2 on local servers and if there are limitations I would like to use the less limited one available on my PC or server if possible. Mainly to be able to work offline and for backup reasons, also running on a virtual machine is a good option for me.

I am accessing http://code.appinventor.mit.edu seems it accepts more files, the only thing strange was that it advises that the project was done with a newer version of AI2 and seems to be right:
Cattura-4 Cattura-5
Is this normal that http://code.appinventor.mit.edu server is not updated as the ai2.appinventor.mit.edu ?

I am not convinced it is a file numbers / timeout thing, given I was able to upload 40+ files (and can still add more through the GUI).

Now try bringing the aia project back from the code server to the ai2 server, does it work now to upload more files?

I would also suggest you try a completely new project and upload files to that. can you get past file no. 23?

No, but as you can see it is currently the case.

I already did but nothing different happened.

I am unable to replicate your issue using the ai2-server at my end. I have tried uploading files to Media 1 by 1 and passed both your 23rd and 32nd image milestones without any errors. (using images ranging from 1.5kb - 100kb)

My previous test of copying 40 images into the unzipped assets folder of the aia then importing that into the ai2-server also worked, and I was even then able to add more images using the AI2 GUI method.

The fact that it works for me is, of course, of no help to you, but it does at least demonstrate that it can be done.

Perhaps try with a different computer/browser and completely different set of image files, if you haven't already....

Do you have time to try to upload my files using your app? I can send them as a zip file that is not a problem, i could send you some more also (always done with the same method) just in case how the app is done may have a meaning. I am using Mozilla Firefox 92.0 64 bits on Windows, my files are png 32bit standard compressed format, done with paint.net At least should be a way to understand where the problem should be. How can I send you a private message here?

I tried the code server, it permit to upload all the files but signals an error that the block area is not downloaded well and looking at it there are 22 errors, most of them are missing procedures or empty events. I could manually enter all the project on it, the block part is quite simple to do but the designer part is quite annoying to do... is there any way to copy and paste or using the backpack or anythng else to speedup the process considering that I would like to try to restart the project since the beginning on it? I suppose that using an older release may permit to export to a newer release without many problems.

This would help to check your files, sharing your aia project would be better because I believe that is where the problem lies....

1 Like

It might be better if you shared your original aia project file that first failed with the Server Error

4 posts were split to a new topic: Server error: could not upload file while uploading large video file