Malformed JSON Error

Posted on
Page
of 2
Prev
/ 2
  • I think if Gadgetbridge somehow doesn't receive the last 'packet' (I'm unsure on terminology) it wont get state=="end" so wont go into this if-statement where .unsetBusytask() should have been called.

  • @user156090 any news on that Gadgetbridge log? It would make our lives a lot easier trying to fix this, as it might be the activity fetch throws an exception that needs to be fixed in Bangle.js code.

    Thanks for tracking that down @Ganblejs! @joserebelo do you have any thoughts about this? I think that was your code for activity fetching...

    I know @Ganblejs has added some code on the Recording fetching PR that adds a timeout now, so maybe we could do something here and just say that if the record fetch has started but we don't receive any new records for a few seconds, we automatically end the task.

  • Hi there,
    please do excuse, real life got me distracted .... sorry. I am overwhelmed how quick you guys are responding and trying to help!
    Here is the Log I created. I do find it irritating. The device stated several JSON errors, still none are there in that file. But plenty of information not connected to the bangle.
    Anyway here's the log: (at 6p.m. I tried to synchronize)


    1 Attachment

  • Oh, and just to clayfiy, the device is not only stuck in the effort to synchronize. It is doing do in vain.

  • Thanks for the log! Although this is quite odd - I don't see any mention of Bangle.js stuff at all in there - no communications, not even a mention of n.f.g.s.d.b.BangleJSDeviceSupport which should be mentioned a little.

    It's as if the watch wasn't even connected?

  • That is what I found weird, too.
    To my best knowledge the watch is paired correctly and the app states to be connected as I start the download. Somewhen in that process it does disconnect tough, as I figured out lately.

    Tried another time - 7:20pm multiple "malformed json" errors:
    -unterminated object...
    -expect '.' after...
    -names must be strings...
    -expected literal value...
    -unterminated string...
    -unterminated object at character...

    attached another log, looks different now. Hope this helps.


    1 Attachment

  • Stumbled upon a report with logs attached over at the r/Gadgetbridge subreddit:

    https://www.reddit.com/r/Gadgetbridge/co­mments/1b82zje/banglejs_2_connects_to_an­droid_phone_but_no_data/

  • Thanks! That is perfect! As far as I can tell, there appears to be an issue where if you get a newline right at the beginning of a characteristic that's received, it effectively breaks reception of any extra data.

    Honestly it's very strange this hasn't come up before as the code has been like that for over 4 years! And the fact that you would appear to be seeing it all the time but others aren't is even more strange.

    I've just pushed a fix, so if you install a nightly build tomorrow this should then work

  • Thanx for taking care of!
    I'd love to give it a try, but (and this is most probably an idiots question), could I install the nightly parallel to stable release an connect the bangle to both?

  • could I install the nightly parallel to stable release an connect the bangle to both?

    I don't think so, no - or if you could it'd almost certainly break!

  • Short: works!
    Long: Sorry for the (quite severe) delay, again.
    finally fetching data works now. I did experience some weird behaviour right after updating, tough. I had to reinstall android integration, which was one of the first apps put to the device as I got it. Seemed strange to me, furthermore for a few days error massages did not change. I have NO idea what I did or why this happened, but all of the sudden they disappeared not to be seen again. At that time I tried to write a proper logfile, but could not get these errors to be written to one. (actually there was no logfile at all, where it was supposed to be????????)
    Anyhow everything works fine now. So a BIG Thank you !! @Gordon, @Ganblejs

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Malformed JSON Error

Posted by Avatar for PlaidFox @PlaidFox

Actions