Ticket Created
over 3 years ago

CA-105973

Ensure that Android and IOS web requests toString() all the parameters before sending them to ensure web request behaviour is consistent.

Not sure whether this is a known issue with the simulator (or perhaps the devices if you look at it that way), or if there's an item to fix this on the backlog, but the simulator does not behave in the same way as all the hardware when making web requests. Specifically, on the simulator, a request with params:

var params = {
"sort" => "date-desc",
"deviceid" => deviceId.toString(),
"formatForDevice" =>true
};

will generate a query string with

GET /api/routes/?deviceid=<mydeviceid>&sort=date-desc&formatForDevice=true HTTP/1.1" 200 922 "-" "Mozilla/5.0" "80.229.6.38"

on the simulator. It does the same on my vivoactive 3 using android. It appears that on some devices (connected to IOS phones, perhaps?) it sends

GET /api/routes/?sort=date-desc&formatForDevice=1&deviceid=<mydeviceid>

Note the 1 versus 'true' for the formatForDevice.

This may seem like a tiny bug but I just spent 2 days and various back and forth with a user trying to determine this was the cause of my app crashing on the Fenix. It also meant I had to pull the latest version of my app from the store while I worked it out.

It's not possible to detect this in testing because the simulator and physical device diverge. 

Could the IOS and Android implmentations be made to match so they toString() under to covers all web request parameters

Parents Comment Children
No Data