Strange behaviour on Android 9 with wavesurfer.js

151 views
Skip to first unread message

Ragamuffyn Soundz

unread,
Aug 9, 2019, 7:30:21 AM8/9/19
to DroidScript
Hey folks,

i wrote a small app using wavesurfer.js last year. 
Everything worked nicely until i updated my phone to android 9.

now i cannot use wavesurfer.js without the app crashing. 
i get the following error:

this.buffer.getChannelData is not a function
Source: wavesurfer.min.js 
Line: 1

wavesurfer.js works as expected on pc and on android versions <9..

does anyone have any idea what i could do apart from reverting to android 8?

tenaga kerja

unread,
Aug 9, 2019, 4:13:36 PM8/9/19
to DroidScript
What happen if you add
app.SetOptions("IgnoreErrors");

at the top of your code?

Ragamuffyn Soundz

unread,
Aug 9, 2019, 4:20:58 PM8/9/19
to DroidScript
adding the line tenaga mentioned makes the error message disappear, but it is still not functional..

Ragamuffyn Soundz

unread,
Aug 9, 2019, 4:46:54 PM8/9/19
to DroidScript
Using the latest droidscript version on an older phone i could run my program without any problems.
there seems to be some difference in android 9 which lets this happen.

i am absolutely clueless how to find out whats wrong yet even how to fix it..

Might it have something to do with the utilised webview on the phone?

Dave

unread,
Aug 10, 2019, 8:17:44 AM8/10/19
to DroidScript
Try using the "ignoresslerrors" option

Note: It's also possible that the Android 9 webview is enforcing the use of https.rather than http

Ragamuffyn Soundz

unread,
Aug 11, 2019, 5:07:05 PM8/11/19
to DroidScript
thanks for the idea, it didnt work though.

the app can run offline, am i wrong thinking https or http shouldnt make a difference?

this is quite a pity.. i cant find any up to date roms for my phone using anything other than android 9 and my old phone is no longer usable.
after spending weeks on almost completing the app, it looks like i will have to wait till some unknown thing happens in order to actually be able to use and/or further develop it.

sorry for my rant, but i feel like ditching the whole thing.. what a waste of time :(

i would be grateful to see any further ideas!

Dave

unread,
Aug 13, 2019, 1:01:46 PM8/13/19
to DroidScript
Are you recording sound?

If so, then you will need record permissions.  Try adding _AddPermissions( "Record" ) to the top of your code.


You could also try remote debugging your app using Chrome and see the area of code that is not working (use the non-minified version of wavesurfer.js so you can read the code)


Ragamuffyn Soundz

unread,
Aug 23, 2019, 6:42:23 AM8/23/19
to DroidScript
It's working now! YAY :)

All i did was flash a Rom to my phone running the Android Stock WebView (I was running one with BromiteWebview before))

Looks like it is an issue with DroidScript + BromiteWebview.

I will try and reproduce to confirm-

Reply all
Reply to author
Forward
0 new messages