Error uploading assets

When I logged in a few minutes ago, I got a message that my account was migrated a new server.

After this, when I tried to connect to ai companion on my android phone, the connection was stuck at an asset uploading (image attached)

and my phone gave me the following error message (immediately when the progress bar jumped on the the state of uploading the asset):

Unable to load file: https://ai2a.appinventor.mit.edu/ode/download/file/7226656/assets/3dicons-file-dynamic-color-100x100.png

I looked at the link, the file is there.

I worked with this project several times without problem.

The asset is already downloaded on my phone, it is in directory: Android/data/edu.mit.appinventor.aicompanion3/files/Appinventor/assets

It is a 100x100 png file, the size is 10kByte

Note that there are two assets in this project (icons for folders and files), the progress bar is at the stage of uploading the folder image, my phone is complaining not finding the file image.

Can someone please suggest me something to do?

Is this related to the migration of my projects?

In case the problem is related to the project itself (which I don’t think, since it worked fine for several times before), I attach the aia file (it is an unfinished project).

dataStorageUsingTinyDB.aia (37.0 KB)

This looks like a migration issue

Is there anything I should/can do?

Will this be fixed at some point or shall I notify someone directly?

I have assigned your concern to Jeff at MIT who is conducting the migration, he will advise at some point.

Perfect, thank you very much!

I tested your aia. Loaded up fine in Code AppInventor, and works OK with companion (I tested twice). Perhaps try removing the assets from the companion and the project from your AppInventor and test again, loading up your exported aia.

I didn't get an error message, but the image is not uploaded to the assets on Android < 10.

Tested on Samsung Note8, Android 9 (no problem on Android 10+).
@ewpatton @jis

Btw, works fine on the code2 server.

I now tested this on three phones/tablets.

On android 5.1 I get the error message.

On android 9.0 and 10.0 I do not get an error message, but the assets are not uploaded.

It worked fine on all of these before the migration.

I do not know what the code2 server is.

Is it a beta testing server? Do I have access to it? If yes, can you give me a link?

I found the code2 server (sorry about asking without looking first).

I tried and for my android 5.1 I get the same error message.

Of course, they are uploaded:

As I said, it does not work on Android < 10, but it works fine on Android 10+.

Yes, I get the following Error! message on both servers on Android 5:

I believe you that it works fine on your android 10, but please also believe me that something strange is happening on mine.

After clearing the storage of the companion, here is the screenshot of the “read file/directory” screen after first connecting the app to the companion, the icons (which are the assets) are not showing next to the names.

After the second connection, they do show.

I can work with this, but apparently something is going on which I do not understand. It seems that the assets are uploaded but not used in the app after the first connection.

I always delete the Companion folder on my test devices when I start with a new app. So I get a clean assets folder.

I just checked on my android 9 phone (quest) and I get the same strange behavior as on my android 10.

  • after clearing the storage of companion, the first time I connect the app it runs but the asset pictures do not appear where they should
  • the second time I connect the app with the companion, the asset pictures appear

It appears that on my android 9 phone the assets are downloaded, just not used the first time after the storage of the companion is cleared.

I tested it again on Android 9 today, and now it works. Strange.
:woman_shrugging: :thinking:

And also on Android 10 on the first attempt, after I had previously deleted the Companion folder on my test device.

I've looked at the database and S3 storage associated with this project and it looks fine.

-Jeff

1 Like

I am not sure what this means.

There is certainly a problem, which is also confirmed by Anke in his posts.

I cannot connect my project with the companion for android 5.1 and on some newer android operating systems (9 and 10) I need to run it twice before the assets are used. I included screenshots in my previous posts.

This did not happen before the migration.

What may be going on is that ai2.appinventor.mit.edu has a security certificate issued by Google and ai2a.appinventor.mit.edu has one issued by Let's Encrypt. It is possible that some of your devices, particularly older ones, may not trust certificates issued by Let's Encrypt.

If this is the case, then yours is the first time I have heard about this issue, and we have had people using ai2a since last November.

Is there a way for you to try my project (or any project that has an asset) on an android 5.1 or on an android 9 after clearing the companion storage?

For android 5.1 I get the same error message as on the screenshot posted by Anke (message 11 in this thread)?

It is the same error message on the core2 server, too (for both Anke and me).

I am not sure what it means to not trust a security server. I do not get error messages about not trusting a certificate.

Also, on Android 9 and 10 (for me), the assets are downloaded to the phone, just not used the first time they are downloaded.

Both ai2a and code2 have security certificates from Let's Encrypt and run on the same hardware using the same software (code2 is configured to permit anonymous logins; that is the only difference). I've checked, and it appears that only Android version 7.1.1 and newer have support built in for Let's Encrypt.

This post provides additional information and includes instructions on how to install Let's Encrypt's root certificate on older devices.