1. Alan Rice
  2. PowerServer Mobile (Obsolete)
  3. Wednesday, 9 October 2019 13:59 PM UTC

Hi,

I have a mobile app using Powerserver 2017 R3 which has a page that loads PDFs using the Appeon WebView workaround (help file). This works fine for simple and public URLs.

However when using Azure and having to pass an access signature it fails as I believe the URL params are getting escaped or changed.

e.g.

(for this example the URL is public, but in production it can only be accessed when the access signature is present and correct. Both links will work in your browser, but only the first in Appeon Mobile)

This one will work:

https://gsm1.blob.core.windows.net/testprivate/sample/48313.pdf

 

This one will fail:

https://gsm1.blob.core.windows.net/testprivate/sample/48313.pdf?st=2019-10-09T13%3A07%3A44Z&se=2019-11-12T11%3A07%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=6%2FtA6UP0XJCi6Q7V2IF3Gna%2BsdgMR%2BqmyxPotISg%2B5A%3D

https://gsm1.blob.core.windows.net/testprivate/sample/48313.pdf?st=2019-10-09T13%3A07%3A44Z&se=2019-11-12T11%3A07%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=6%2FtA6UP0XJCi6Q7V2IF3Gna%2BsdgMR%2BqmyxPotISg%2B5A%3D

 

Rather than the page being shown, a warning about the access signature is displayed that it is not formatted correctly.

From capturing the data passed (passed them to a dummy server) from the mobile app to the server I can see that it is escaping the percentage % symbols in the link

e.g. % becomes %25

// it should be
&sig=6%2FtA6UP0XJCi6Q7V2IF3Gna%2BsdgMR%2BqmyxPotISg%2B5A%3D

// but this is what is sent to the server
&sig=6%252FtA6UP0XJCi6Q7V2IF3Gna%252BsdgMR%252BqmyxPotISg%252B5A%253D

 

 

Any ideas how to preserve the URL that is set in code. Its already escaped and works fine outside of Appeon Mobile.
I've tried unsuccessfully to un-encode the URL items so that the webview can re-encode them but haven't had any luck with this.

Sample PB Code:

// eon_mobile_webviewex uo_pdf_viewer (placed on window), not created in code
String ls_webpage_src

ls_webpage_src	= "http://someurl....?..."
uo_pdf_viewer.of_startloading(ls_webpage_src)

 

Any help would be appreciated.

 

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 9 October 2019 14:41 PM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 1

Hi Alan;

  Off-hand, I am guessing that this feature blockage might be a restriction of the Appeon control's processing of the URL. I would suggest opening a support ticket for this issue to make sure and if so, get this restriction into the formal enhancement queue.

  As a workaround ... what about using the PB/PS's "iNET" object ... for example:

iNET  lo_inet
lo_inet = CREATE  iNET
lo_inet.hyperlinktourl ( /*string urlname */)

Regards ... Chris

 

 

Comment
There are no comments made yet.
Alan Rice Accepted Answer Pending Moderation
  1. Wednesday, 9 October 2019 14:33 PM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 2

Just to add to the original. I had thought it was an issue just with eon_mobile_webviewex but the same thing is happening when I use inet. I was going to just open the URL in the browser as a bad workaround until the web view could be fixed but the very same problem here!

 

String ls_webpage_src 
inet l_inet

ls_webpage_src = "https://gsm1.blob.core.windows.net/testprivate/sample/48313.pdf?st=2019-10-09T13%3A07%3A44Z&se=2019-11-12T11%3A07%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=6%2FtA6UP0XJCi6Q7V2IF3Gna%2BsdgMR%2BqmyxPotISg%2B5A%3D"

l_inet = create inet
l_inet.hyperlinktourl(ls_webpage_src)

// This results in this link opening in Safari
https://gsm1.blob.core.windows.net/testprivate/sample/48313.pdf?st=2019-10-09T13%253A07%253A44Z&se=2019-11-12T11%253A07%253A00Z&sp=rl&sv=2018-03-28&sr=b&sig=6%252FtA6UP0XJCi6Q7V2IF3Gna%252BsdgMR%252BqmyxPotISg%252B5A%253D

 

// Correct
&sig=6%2FtA6UP0XJCi6Q7V2IF3Gna%2BsdgMR%2BqmyxPotISg%2B5A%3D

// What is opened by safari
&sig=6%252FtA6UP0XJCi6Q7V2IF3Gna%252BsdgMR%252BqmyxPotISg%252B5A%253D
Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 9 October 2019 15:19 PM UTC
Hi Alan;

What about this approach ...



iNET lo_inet

String ls_url

Blob lb_url

lo_inet = CREATE iNET

lb_url = Blob ( "http://xxxx", EncodingANSI! )

ls_url = String ( lb_url, EncodingANSI!)

lo_inet.hyperlinktourl ( ls_url )



Regards ... Chris
  1. Helpful
  1. Alan Rice
  2. Thursday, 10 October 2019 13:46 PM UTC
Hi Chris,



Thanks for the reply. I tried your suggestion above, but no luck.

It results in the same incorrect URL being created.



Best Regards,

Alan
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 10 October 2019 14:14 PM UTC
My guess is that its sounding more like it might be an Azure issue. :-(
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.