Fatal Script Error (evaluating old.awOverride)

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jyoung
Posts: 642
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Fatal Script Error (evaluating old.awOverride)

Post by jyoung » Sat Jan 14, 2017 7:45 am

I am getting a fatal script error
TypeError: Undefined is not an object (evaluating 'old.awOverride')
So something (I'm assuming the 'old' variable) is obviously undefined but I have no idea what 'old' is. I also have no variables/objects etc. named "old".

To make matters more confusing, this only occurs on ONE SPECIFIC device. It works on desktop browsers and other AirWatch Browsers on iOS.

The "Reported By" states line 96.
However, line 96 is an empty line.
Capture.PNG
Capture.PNG (5.97 KiB) Viewed 2364 times
So that makes think it is a caching issue. However clearing the cache, rebooting the device and everything else I can think of has not worked.

dannyoorburg
Posts: 152
Joined: Mon Jan 04, 2016 9:50 am
Location: Australia

Re: Fatal Script Error (evaluating old.awOverride)

Post by dannyoorburg » Sat Jan 14, 2017 11:41 am

Can you copy and paste the whole error message?

Danny

jyoung
Posts: 642
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Fatal Script Error (evaluating old.awOverride)

Post by jyoung » Sat Jan 14, 2017 12:10 pm

That's all I get.

The only other thing there is the panel that reported the error, MOBOFC04, line 96. Nothing shows up on the master's error log.

I also tried it with the developer query string parameter thinking it would break any cache but still nothing.

It does not happen locally only on our dev server. I've re-checked in the file, MOBOFC04, multiple times. I have not deleted it on the server and checked it in again, though that will be the next thing I try Monday.

I got into to the generated JavaScript, via the Chrome dev tools, searching for that variable and I can't find anything.

My other option will be to remove the browser from the device and reinstall.

I was hoping it was an internal variable that went south and y'all would have an easy fix like you always seem to have. :D

jyoung
Posts: 642
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Fatal Script Error (evaluating old.awOverride)

Post by jyoung » Tue Jan 17, 2017 3:47 am

This one really has me stumped.

Thinking it was a caching issue, I deleted the file the error states (MOBOFC04) from the server and recompiled the web page. When I navigated to that panel, it errored out as excepted.

Thinking that the cache had been busted, I checked the file back in and recompiled the page and got the same error. :shock:

Then I uninstalled the browser from the device and reinstalled it. Navigate to the page and same error. :shock:

Then I stripped everything out and was left with a blank panel, navigate the panel and NO ERROR. :o

After adding the bits back in in piece by piece, I finally got the error on one of my other panels that MOBOFC04 contains, a panel used as the Tab Sheet in a Tab Folder.

So I did the same trick with that panel, I stripped everything out of it so that is an empty panel and navigated to the page and GOT THE ERROR. :?

For the curious, here is the Panel that is causing the problem (MOBOfficeInfoPanel).

Code: Select all

function options(*DIRECT)
begin_com role(*EXTENDS #MOBBasePanel) layoutmanager(#Layout1)

define_com class(#PRIM_TBLO) name(#Layout1)
define_com class(#PRIM_TBLO.Row) name(#LayoutRow1) displayposition(1) parent(#Layout1)
define_com class(#PRIM_TBLO.Column) name(#LayoutColumn1) displayposition(1) parent(#Layout1)
define_com class(#PRIM_TBLO.Item) name(#LayoutItem1) column(#LayoutColumn1) manage(#Label1) parent(#Layout1) row(#LayoutRow1) sizing(None)

define_com class(#PRIM_LABL) name(#Label1) caption('Info Panel') displayposition(1) ellipses(Word) height(25) left(190) parent(#COM_OWNER) tabposition(1) tabstop(False) top(123) verticalalignment(Center) width(120)

end_com
Then I created another panel with the EXACT same code (only the label caption is different) this panel is MOBOfficeTestPanel.

Code: Select all

function options(*DIRECT)
begin_com role(*EXTENDS #MOBBasePanel) layoutmanager(#Layout1)

define_com class(#PRIM_TBLO) name(#Layout1)
define_com class(#PRIM_TBLO.Row) name(#LayoutRow1) displayposition(1) parent(#Layout1)
define_com class(#PRIM_TBLO.Column) name(#LayoutColumn1) displayposition(1) parent(#Layout1)
define_com class(#PRIM_TBLO.Item) name(#LayoutItem1) column(#LayoutColumn1) manage(#Label1) parent(#Layout1) row(#LayoutRow1) sizing(None)

define_com class(#PRIM_LABL) name(#Label1) caption('Test Panel') displayposition(1) ellipses(Word) height(25) left(190) parent(#COM_OWNER) tabposition(1) tabstop(False) top(123) verticalalignment(Center) width(120)

end_com
Those panels are both declared in MOBOFC04, with one commented out so I can toggle between the two.

Code: Select all

* define_com class(#MOBOfficeInfoPanel) name(#MOBOfficeInfoPanel) left(5) parent(#InformationSheet) tabstop(False) top(5) height(458) width(677)
define_com class(#MOBOfficeTestPanel) name(#MOBOfficeTestPanel) left(5) parent(#InformationSheet) tabstop(False) top(5) height(458) width(677)
Now here's the crazy part. MOBOfficeInfoPanel throws this
20170116_102323.jpg
20170116_102323.jpg (176.1 KiB) Viewed 2335 times
MOBOfficeTestPanel works as expected.
20170116_102159.jpg
20170116_102159.jpg (103.03 KiB) Viewed 2335 times
My only assumption at this point is that the MOBOfficeInfoPanel is somehow corrupted and has to be trashed. Easily enough done as there is not much code in it.

I would like to know why and how this happened however so that I can prevent it in the future. Any ideas?

jyoung
Posts: 642
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Fatal Script Error (evaluating old.awOverride)

Post by jyoung » Tue Jan 17, 2017 8:22 am

Ok, last post on this then I am done as I have been all over this place with this problem.

Had multiple caching problems. Could not get the browser to release its cache except for uninstall it.

I ripped everything out and rebuilt it piece by piece until I found the culprit.

It finally came down to a small RP that has an HTML Container in it. I dropped an iframe in that container with a url to a Google embedded map. Go to the view(panel) with that map and the error shows up. Remove the map, recompile the parts and the page, bust the cache etc. and the error is avoided.

Interestingly, when I put the same map in an html page on the server, it does fine. Its only when it is embedded into the HTML Container and on a specific device that it acts up.

This leads me to another question, for which I will create a new topic.

jyoung
Posts: 642
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Fatal Script Error (evaluating old.awOverride)

Post by jyoung » Wed Jan 18, 2017 5:04 am

Ok, so I can't leave well enough alone and I can't leave things broken. :D

As I mentioned in my last post, using an embedded map on a plain html page on the server works fine. It dawned on me last night to put a LANSA Web Page with just a map on it it and see if that has the same problem.

So I did and LO AND BEHOLD! I got the exact same error! I tried with the WebPage control and the HTMLContainer and got the same error.
Here is the code for the page. You will need to add your own Google Map API key at the [YOUR API KEY HERE] placeholder in the GetCleanUrl method.

The GetUrl method can be used to drop an iFrame into a HTML Container.

The Location is to a sandwich shop that I tend to visit. :D

I would be curious if anybody else has this error show up. I get it on an iPad (4th Gen) Model A1458 with the AirWatch Browser. I don't get the error on any desktop browser (Chrome, IE 11, Edge) and unfortunately, I cannot test on any other device at the office. When I get home I may try to hop on a cloud instance and try with some other devices.

Code: Select all

begin_com role(*EXTENDS #PRIM_WEB) layoutmanager(#Layout1)
define_com class(#PRIM_TBLO) name(#Layout1)
define_com class(#PRIM_TBLO.Row) name(#LayoutRow1) displayposition(1) parent(#Layout1)
define_com class(#PRIM_TBLO.Column) name(#LayoutColumn1) displayposition(1) parent(#Layout1)
define_com class(#PRIM_TBLO.Item) name(#LayoutItem2) alignment(TopLeft) column(#LayoutColumn1) manage(#Page1) parent(#Layout1) row(#LayoutRow1) flow(Down)
define_com class(#PRIM_TBLO.Item) name(#LayoutItem3) alignment(TopLeft) column(#LayoutColumn1) manage(#Label1) parent(#Layout1) row(#LayoutRow1) sizing(None) flow(Down)

define_com class(#PRIM_WEB.Page) name(#Page1) description('Web Page') displayposition(2) height(800) parent(#COM_OWNER) tabposition(1) tabstop(False) width(1182) top(25)
define_com class(#PRIM_LABL) name(#Label1) caption('Web Page 2') displayposition(1) ellipses(Word) height(25) left(0) parent(#COM_OWNER) tabposition(2) tabstop(False) top(0) verticalalignment(Center) width(120)

define field(#Location) type(*STRING)

evtroutine handling(#COM_OWNER.Initialize)

#Location := "5959+N.W.+Expressway,Oklahoma+City,OK,73132,USA"
              
#Page1.Source := #COM_OWNER.GetCleanUrl
endroutine

mthroutine name(GetCleanUrl)
define_map for(*RESULT) class(#PRIM_ALPH) name(#result)

#result := "https://www.google.com/maps/embed/v1/place?key=[YOUR API KEY HERE]&q=" + #Location
endroutine

mthroutine name(GetUrl)
define_map for(*RESULT) class(#PRIM_ALPH) name(#result)

#SYS_APPLN.TraceMessageText( ("Maps Location: &1").Substitute( #Location ) )

#result := ('<iframe width="' + #COM_OWNER.Width.AsString + '" height="' + #COM_OWNER.Height.AsString + '" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?key=[YOUR API KEY HERE]&q=')
#result += #Location
#result += '"'
#result += "allowfullscreen></iframe>"

#SYS_APPLN.TraceMessageText( ("Maps URL: &1").Substitute( #result ) )
endroutine

end_com

jyoung
Posts: 642
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Fatal Script Error (evaluating old.awOverride)

Post by jyoung » Thu Jan 19, 2017 2:34 am

To finally close this issue out, we've further identified this to be specific to iOS 9 or Safari 9.

Running on iOS 10.2 with Mobile Safari 10 does not reproduce the error.
Running on iOS 9.3.4 with Mobile Safari 9 produces the error.

Hopefully this will help someone else who is trying to integrate Google Maps. :D

Post Reply