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.
I followed this tutorial: https://hypermedia.systems/building-a-contacts-app-with-hyperview/
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:
- Basic contacts app implementation: https://github.com/adamstep/contact-app/commits/adam/hv3/
- Add support for phone calls and email: https://github.com/adamstep/contact-app/commits/adam/hv3-comms/
- Add support for toast messages: https://github.com/adamstep/contact-app/commits/adam/hv3-messages/
- Add swipe gesture support: https://github.com/adamstep/contact-app/commits/adam/hv3-swipe/
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.
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 :)