Page 1 of 1

LANSA Mobile Container Issue

Posted: Fri Sep 20, 2019 10:12 am
by LANSAGuru
#1 LANSA Mobile Container
#2 VL Web app inside
#3 Running Code like this...

#sys_Web.Navigate Url(#wNewUrl) Target(New)

After a lot of debugging, it appears that this fails with any url that includes an &

Originally running this on Mobile Android and it was not working, could not figure out why, so moved to something a little more debug-able, LANSA Mobile on Windows.

On Windows I got the error, but instead of doing nothing it crashes LANSA Mobile Completely.

I did a bunch of tests to get the error and it looks like any URL sending parms (&p1=value&p2=value)

You get an error like so in the LANSA Mobile log file...

Windows::UI::Xaml::Controls::WebViewNavigationStartingEventArgs ^):1092: ?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?about&r=1","target":"_blank"}
Exception: lacks ending quotation before the end of string[ pos = 49 ]

By tweaking the url length you can work out that it doesn't like the &

You can no longer use + in url as that is used to replace a space.
And the LANSA Mobile app is doing some stuff behind the scenes, so if you try to replace the url with %26 it just interprets that as a regular &.

Tried \x26 as well but that just gets interpreted as &...

Some of the other urls tried as extracted from the logs....

Windows::UI::Xaml::Controls::WebViewNavigationStartingEventArgs ^):1092: ?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?w=ccx033sxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+r=1","target":"_blank"}
?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?about","target":"_blank"}
?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?w=ccx033sxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&r=1","target":"_blank"} 98
?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?w=ccx033s&r=Get","target":"_blank"} 53
?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?about&r=1","target":"_blank"} 49
?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?w=ccx033sxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","target":"_blank"}
?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?w=ccx033s","target":"_blank"}
?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?w=ccx033s","target":"_blank"}
?t=0&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?w=ccx033s","target":"_blank"}
?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?w=ccx033sxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","target":"_blank"}
?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?w=ccx033sxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&r=1","target":"_blank"}
?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?w=ccx033sxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+r=1","target":"_blank"}
?t=1&imb=1&data=@runCommand%20{"cmd":"openwindow","url":"/cgi-bin/lansaweb?w=ccx033sxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+r=1","target":"_blank"}

I was going to report this, but everyone gone in US at the moment.

Can I get any idea if anyone knows how to make this work. I need to be able to open a url and pass parameters...

Thanks,
Paul

Re: LANSA Mobile Container Issue

Posted: Fri Sep 20, 2019 1:53 pm
by jasonzhou
Hi Paul,

It sounds a bug of LANSA Mobile. We will fix it. Can you please report this to LANSA support. We will send you a test build to try out as soon as it get fixed.

Thanks
Jason

Re: LANSA Mobile Container Issue

Posted: Fri Sep 20, 2019 2:04 pm
by LANSAGuru
I just logged to the US Support Portal (I guess it is all 1 support portal now)...case #00758181

Included a simple test case quick export....been driving me crazy and wasted a bunch of time trying to work around the issue...I could go down the widget road, but that has its own issues. If I can avoid doing that I would like to.

Thanks!