Skip to content

Commit e600ddc

Browse files
committed
fix sth
1 parent 591ca6c commit e600ddc

File tree

5 files changed

+42
-1
lines changed

5 files changed

+42
-1
lines changed
24.8 KB
Loading
25.5 KB
Loading
29.4 KB
Loading
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
layout: default-layout
3+
noTitleIndex: true
4+
needAutoGenerateSidebar: true
5+
title: Dynamic Web TWAIN Troubleshooting A Connection With The Server Could Not Be Established
6+
keywords: Dynamic Web TWAIN, Documentation, Troubleshooting, Common Errors, Connection Couldn't Be Established
7+
breadcrumbText: Connection Couldn't Be Established
8+
description: Dynamic Web TWAIN SDK Documentation Troubleshooting Common Errors Connection Couldn't Be Established Page
9+
---
10+
11+
# Handling Errors
12+
13+
14+
## Activating the WebTwain instance doesn't disappear
15+
16+
* Symptom
17+
18+
We have encountered many a such issue that when running DWT in WASM mode, it doesn't get past the step that says 'Activating the WebTwain instance'.
19+
20+
![activating-the-WebTwain-instance-1]({{site.assets}}imgs/activating-the-WebTwain-instance-1.png)
21+
22+
* Cause
23+
24+
The cause is that the wasm has been served with an incorrect MIME type in which case the browser won't be processing the wasm after it is downloaded as it doesn't know how to handle such files, therefore it stops dead there. To confirm the issue, open dev tools and switch to network and you'll see something similar to this (note that content-type is wrong, it may not be what you see in this example but it's definitely not application/wasm.
25+
26+
Notice that there are no more activity after this in network.
27+
28+
![activating-the-WebTwain-instance-2]({{site.assets}}imgs/activating-the-WebTwain-instance-2.png)
29+
30+
If it's right, more wasm files will follow like this:
31+
32+
![activating-the-WebTwain-instance-3]({{site.assets}}imgs/activating-the-WebTwain-instance-3.png)
33+
34+
* Resolution
35+
36+
Make sure the wasm files can be served correctly. Different servers are configured differently. Here are some popular ones:
37+
38+
NGINX: [ `mime.types` ](https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types)
39+
IIS: [ `Web.config` ](https://docs.microsoft.com/en-us/iis/configuration/system.webserver/staticcontent/mimemap#how-to-add-a-mime-type-to-a-web-site-or-application)
40+
Java™ EE web app: [ `web.xml` ](https://docs.oracle.com/cd/E24329_01/web.1211/e21049/web_xml.htm#WBAPP533)
41+
Node.js: [ `npm mime` ](https://www.npmjs.com/package/mime-types)

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ description: Dynamic Web TWAIN SDK Documentation Homepage
7979

8080
- [Stable]({{site.info}}schedule/stable.html)
8181
- [Beta]({{site.info}}schedule/beta.html)
82-
- [Developping]({{site.info}}schedule/developing.html)
82+
- [Developing]({{site.info}}schedule/developing.html)
8383
- [Proposed]({{site.info}}schedule/proposed.html)
8484
- [To Consider]({{site.info}}schedule/ideas.html)
8585
- [Deprecated]({{site.info}}schedule/deprecated.html)

0 commit comments

Comments
 (0)