String IndexOutOfBounds Exception while using extensions in companion app

Is camerabase64 still working? I receive extensions.java.lang.StringIndexOutOfBoundsException: start 1

Working OK here in companion app 2.73u on Android 15

Still get run time error on android 13 and companion 2.73, try to download the extentions several time from different browsers and reinstall companion app but nothing changed :upside_down_face:

image

Can't generate that error here

Try this companion version

Taifun

Try with other version of companion (272d4), reloading browser (even with other browsers) not worked. with any external extention I will receive the same error. Just give up on using this tool anymore. Thank you for help

You are saying you get the error with any extension you try ?

Let us check a few things:

Device Make and Model ?
Android 13 (you already said)

Can you provide the aia project where this generates the runtime error, or make an example one that demonstrates the same behaviour ?

I have added Ullis Roboter Seite 'AI2 UDP Extension' to a project and I received the error "Unable to load extensions.java.lang.StringIndexOutOfBoundsException: String index out of range: -1" when i tried to use The Companion on a simple app with only a label and the extension. When the extension was removed, it worked.
I also tried using extensions 'com.KIO4_UDP.aix' & 'p299K_UDP_v2.aia' on the examples by Juan_Antonio and also with simple apps, I got the same error message whenever the extensions where included.
I tried the Ullis example app 'UrsAI2UDPTest' with the Companion, again, with the same error.
When I built the example, and uploaded it, it performed well, but, I am still receiving the same errors whenever I try to use The Companion on the example.

Which Android device and Android version are you using for your tests?

Did you try

Taifun

I tested these apps using Companion 2.73u on both an Android 13 and 10 with appinventor on Firefox 128.4esr(64) with Debian 12.
I have downloaded the version 2.72d4 with the link that you provided and the same error was shown as it was with the 2.73u Companion, and I then built the apk for the example and it worked well, but the Companion(s) still gives the error

Which devices are you using for your tests?
Taifun

I have tried it on both devices

Just tested my cam64 extn demo app on Google Pixel 4a, Android 13 with companion 2.73u, and get the same error:

Unable to load extensions.java.lang.StringIndexOutOfBoundsException: start 1, end 0, length 0

Does not then load the app in companion. So it seems not a device specific issue, but a bug in companion 2.73 on Android <14 ? Also tested on other aia projects with extensions, getting the same result.

[EDIT - also tested on my Genymotion Emulator, which runs an Android 12 Google Pixel 3XL. This also fails to load an aia project with the same error.]

[EDIT - Compiled app works OK on these devices]

2 Likes

Even adding the extention without any block returns the runtime error in companion.

@MikeTemp and @F_H
Are these Sansung devices?

Taifun
(using a Samsung A54 running Android 14 and do not have that issue)

My Android 10 is a Samsung Galaxy S9 SM-G960U
My Android 13 is a Galaxy A71 5G SM-A716U1

1 Like

Today on android14 I noticed that resources are not being sent to companion. Although yesterday everything was fine on 2.73

I try on Samsung S20 FE 5G SM-G781B/DS. The problem still exists but not limited to only this. Lets see if this one resolves first then taking care of other issues.

Error adding extension: Unable to load extensions.java.lang.StringIndexOutOfBoundsException: String index out of range: -1

adb logcat: 11-21 17:32:37.527 16629 17117 D AssetFetcher: target file = /storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/assets/external_comps/com.bosonshiggs.chatflow/classes.jar

This is happening with any extension

Android 11

1 Like

tested on old Asus with Android 7 and Companion v. 2.73, on Honor Magic 5 lite and Companion v.2.73u and on Xiaomi Redmi 9 with Companion v.2.73 and with any extension