JavaScript Uncaught ReferenceError: bmi_load is not defined


(Dean Taylor) #1

Found in logs


Uncaught ReferenceError: bmi_load is not defined
Line: 218
Window Location:


REQUEST_URI: /logs/report_js_error
HTTP_USER_AGENT: Mozilla/5.0 (Linux; Android 4.4.2; en-gb; SAMSUNG SM-G900F Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.6 Chrome/28.0.1500.94 Mobile Safari/537.36

  message: Uncaught ReferenceError: bmi_load is not defined
Line: 218
Window Locatio
  line: 218

###Also note
Strange miss-spelling of Window Location (Window Locatio)

Discourse version

Discourse 1.2.0.beta6 - version 38279c79c9941426c579ea0ee133b27786cdf4c6

(Robin Ward) #2

bmi_load doesn’t exist in our codebase. Are you embedding any other 3rd party Javascript?

(Dean Taylor) #3

I think I have found the source.
It being several users accessing the site via UK 3G/GPRS providers who modify the content.

SaaS Endpoint Protection fails to update and you see the following error message in the update window:
BMI_LOAD is undefined
The SaaS Endpoint Protection system tray icon eventually shows the error condition symbol.
BMI_Load is a JavaScript used by various mobile vendors in General Packet Radio Service (GPRS) modem software. In other cases it is injected into HTML by mobile data carriers. This JavaScript reduces image quality to improve bandwidth over the GPRS connection. The BMI_Load JavaScript can conflict with SaaS’s JavaScript resulting in an error condition that prevents SaaS Endpoint Protection from completing the DAT update.

Possible solution

Consider adding Cache-Control "no-transform" header.

However this might have other ramifications in terms of intermediate caching servers, but as long as this isn’t included on the image files it shouldn’t have that much of an effect.

EDIT: If a site is behind Google PageSpeed - this header would cause the page not to be rewritten, perhaps impacting CloudFlare sites too… personally I would prefer knowing the site is loaded without errors.

Add `Cache-Control "no-transform"` HTTP header
(Jeff Atwood) #4