05-10-2018 22:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-10-2018 22:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
When I try to reach a .jpg file from a public IP address while running the app from the simulator it works perfectly but when I try to load the file from an actual device (Fitbit versa) it doesn't get any data.
If I switch to a local IP address it works as expected.
Answered! Go to the Best Answer.

Accepted Solutions
05-13-2018 11:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-13-2018 11:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yes the network is OK also the permissions are correct.
Like I mentioned it works in the local network http://192.168.x.x/api but when I switch to my public ip address it doesn't work (using http).
My workaround was to create an Azure function (it uses https) that calls my http service.
So my conclusion is you cannot make http requests with the actual device, that's a boomer given that the simulator works OK.

05-12-2018 08:59 - edited 05-12-2018 09:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-12-2018 08:59 - edited 05-12-2018 09:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Have you given your app Internet privileges in the package.json?
Otherwise we'll need to see code to know more. There's some example code here : https://dev.fitbit.com/build/guides/communications/file-transfer/
I struggled with getting the example file transfer to work originally but it turns out here's a bug with filename character case: https://community.fitbit.com/t5/SDK-Development/File-Transfer-Extension-Capitalisation/m-p/2366479
Sometimes network connectivity on my phone breaks and I can get it back by restarting my phone, so I'd check that too.

05-13-2018 11:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-13-2018 11:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yes the network is OK also the permissions are correct.
Like I mentioned it works in the local network http://192.168.x.x/api but when I switch to my public ip address it doesn't work (using http).
My workaround was to create an Azure function (it uses https) that calls my http service.
So my conclusion is you cannot make http requests with the actual device, that's a boomer given that the simulator works OK.

05-14-2018 10:39 - edited 05-14-2018 10:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-14-2018 10:39 - edited 05-14-2018 10:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ah yes, makes sense now.
Some fitbit companions do not support HTTP (I believe Android and Windows Mobile still), only HTTPS. However the simulator does not enforce this constraint/bug (and said constraint/bug is not yet documented).
See: https://community.fitbit.com/t5/SDK-Development/Is-Fetch-limited-to-https/m-p/2220283#M270

