Hello,
I’ve been developing a few skills for both Alexa and Google Home using the Jovo framework. However, I have encountered a problem that I just cannot seem to solve. We have a set of audio files (MP3) in Google’s Firebase storage and I’d like to access them and play them in an audio player. I was able to get this working and everything seemed fine…until I tried to run the code in a lambda function. When the model executes in a lambda function, it never returns - the lambda function times out. No matter how high I set the lambda timeout, it still gets stuck. Here is a simple example which demonstrates the problem:
async LAUNCH() {
firebase.initializeApp(firebaseConfig);
const storageFiles = firebase.storage().ref().child('EN');
const storageFile = storageFiles.child('1.mp3');
const url = await storageFile.getDownloadURL();
console.log(`My URL: ${url}`);
this.tell(`Ok, done with getting the URL`);
},
When I look in cloud storage I can see a good URL printed out and I can see the SSML string constructed. However, I never hear the message and I get a timeout error.
Any thoughts?
I also posted this on stackoverflow here: https://stackoverflow.com/questions/59322763/how-do-i-exit-a-lambda-function-that-has-a-call-to-firebase-storage