06-14-2019 06:45
06-14-2019 06:45
Hi,
I'm developing an application that reads, stores and transfers sensor data via the messaging protocol from the fitbit watch to the companion app. Sensor data is stored locally as files on the watch until a bluetooth connection is established. Later on this data is transferred to a server via https.
When reading and transferring 500+ files the system starts to throw me 'out of memory' errors:
[3:10:11 PM]mem: 31416/65528
[3:10:10 PM]Error 12 Critical glue error
[3:10:11 PM]mem: 31416/65528 [3:10:10 PM]Error 12 Critical glue errorapp/sensor-io.js:252,5 [3:10:10 PM]file processing err: RangeError: Out of memory: Couldn't create buffer [3:10:17 PM]App msg queue full, see https://dev.fitbit.com/kb/message-queue-full for recommendations. [3:10:17 PM]Error 12 Critical glue errorapp/sensor-io.js:13,5 [3:10:17 PM]data store[8]: Out of memory: Failed to allocate buffer for cbor allocationapp/sensor-io.js:86,3 [3:10:21 PM]mem: 30128/65528
I am reading files with readFileSync(file, 'cbor'). I think there may be open files in background that aren't correctly closed? I do delete these files once successfully read and transferred. I've also only found a way to forcibly close binary files so I assume reading cbor encoded files automatically does that for me?
What I also thought of would be faulty files that are somehow really large thus causing this issue? Any ideas what could be happening here. I know it's difficult without the full code. I can provide a git repo if necessary.
Thanks in in advance!
Thomy
07-10-2019 07:05
07-10-2019 07:05
@JonFitbit any news on this? I can run my app for about a day before file-transfer breaks. I can share the project's source code if necessary. Would require a gitlab user or email address.
07-12-2019 03:02
07-12-2019 03:02
Hi,
I have a similar problem with file transfer being inconsistent. There was a Fitbit app released a few days ago that looked like the issue is resolved.
Here are my steps performed and observation.
Before installing the watch app/clockface do the following
1. Restart the watch.
2. Restart the Fitbit app.
3. Perform Install.
Observation:
Files start transferring for some time till my file queue gets full. I store 5 files max in the queue.
Once my queue is full, file transfer stops.
I see the same behavior even if I increase or decrease the queue size. I wait for the files to be transferred for more than 2 hrs but nothing happens. So I decide to uninstall the clockface and suddenly I see all the files that are in the queue being transferred. This is consistent behavior.
Can we please have a fix for this. Thank you,
Kind regards,
Parag
07-17-2019 19:52 - edited 07-17-2019 20:04
07-17-2019 19:52 - edited 07-17-2019 20:04
Hi,
There was a Fitbit app new release yesterday. We still notice the same behavior.
Another observation: Once the files are stuck on the watch for long, There are 2 ways of clearing the queue.
1. restart the watch.
2. Go in setting or any other app(essentially you are unloading your app) and come back.
Thank you,
Parag
07-17-2019 19:55
07-17-2019 19:55
I'm guessing that the watch outbox problem can only be solved by a firmware update. Unfortunately, they don't happen very often.
08-02-2019 09:47
08-02-2019 09:47
Bumping this because it's still not resolved and a relevant issue for a few people.
08-14-2019 02:21
08-14-2019 02:21
I'm having the same critical issue. I didn't change source code for my app for the last 1.5 month. File Transfer was working perfectly. But when rebuilt the same source code now, I can't get my files successfully transferred via File Transfer. Is that linked to any update from the Fitbit side?
Any help is appreciated. Thanks
08-14-2019 02:46
08-14-2019 02:46
Dear all,
After multiple tests, I realized the watch cannot handle CPU intensive process. Remove them or find ways to reduce the frequency you are calling.
Hope this helps. thank you,
11-16-2019 13:14
11-16-2019 13:14
Can you confirm if this has been resolved with Fitbit OS 4.0.2 and the latest mobile apps?
11-17-2019 23:59
11-17-2019 23:59
Hi,
Yes, it works for me in Fitbit OS 4.0.2.
It is slow, but it does work. Thanks,
Parag