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

That can be true for desktop applications but the Android and iOS platforms change frequently and are interdependent on both the distribution services and the Devices they target, so the use of previous release builders is negated.

Does not matter, there are professional apps running on certain devices that have to work at least for 5 or better 10 years without modifications, we realized app for energy companies (oil, gas, electricity etc.) that asks to have portable devices to read counters or service/maintenance applications, others in security field and so on. And we do not distribute these apps via Apple or Google services... only italian government does (stupid) "professional" apps distributed trough them...

I prefer to say honest and direct.

So you think it's OK to be abusive to the person who was helping you? In the middle of the night (3am)?

Well... "abusive" seems to be too much and the time is relative, depends where we are working/living and what is our work time. I prefer to be clear and also that anyone be clear with me rather then be not understood. Continuing on the line AI2 versus AI2Offline has no meaning, both are tools, we may use both or just one but anyone saying that he is comfortable to work only with the online version has a limited vision about how many problems may arise following that theory and did not understood what backup means, not the word, the practice. Anyway I feel comfortable with my vision and I am not interested to spread it, I am not an evangelist, everyone may experiment how many problems he wants, I prefer to prevent them so also when I choose an "educational" tool I follow my path.

You forget that I might work with AI2 not every day, I might work using it for a couple of months and then I might not use it for a year. It is quite a normal situation here.

They are 2 possible options. In my opinion if the app is not too big the balance between advantages/disadvantages is on the side of mutiple VerticalArrangements. The app where I have the problem discussed in this post was originally thougth to be done with multiple screens and then was developed with multiple VerticalArrangements.... yes there are some things to analyze better as duplications, how to pass data between screens, using databases (expecially TinyDB), action bar(s) and so on. The main limit I see to use screens is that there is no way to share data (it is possible using DB and pass the data from the caller and the called screen) and code (I do not know and I do not find a way to do, the docs seems to say that the code inside a screen is private to that screen) among them.
So, actually my approach is opened to use both. I think that a screen may have multiple "pages" inside and the pages may be realized using VerticalArrangements or any type of "container" that may be enabled/disabled so that it is not possible to have more than one container active and visible. This approach permits to use multiple screens also, the only rule is that only one screen and only one page of that screen may be active at the same time.

Unfortunately in this case copy and paste the screen (I have only Screen1) does not work. Simply it does not paste anything, after the copy and paste the Screen1 on the destination project is empty. To be sure that is the real result I tryed to repeat the operation with less files uploaded and I found that the highest number of files that works is the same as if I add them in having the complete project. So, generally speaking, copy and paste works until I do not exceed the limit related in some unknown way to the uploaded files.

I agree with you: AI2 SHOULD be able to handle dozen or more small files in the media folder but seems it does not. Also your idea was very good and simple to do but unfortunately does not work. Surely it is a quicker way to update the project than upload many files one by one but returns this error: Server error: could not upload project. Please try again later! As always I tried many times and also using AI2Offline but with the same results. If the problem is related to the app size or to the size reserved to the assets I think there is no much more to do at the moment apart contacting someone at MIT development team to understand better the situation. Instead, if it is related to the number of files, the last thing coming in my mind is to use a DB as SQLite for instance and upload just the DB. The aia file is only 354KB in size so I am quite surprised to have this annoying problem.

I ran a test, adding 40 images of less than 100kb each to an aia project. The project was 1.1mb in size.
This was imported successfully on the production server and opened up OK in AI2, and successfully compiled as well.

Shows it can work. Are you certain your project is not corrupted in some way ?

You could share it, by Private Message if you wish, for testing.

1 Like

This is a good news, it means there is a solution. Yes, the project is not corrupted with 0 warnings and 0 errors. It is a little project, I had only little problems related to how realize some features but it took really few hours to see it working without setting the "look and feel" part. After I see it working well I start to implement how it looks so no change in the code apart uploading images for the buttons and associating them to the buttons... nothing more...

too many assets is a known issue, see also

as workaround you can try the code server http://code.appinventor.mit.edu/ which does not have these Google limitations

another workaround is to put your assets into a zip file, add only the zip file into the assets and unzip the file in the ASD on first run of the app... this extension can help: App Inventor Extensions: Zip/Unzip | Pura Vida Apps

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

How do you know this ?

How many asset files in your project ?

But that link only shows that the user had a project that was too large (44mb) in size for the server (max 30mb). I do not disagree that there have been instances where having a large number of assets has caused problems. The OP only has an aia project size of 1.9mb.

:sweat_smile:
see this for example old Google Groups thread https://groups.google.com/g/mitappinventortest/c/vHM1hWp5AT8/m/XgOvcvp4BQAJ

EDIT: see also this statement by @ewpatton https://groups.google.com/g/mitappinventortest/c/FUqaR2roqlk/m/LjZPEjW0AAAJ

There's a hard limit at 10 MB per project to send it to the build server. This is enforced by the Google App Engine runtime--if we go over, it will kill the transfer. Another challenge is that a project with many files (screens + assets + extensions) will take a long time to load out of Google Cloud Storage. There is a hard limit of 1 minute runtime so if there are too many files then that can end up killing the transfer to the build server as well. If you are running into problems at ai2.appinventor.mit.edu you can try loading your projects into code.appinventor.mit.edu and try there. The latter server runs at Amazon rather than Google and so doesn't have the same restrictions.

Taifun

1 Like

This is why I have asked the OP for the number of asset files, we then get a feel for the problem. :slight_smile:

1 Like

I know this is a debated point but the problem arises also with AI2Offline that is nb187b so a little bit outdated (end of August) and AI2 the beginning of September.

The problem arises with th 24th file I tried to add, I mean 23 files were already uploaded and I added the 24th.

From what you say, your average file size is @ 65kb, unless you have one or more really big files, and lots of small ones? If you have a really big image file in there, try removing it...

There were 23 files already uploaded. I was not able to upload the 24th but this happened some days later.