Companion error: URI is not absolute

77 views
Skip to first unread message
Assigned to ewpa...@gmail.com by chrisw...@gmail.com

saadaan

unread,
Dec 3, 2018, 12:49:00 PM12/3/18
to MIT App Inventor Forum
Hi,

When I try to connect the AI companion to the app, I get a runtime error saying "URI is not absolute". 

Can someone please confirm if this is related to the current server issue, or something is wrong in my app?

Regards,
Saad

Evan Patton

unread,
Dec 3, 2018, 4:36:06 PM12/3/18
to MIT App Inventor Forum
Hi Saad,

Does the error occur after your app has connected? If so, then it is a problem with your app. If the QR code never disappears from App Inventor then it is likely due to the issues we are having with the rendezvous server. If so, please be patient as we work to resolve the issue.

Regards,
Evan

saadaan

unread,
Dec 4, 2018, 1:35:30 AM12/4/18
to MIT App Inventor Forum
Its coming after connecting, so possibly the coding issue. BUT, I have an old checkpoint which was working fine earlier. Even that is also giving the same error now, when I try to open it on AI Companion. The coding remains the same. 

Can you please mention what this error is about? My code is trying to read a CSV file and put its data into ListPicker elements. The file is good, the data is good. And most important of all, it all worked just few days ago. 

Where do I go from here?

Regards,
Saad

saadaan

unread,
Dec 4, 2018, 1:52:09 AM12/4/18
to MIT App Inventor Forum
I did some troubleshooting. It's the image element I dragged which is causing issues. I uploaded an image file and connected it to image elements, but somehow the app is not happy because of it, and throwing error. The error doesn't come if I make that image element non-visible. Weird...

Thanks for your help though!

saadaan

unread,
Dec 4, 2018, 2:56:35 AM12/4/18
to MIT App Inventor Forum

The app is not reading the CSV file, giving error.


Capture.JPG


It used to work fine before the 248 upgrade. Did anything change in the new update related to how the files are read?

Capture.JPG

Chris Ward

unread,
Dec 4, 2018, 3:18:31 AM12/4/18
to MIT App Inventor Forum
Hi Saadaan

One thing we know has changed: Permissions. It could be that the permission to access a file is not working in debug mode - not sure.

The error is basically asking for the full path to the file, so you could try: android_asset/data5.csv or file:///android_asset/data5.csv  but I think you may have found a bug.



saadaan

unread,
Dec 4, 2018, 3:22:56 AM12/4/18
to MIT App Inventor Forum
I confirmed that the file is ported to the phone by the Designer, and is present in the AppInventor/assets folder in the directory structure of the phone in perfect condition. 

It's a dangerous bug, if it is so. My whole project is halted.

Is there a way to downgrade to version 247 APK on the phone? Would it solve the problem?

saadaan

unread,
Dec 4, 2018, 3:38:05 AM12/4/18
to MIT App Inventor Forum
I tried the full path, /storage/emulated/0/AppInventor/assets/data5.csv, and the AI companion throws error 2101 of file not found. All other combination of paths also result in the same error. However, //data5.csv still gives the URL IS NOT ABSOLUTE error. I think the file is accessible via this argument (//data5.csv), only parsing permissions need to be fixed (or whatever the bug is).

Possible to download old APK v247 from anywhere?

Chris Ward

unread,
Dec 4, 2018, 4:09:46 AM12/4/18
to MIT App Inventor Forum
Hi saadaan

If you made an APK with App Inventor version nb171 then it will be wherever you saved it.

You cannot switch to the earlier version of App Inventor, so we will have to wait and see what MIT say.

TimAI2

unread,
Dec 4, 2018, 4:24:49 AM12/4/18
to MIT App Inventor Forum
Can confirm the issue, affects both webrtc and legacy connection equally with 2.48 Companion

//myfile.txt fails
/myfile.txt works
/Download/myfile.txt works
/AppInventor/assets/myfile.txt works !!

I also tried using Taifun's file component block ".FileListFromAssets", putting the output in a list, then selecting file from a spinner
This fails as it only generates the filename, you have to join the /AppInventor/assets/ path for it to work

Wooden Ghost

unread,
Dec 4, 2018, 5:07:09 AM12/4/18
to MIT App Inventor Forum
Hi Evan:

I have the same problem. I found that the problem is caused by the format of the file name when I am reading a text file for language translation. My format is FileName "//sys_language.txt". Before it worked fine, but today it won't work. Other things work fine if file reading is omitted. Hope my information can help.

Regards,
Anthony

Evan Patton

unread,
Dec 4, 2018, 9:11:20 AM12/4/18
to MIT App Inventor Forum
Hi all,

This is a regression and we are working on a fix. In the meantime, you can download the 2.47 companion from this link and reinstall it onto your device. You must uninstall 2.48 before you can install 2.47 because Android does not allow apps to be downgraded.

Regards,
Evan

Abraham Getzler

unread,
Dec 4, 2018, 11:33:16 AM12/4/18
to MIT App Inventor Forum
(emergency 2.47 download link added to Companion and Emulator section of FAQ)
ABG

saadaan

unread,
Dec 9, 2018, 4:55:01 AM12/9/18
to MIT App Inventor Forum
Hi,

Has this issue been resolved? Is it safe to download v2.48 now? Would someone be kind enough to notify here when it is resolved, if not yet done? Thanks!

Regards,
Saad

SteveJG

unread,
Dec 9, 2018, 8:14:45 AM12/9/18
to MIT App Inventor Forum
Sorry, this issue is not yet resolved.   Can you safely down Companion 2.48?   Probably, most users can use it without any problems.  If 2.48 was not working for you previously, it probably will not work on the Project you are working on that fails.   MIT has said it will fix some bug issues later this months.   Your issue might be fixed then (or it might not).

You can tell when MIT upgrades, there will be a message on the AI2 web page splash screen.   When the splash agains indicates an upgrade, you can try the replacement and your bug might be fixed.

Regards,
Steve

saadaan

unread,
Dec 9, 2018, 8:37:28 AM12/9/18
to MIT App Inventor Forum
Steve, thanks! I downgraded to 2.47 on the advice of above emails in this thread, and it is working fine. Was just curious to know the status. The splash screen is not too helpful, since it says "The earlier problems with Companion Connections has been resolved.", which forced me to check if everything has been fixed.

Cheers,
Saad


Reply all
Reply to author
Forward
0 new messages