Instawork / hyperview

Server-driven mobile apps with React Native

Home Page:https://hyperview.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xmldom parserError - How to debug

ramiboutas opened this issue · comments

Is there any way to check what the HXML client receives? I am getting the xmldom ParserError all the times. I assume the the client receives an empty file or something.

I set up the Content-Type header to application/vnd.hyperview+xml in my Django http reponse.

Hi @ramiboutas , one way to see the HXML received by the client is to use a proxy, on the Mac I use Proxyman. If you share your code I may be able to help understand what's going on.

Also, the code from the book is available online as well, you can check out these branches:

Many thanks for your response, @adamstep !

I cloned your basic contacts app repository and I still have the same issue. I checked the received xml with proxyman and it seems ok. See screenshots below.

image

image

I tested this with 4 different systems: Ubuntu 22.04, Windows 11, Iphone and Android. And I get allways the same results.

I have never done anything with react native, but is there anything I can modify in the demo app in order to make it work?

Thanks a lot!

Hi @ramiboutas , thanks for the screenshots. The first one looks interesting, I don't completely understand it. Are you running Expo in a web browser? Normally we would use an Android emulator on Windows to run the app locally.

I did that, and it is finally working, many thanks Adam! I am excited to read the documentation of your site hyperview.org :)