(NRF/GATT).getPrimaryService() error handling issue #1838
Replies: 14 comments
-
Posted at 2016-12-18 by ChristianW And another one with NRF:
(Seems to occur when I try to connect a device that is already connected by another puck at this time) Any way to catch this? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by @gfwilliams Have you updated your firmware to 1v90? The promise returning If you're getting I guess it could be something strange with the promise implementation and your use of the second argument to Have you tried just:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by ChristianW Yes, everything updated to 1v90 already. Is the single, final |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by @gfwilliams Yes, I believe it's supposed to. I'll take a look and see what's up. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by @gfwilliams Looks like there's a problem when a rejected promise is returned inside a promise.
Sorry about that - I'm really surprised that one slipped through. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by @gfwilliams Ok, it's fixed now. Updated firmware should be attached. With how busy I am at the moment it's unlikely there will be a 1v91 release until the new year, but at least you can use this firmware until that point. Both methods of catching (
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-20 by ChristianW Wow. That was quick. Thank you very much. I just got into setting up the build process and had a look into the source as well. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-20 by @gfwilliams That'd be great! Let me know if there are any issues - I think the build instructions may need a bit of updating - this thread may help: http://forum.espruino.com/conversations/297524/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-20 by ChristianW Actually I did look at that thread (OS X here too) and was able to get a first build (untested):
;-) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-20 by ChristianW @gfwilliams: Just updated and tested: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-27 by thedamos @gfwilliams: I think there is still something going on. I had been banging my head against my table trying to get one of my pucks controlling the other via bluetooth and kept getting the unhandled promise rejection error. Then I found this thread and updated the firmware to 1v90.5. However, that didn't solve my problem. To make sure it wasn't something dumb on my part, I copied and pasted the code from the Controlling Other Pucks example (from the "Making it Faster" section). After pressing the button roughly 25 - 30 times I either get the error or no error displays in the console but the master puck stops controlling the other puck. The puck itself is still responsive to console commands, so it doesn't appear to be freezing or anything strange like that. My best guess is that the For completeness, the console looks like this once the error occurs:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-01 by goliatone FYI The updated firmware provided in the previous post seems to be missing in the "binaries folder". |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-01 by ChristianW @goliatone you are right.
So this is no official build. You only find it uploaded further up in this thread. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-04 by @gfwilliams Does the 1v90.12 firmware work better? I didn't want to update the official build before I went on holiday as it'd annoy a lot of people if it broke something and then I didn't fix it for 2 weeks - but I'll release 1v91 soon |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-12-18 by ChristianW
I'm going nuts. Trying to discover devices, services, characteristics.
When everything exists - no problem.
But I'd like to handle that a service is not defined.
This is my simplified code:
On execution neither
f=>{
nor.catch(e=>{
are called:Is this a bug or have I messed up my Promises?
Beta Was this translation helpful? Give feedback.
All reactions