App can no longer upload canvas to firebase storage

Hi all, I had a working app which was allowing the user to sign and circle a body part using 2 separate canvases labelled anatomy and signature which would then be stored to firebase (see blocks below) however its no longer working, possibly coinciding with 1.5.5 release.

the error message returned by firebase is as follows -

I thought this may be related to a permission error I started seeing with 1.5.5 but since changing the Android API to 29 the error has gone and the app is able to write to the device as it saves a PDF and TXT file elsewhere.

Also, I’ve still got a working APK of the app compiled in May which doesn’t have this issue, it’s only if I make a change then I start seeing the problem.

Thanks for any assistance.

Yes, this seems to be the same bug that AI2 also has, namely that WRITE permission (incorrectly) must be declared in the Manifest on Android 11+ as well. With AI2, this is achieved if and only if the DefaultFileScope is set to Legacy. This is NOT the case with Kodular. There is NO way to declare WRITE permission in the Manifest on Android 11+. I tried with an extension but it is overridden by AI2 and by Kodular on the build server:

 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
 <uses-permission android:maxSdkVersion="29" android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

I have pointed out this bug / error countless times and also informed the Kodular team in good time :exclamation:

thanks Anke, i guess i’m out of luck then and will have to wait until the bug is fixed

You can declare WRITE manually in the Manifest. That’s done in a few seconds.

thanks Anke but unfortunately adding those lines to the manifest hasn’t resolved my issue.

Declare it this way:

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

For Kodular there is no other way than to do it manually, because Kodular does not declare any storage permissions in the Manifest with DefaultFileScope, unlike AI2.

See also here:

still no good unfortunately and thanks again.

have noticed from the firebase storage upload failed block that the path is slightly different for the file and message variables it returns so this may have something to do with it …

Connect to Companion and make a right mouse click on this block:

grafik

Do it and post the result.

Do it result as follows -

doit

Unfortunately companion doesn’t work with firebase auth so couldn’t login and therefore userID is blank in the result

got it to work with the following blocks instead -