Under Review
over 1 year ago

Background process exits before makeWebRequest times out

I am running Web Requests from a background process (data field & watch face). When the BLE connection returns an error, e.g. BLE_HOST_TIMEOUT (-2), the background process has already terminated (it terminates after 30s), without sending any data or error message back to the application process. This leaves the developer without any option to handle the error, or inform the user about the error.

A better experience would be for the BG process to wait until the makeWebRequest calls the callback function with the error code. Also, some TCP implementations have a 30s TCP handshake timeout, which means that the bg process could terminate before the makeWebRequest calls the callback function, when the TCP connection handshake has timed out. 

My suggestion is to either extend the background process timeout to allow for makeWebRequest to make the callback with the proper error code, and/or to shorten the timeout for BLE_HOST_TIMEOUT. Currently, the BLE_HOST_TIMEOUT takes between 60-70 secs. 

Parents
  • Hi. I just wanted to see if this topic could be brought up in priority. In some cases, the makeWebrequest call does not return (call the callback function) before the background process times out. This leaves the users with no feedback on what went wrong. I think it would be a better approach to extend the background process timeout to e.g. 60s. That way the makewebrequest should always have time to return with an error code. It does not seem to be a good practice to timeout the bg process before makewebrequest times out (makewebrequest MUST run in the background for watch faces and data fields). best regards Fredrik

Comment
  • Hi. I just wanted to see if this topic could be brought up in priority. In some cases, the makeWebrequest call does not return (call the callback function) before the background process times out. This leaves the users with no feedback on what went wrong. I think it would be a better approach to extend the background process timeout to e.g. 60s. That way the makewebrequest should always have time to return with an error code. It does not seem to be a good practice to timeout the bg process before makewebrequest times out (makewebrequest MUST run in the background for watch faces and data fields). best regards Fredrik

Children
No Data