Slava Krivonosov
ย ยทย Deploying on Fridays

Stop Audio Recording stopped returning audio path. How to upload to Firebase Storage?

I'm trying to achieve a simple thing โ€“ record audio with new Start and Stop audio recording actions and upload result to Firebase. To do this, I used custom action to get audio path from Stop audio and upload it to Storage (as regular Upload File action doesn't work with Stop audio recording action output somehow).

It has been working just FINE on the last week and I was happy that I could save it to user-related folder and also create a document with the link to this file (I need this). I've tested it. It worked!

Here's the code of custom action which used to make the magic:

Screenshot 2023-07-27 at 12.35.24.png
517.57KB

Today I got back to work on this project and it doesn't work anymore. I see the error in Android Studio terminal:

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: 'package:firebase_storage/src/reference.dart': Failed assertion: line 127 pos 12: 'file.absolute.existsSync()': is not true.

As I understand, it means there's nothing to upload, so my hypothesis is that my custom action can't get the link to the file anymore.

I did some testing and found out one weird thing. If you're not using Audio Player widget, you Stop Audio Recording won't give you the link to the file stored at the cache, it's just Start and Stop:

BUT when you have Audio Player linked to Stop Audio action output, here we go:

SO. I wonder how can it be, last week all fine, today nothing works.

I also wonder why this Action doesn't support regular action Upload File. It'd be SO handy!

I'd appreciate any help with this! Please!

13
45 replies