Twilio-使用令牌创建客户端的问题

时间:2018-10-10 06:26:18

标签: twilio twilio-programmable-chat

我是Twilio和Angular的新手!

我正在使用从服务器获取的Twilio令牌在Angular2中创建一个Twilio客户端。但是我越来越错误了。

  

我已经为Twilio-chat安装了NuGet软件包。

用于创建Twilio客户端的代码。

const client = await Client.create(this.token);

错误

vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:2100 ERROR Error: Uncaught (in promise): Error: Can't connect to twilsock
Error: Can't connect to twilsock
    at Upstream.send (upstream.js?6143:144)
    at TwilsockClient.post (client.js?d83e:150)
    at executeWithRetry (network.js?2fab:122)
    at Retrier.retrier.on (network.js?2fab:78)
    at Retrier.EventEmitter.emit (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:79200)
    at Retrier.attempt (retrier.js?cc7c:28)
    at timeout.setTimeout (retrier.js?cc7c:67)
    at ZoneDelegate.invokeTask (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84187)
    at Zone.runTask (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:83954)
    at ZoneTask.invokeTask (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84262)
    at ZoneTask.invoke (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84251)
    at timer (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:85791)
    at Upstream.send (upstream.js?6143:144)
    at TwilsockClient.post (client.js?d83e:150)
    at executeWithRetry (network.js?2fab:122)
    at Retrier.retrier.on (network.js?2fab:78)
    at Retrier.EventEmitter.emit (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:79200)
    at Retrier.attempt (retrier.js?cc7c:28)
    at timeout.setTimeout (retrier.js?cc7c:67)
    at ZoneDelegate.invokeTask (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84187)
    at Zone.runTask (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:83954)
    at ZoneTask.invokeTask (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84262)
    at ZoneTask.invoke (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84251)
    at timer (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:85791)
    at resolvePromise (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84575)
    at resolvePromise (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84541)
    at vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84624
    at ZoneDelegate.invokeTask (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84187)
    at Object.onInvokeTask (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:5392)
    at ZoneDelegate.invokeTask (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84186)
    at Zone.runTask (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:83954)
    at drainMicroTaskQueue (vendor.js?v=Y21ivCkyOiPlokFTbKpKeeclguwnaH8po-6x_Nx58pI:84361)

0 个答案:

没有答案