Documents loaded via URL are rejected

WebViewer Version: 3.2.0-3799022

Do you have an issue with a specific file(s)?

The issue happens with all files.

Can you reproduce using one of our samples or online demos?

Yes, using the demo application shipped with Apryse at http://localhost:8090/demo

Are you using the WebViewer server?

Yes

Does the issue only happen on certain browsers?

No, all browsers.

Is your issue related to a front-end framework?

No

Is your issue related to annotations?

No

Please give a brief summary of your issue:
Open a file from a URL in the demo application is rejected.

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

  1. Installed Apryse Viewer without docker on Windows
  2. Start the WebViewer Server from the Windows services
  3. load the demo application at http://localhost:8090/demo
  4. Observe that the document does not get loaded

Looking in the webviewerserver-stderr logs I have the following error with each document link, I’ve tried various ones.

java.lang.Exception: Rejected https://www.highwaycodeuk.co.uk/uploads/3/2/9/2/3292309/the_official_highway_code_-_10-04-2025_3.pdf
at core.shared.DocReference.(DocReference.java:52)
at core.shared.BlackBoxMessenger.getDocRef(BlackBoxMessenger.java:232)
at core.shared.BlackBoxMessenger.HandlePageInfoReq(BlackBoxMessenger.java:277)
at core.shared.BlackBoxMessenger.onMessage(BlackBoxMessenger.java:147)
at core.shared.ConnectionService$Connection.onMessageImpl(ConnectionService.java:121)
at core.shared.ConnectionService$WebsocketConnection$1.onMessage(ConnectionService.java:193)
at core.shared.ConnectionService$WebsocketConnection$1.onMessage(ConnectionService.java:184)
at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:389)
at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130)
at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:486)
at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:286)
at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:129)
at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85)
at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184)
at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164)
at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152)
at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:973)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:491)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:840)

I also have webviewer server version: 2.3.0-g298a8a7e installed on my system, switching back to this loads the documents as expected.

Please provide a link to a minimal sample where the issue is reproducible: Reproduces using the Apryse Demo app.

1 Like

Hi Aidan,

Thank you for reaching out.

From Webviewer Server 3.0.0, a change occured on the config TRN_ALLOWED_DOMAINS

The WebViewer Server option TRN_ALLOWED_DOMAINS has had its default value changed. Previously, it defaulted to a wildcard allowing all domains. Now, by default, no domains are allowed for security reasons.

Please make sure you’ve added the allowed domains (wildcard is still usable) and let us know if that solves your issue.

Best Regards,
Mickaël.

1 Like

Hi Mickael,

Setting "TRN_ALLOWED_DOMAINS” : “*” fixed the issue for me.

In the documentation you linked, it states that the wildcard is still the default:

By default this is set to * , to block all domains.

It also says that it blocks all domains, which I imagine should actually say "to allow all domains.”

Additionally, it would be helpful if a more explicit error or warning were provided when TRN_ALLOWED_DOMAINS isn’t set.

Thanks,

1 Like

Hi Aidan,

Thank you for your feedback. Glad to know this is working on your side now.

I’ll make sure the documentation gets updated to reflect the latest changes.

Best Regards,
Mickaël.

1 Like