Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

androidInterface is not defined. What gives?

Tags:

I'm seeing a strange javascript exception being triggered by a random user on an android device running chrome. My code contains no reference to anything named androidInterface, and so is not relevant to this question.

User Agent String:

Mozilla/5.0 (Linux; Android 7.0; SM-G892A Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 Mobile Safari/537.36

...which tells me that the user is running Chrome 57 on Android (Nougat) on a Samsung SM-G892A

The actual error is coming back from window.onError with Uncaught ReferenceError: androidInterface is not defined

Also I track clicks and api calls. This error occurs right as they are loading the page which is just a standard backbone/require setup that is working for a few thousand other customers.

Have you ever seen anything like this? What does it even mean?

like image 247
catbadger Avatar asked Mar 02 '18 21:03

catbadger


1 Answers

If you look closely at the UA string, you'll see wv which means it's a WebView on Android.

I found this question which made it more clear it's a WebView and then looked at Chrome User Agent Strings to make sure.

Bottom line is that you don't have to change anything because the error is related to the app that implemented the WebView.

like image 116
Tzach Ovadia Avatar answered Sep 29 '22 00:09

Tzach Ovadia