i have same issue, i use companion v 2.72 first, when error occured maybe because im not updating the companion app, after i update the error still there, i tried to build apk its working, then i tried on empty app without any extension just label and textbox its connected fine using companion app, maybe the problem is in extension
When you experience this problem, try uninstalling the Companion and then installing it fresh.
I suspect the problem is caused by an interrupted download of the extension jar file, leaving behind a zero length file, which could cause this out of bounds exception.
I did, still got the error, or progress bar just stopped at trying to load the classes.jar file.
What is causing it, I have a pretty solid internet connection, the error arises at different times of the day, and this error is happening to people all over the world?
It broke suddenly, I think since Tuesday. Previously there was no such problem on a global scale. Sometimes there was an interruption but very sporadic, now it works sporadically.
It would also be helpful to get a logcat when this failure happens, in particular the entries before the stack trace. I'm looking for a message that starts with: "Loading component dex".
Also try legacy connection. Non legacy connections use WebRTC. With WebRTC, the browser chooses which "ports" to use. I suspect that some ports are being blocked by various network elements. So success may depend on which ports the browser (randomly) chooses. Unfortunately, this choice is beyond our ability to influence. This is just a theory on my part, however.
I waste also a lot of time developping extension and trying with the Emulator 2.65 or my Samsung S9. In conclusion these two modes are buggy. My workaround is to build the APK and try it with my phone without errors!
Last bug was to say me that "all but first of list" doesn't exist!!!
I also attempted connecting via USB, just gave me a white screen on device, and runtime error about not being able to set properties for the extension (so it got somewhere but obviously did not load the classes.jar file...)
You got the no such class error, which sometimes appeared also in the past... therefore on the extensions directory webpage I have this chapter for that kind of error
How to avoid runtime errors with the companion app
After importing an extension, please restart the companion app.
If you like to use an extension on a different screen, in Screen1 additionally drag the extension into the working area.
While starting the companion app, all necessary assets and also the imported extensions of your project will be copied to your device. So in case the no such class error shows up, the extension code to run the extension is not available on your device. Without that code the companion app is not able to execute methods from the extension.
In case restarting the companion app does not work for you after trying several times, then as it looks like the only way for you to test you app will be after building it using the apk file.
I get the same error for almost every other extension. I always delete the Companion folder and reload the browser before testing an extension. That doesn't change anything.
As everyone knows, it also worked with Companion before. If we can basically only test with the compiled app, we don't need Companion anymore.
And as you can see from my example, it works without any problems with Niotron.
I have the same problem using KIO4_base64 and ClickZ, when i try to lunch the app on companion it gives me this error:
"Unable to load extensions.java.lang.StringIndexOutOfBoundsException:
String index out of range: -1"
companion version: 2.73 (from app store)
Phone: Samsung A30s
Android version: 11
So I was able to reproduce the problem. That means it's only a matter of time until I have it fixed. I'll probably post a binary of a fixed companion within the next 24 hours.