Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection has no connected handler #24

Open
anotherstarburst opened this issue Feb 2, 2017 · 4 comments
Open

Connection has no connected handler #24

anotherstarburst opened this issue Feb 2, 2017 · 4 comments

Comments

@anotherstarburst
Copy link

anotherstarburst commented Feb 2, 2017

Firstly - great effort porting this to RN!

I've got twilio client set up and working for desktop web-browsers. I'm using the same server methods and endpoints to make a call from my ios10 device (not the simulator). I've corrected the RN imports as per #23 . I struggled at first because it seems that instead of

Twilio.initWithToken('sometoken');

one needs to use

Twilio.default.initWithToken('sometoken');

(the same for the other methods). However, no matter what I try I cannot manage to make an outbound call (microphone permissions have been enabled). As suggested I run the initWithToken on component mount and add the few listeners. Once I do I get the following errors

__nw_connection_get_connected_socket_block_invoke 1 Connection has no connected handler

but I understand from previous issues that we're to expect some errors filtering through. This does look suspect though...

I then go to

Twilio.default.connect({To: '+somenumber'})

But it fails with.

tsx0x1019e00a8  Temporary failure in sending Request msg INVITE/cseq=11711 (tdta0x1019fec00), will try next server: Operation timed out

I also tried the method I used in browser which has a params object for the server to facilitate the call but no dice.

Any clues on what may be going wrong?

@Moussawi7
Copy link

Moussawi7 commented Apr 22, 2017

Hi @anotherstarburst ,
In fact i have encountered exactly with same problem.
i am calling another client like this:
Twilio.default.connect({To: 'client:kevin'});
How did you solve this issue ?.
Thank you.

@ArtsNCode
Copy link

Hello,
Same issue here,
and this is the log:

'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(
0 CoreFoundation 0x00000001057a434b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010434e21e objc_exception_throw + 48
2 CoreFoundation 0x00000001056bad8f -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 351
3 CoreFoundation 0x00000001056babfb +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
4 kindi 0x00000001036ece87 -[TCConnectionInternal provideStats] + 1384
5 kindi 0x0000000103709b39 __21-[TCRTCMonitor start]_block_invoke + 70
6 libdispatch.dylib 0x00000001096a90cd _dispatch_client_callout + 8
7 libdispatch.dylib 0x00000001096851c3 _dispatch_continuation_pop + 1091
8 libdispatch.dylib 0x000000010969a1e2 _dispatch_source_latch_and_call + 195
9 libdispatch.dylib 0x0000000109692d7d _dispatch_source_invoke + 1098
10 libdispatch.dylib 0x0000000109689b2e _dispatch_main_queue_callback_4CF + 1006
11 CoreFoundation 0x00000001057684f9 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9
12 CoreFoundation 0x000000010572df8d __CFRunLoopRun + 2205
13 CoreFoundation 0x000000010572d494 CFRunLoopRunSpecific + 420
14 GraphicsServices 0x000000010b091a6f GSEventRunModal + 161
15 UIKit 0x0000000107d20f34 UIApplicationMain + 159
16 kindi 0x0000000103573c1f main + 111
17 libdyld.dylib 0x00000001096f568d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

@mobinni
Copy link

mobinni commented Aug 4, 2017

That's a react-native devtools error

@peacechen
Copy link

@anotherstarburst
The way you import this library probably is causing you to have to add .default to the import name.
For example, instead of
import {Twilio} from 'react-native-twilio'
try
import Twilio from 'react-native-twilio'

See https://stackoverflow.com/questions/31092142/why-cant-i-import-a-default-export-with-import-as-with-babeljs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants