Cannot invoke "org.sil.app.lib.common.config

In working on an inherited app and I’m trying to build a local apk to test the app. When I click on “Build Android App” I get an error message:

“Cannot invoke “org.sil.app.lib.common.config.AudioSource.getType()” because “audioSource” is null”

I’ve tried to remove the audio completely and still get the same message. What is causing this and how to I fix it?

Hey @Dan_Neville - I’m intrigued that your issue is an audio source issue. I wonder if it is related to an issue that I’ve started having in my app recently. My app stalls trying to download audio files.

Hi Ben, (Yeti),

I get the forum messages and saw your post too. I wondered about it too, but don’t have the forensic mindset to offer any help. I marked your issue with “Watch” so I’ll see any updates to it.

I did wonder if you knew Kalaam will host your audio files if needed.

I’m still hoping someone else can help with my issue. I’ve never seen it and don’t really want to try to solve it by rebuilding the app from scratch. But that may be what I end up doing. Seems lke a weird error when there is no audio.

1 Like

I found the issue with your project. You have a book with page 40 where there is no audio and the Duration is set to “Set the duration to be: 30 seconds”. To work-around this issue, either:

  1. Add narration audio to the page or
  2. Set the duration to “Set the duration automatically from the audio narration timeings” (and restart SAB)

When setting the duration, this saves a <audio> element with the page and since there is no audio file (in your case) but it looks like there is audio, then the code checks the type and fails. I am working on a fix for the next release (I have a pull request in for Richard to review).

Chris Hubbard

Thanks Chris.
When you know where to look it all makes sense. Appreciate the time you put into this and upcoming fix.
Dan