Why is Cordova Windows 8 app causing an unhandled win32 exception occurred in wwahost.exe?

 ̄綄美尐妖づ 提交于 2019-11-29 16:11:15

There is a quicker workaround for this that should work for most apps; before you click around and get the WWAHost.exe exception, close the DOM Explorer window. This should enable you to debug by hitting breakpoints, etc. If you need to use DOM Ex (against a Windows target), I'd suggest trying Kenneth's solution.

The only work around that I have found that has allowed me to debug Hybrid Windows Store Apps has been to use remote debugging on anther machine. Kind of a pain if you don't have two machines, but you may be able to use a virtual machine as your remote machine.

I ran into a similar problem with input tags in Windows 8.1 with my Cordova app. Seemed to only happen to users with tablets using touch screens. Here's my code for a simple image upload/preview button.

HTML:

<label class="lbl-upload" for="uploadFile1"> <img class="img-upload" src="img/add-photos.png" id="uploadBtn1" /> </label> <input type="file" name="uploadFile1" id="uploadFile1" /> <img id="img1" src="#" alt="your image" />

JS:

var coors;

$('#uploadFile1').change(function() {
  clearTimeout(coors);
  coors = setTimeout(function() {
        var reader = new FileReader(); 
        var file = document.querySelector('#uploadFile1').files[0];
        var preview = document.querySelector('#img1');
        reader.onloadend = function () {
            preview.src = reader.result;
        }
        if (file){
            reader.readAsDataURL(file);
        }
        else {
            preview.src = "";
        }
  }, 2000);
});

For whatever reason a delay is needed for touch screens. Not very pretty but gets the job done.

Turns out when VS crashed it became corrupted. I reran the install and chose "repair" and now it's fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!