Marketplace component pdfviewer is not working while accessing PDF via external link

Hi Team

We are trying to use this PDF viewer and under PDFviewer component properties we have placed the external PDF link for example https://doman.com/test.pdf and then launched the app but it does not work and gives below error in the logs





2024-05-27 11:31:19.031 5233-5233 KonyHttpRequestURLConn com.orgname.pdfbrowserWid D setConnectionParams : connect timeout set :: 0 :: URL :: https://www.clickdimensions.com/links/TestPDFfile.pdf
2024-05-27 11:31:19.031 5233-5233 KonyHttpRequestURLConn com.orgname.pdfbrowserWid D setConnectionParams : read timeout set :: 0 :: URL :: https://www.clickdimensions.com/links/TestPDFfile.pdf
2024-05-27 11:31:19.036 5233-5233 KonyHttpRequestURLConn com.orgname.pdfbrowserWid E android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1675) at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:115)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
at java.net.InetAddress.getAllByName(InetAddress.java:1152)
at com.android.okhttp.Dns$1.lookup(Dns.java:41)
com.android.okhttp.inernal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:178)
at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:144)
at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:86)
at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:176)
at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30)
at com.konylabs.api.net.j.q(UnknownSource:633)
at com.konylabs.api.net.j.p(UnknownSource:452)
at com.konylabs.js.api.aq.execute(UnknownSource:3091)
at com.konylabs.android.d.execute(UnknownSource:101)
at com.konylabs.vm.Function.executeJS(Native Method)
at om.konylabs.vm.Function.a(UnknownSource:141)
at com.konylabs.vm.Function.b(UnknownSource:137)
at com.konylabs.vm.Function.execute(UnknownSource:116)
t com.konylabs.api.ui.mw.getWidget(UnknownSource:89)
at ny0k.hr.oc(UnknownSource:732)
at ny0k.hr.getWidget(UnknownSource:1414)
at com.konylabs.api.ui.ex.getWidget(UnknownSource:1257)
at ny0k.hr.oc(UnknownSource:730)
t ny0k.hr.getWidget(UnknownSource:1427)
at com.konylabs.api.ui.hs.oY(UnknownSource:1154)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
2024-05-27 11:31:19.036 5233-5233 KonyHttpRequestURLConn com.orgname.pdfbrowserWid D raising eventlistener callback event type ::load
2024-05-27 11:31:19.036 5233-5233 KonyHttpRequestURLConn com.orgname.pdfbrowserWid D raising eventlistener callback event type ::loadend
2024-05-27 11:31:19.036 5233-5233 KonyHttpRequestURLConn com.orgname.pdfbrowserWid D raising eventlistener callback event type ::readystatech

Hi @Murali Boddeda ,

First of all, I am unable to reproduce the issue. Secondly, the online pdf, what you have mentioned, seems the path is not secured.

What is the pdfType you are using in your controller code? It must be "Online".
And you need to call the render() API depending on your renderType.

Please confirm.

Thanks,
Gaurab