How do you debug on mobile? Invalid JSON, works fine on desktop
How do you debug on mobile? Invalid JSON, works fine on desktop
I am using multiple DataTables inside a bootstrap modal (actually a "BootstrapDialog" component, which uses bootstrap modal). Everything works great on desktop (chrome, windows), but when I do the exact same thing on mobile (Chrome, Android), I get the invalid json tn1 error on all tables that try to load data (no error when json returns an empty table).
Since it only happens on my phone, I have no clue how to debug this.
If no one knows what the issue likely is, can someone please tell me how to get a Dev-Tools Network tab on Android?
Thanks.
This question has an accepted answers - jump to answer
Answers
See if this SO thread helps.
Maybe you can debug the server response to see what its returning. Its possible its not a JSON string but some other response that might help you debug the problem.
Kevin
Thanks. I did get DevTools PC to debug a tethered Android phone... cool!
The issue had to do with a PHP $_SESSION['id'] variable (used in the SQL) not being set right on Mobile when it was correct on desktop. I'm still not sure exactly why that was happening, but I fixed it by changing how my session manager works a bit (need to come back to work more on that part later - ugly stuff).