"iceConnectionState" is "failed" without any error - webrtc
Browser: Chrome 62.0.3202.94, (64 bit)
OS: Ubuntu 16.04
I'm trying to create a data connection. I've done this before with this code a couple of months ago, but now I can't quite get it to work. The problem is that when I call pc.setRemoteDescription with an answer, iceConnectionState goes from new to checking and then to failed state and nothing happens after that (Chrome to Chrome connections)
When I run this code on a single machine (two separate browser tabs) everything works just fine. So, there's no problem when both endpoints are on the same network.
Here's a snapshot when connection is stuck (endpoints in different networks):
iceConnectionState: "failed"
iceGatheringState: "complete"
signalingState:"stable"
Offer:
v=0
o=- 2693235123136612430 3 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE data
a=msid-semantic: WMS
m=application 45251 DTLS/SCTP 5000
c=IN IP4 89.105.158.245
a=candidate:2795255774 1 udp 2122260223 192.168.1.7 45251 typ host generation 0 network-id 1 network-cost 10
a=candidate:264484875 1 udp 1686052607 89.105.158.245 45251 typ srflx raddr 192.168.1.7 rport 45251 generation 0 network-id 1 network-cost 10
a=candidate:3894397742 1 tcp 1518280447 192.168.1.7 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=ice-ufrag:t9xZ
a=ice-pwd:eqMc+d4DS9D/yWtM5um9jGzi
a=ice-options:trickle
a=fingerprint:sha-256 A2:8E:9B:D5:48:3F:46:A1:02:8B:42:AE:71:23:4E:68:27:CD:12:C5:2F:18:DA:64:86:08:E2:BA:19:30:1D:F4
a=setup:actpass
a=mid:data
a=sctpmap:5000 webrtc-datachannel 1024
Answer:
o=- 8717349184791425430 3 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE data
a=msid-semantic: WMS
m=application 24239 DTLS/SCTP 5000
c=IN IP4 145.255.177.124
b=AS:30
a=candidate:1019731727 1 udp 2122260223 192.168.1.104 53848 typ host generation 0 network-id 1 network-cost 10
a=candidate:1917068287 1 tcp 1518280447 192.168.1.104 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=candidate:3180321211 1 udp 1686052607 145.255.177.124 24239 typ srflx raddr 192.168.1.104 rport 53848 generation 0 network-id 1 network-cost 10
a=ice-ufrag:MkpV
a=ice-pwd:ziXJMu7r/UYnLx1srbUqkXp6
a=ice-options:trickle
a=fingerprint:sha-256 9D:2B:AB:D8:B4:65:5F:86:A6:2A:D8:D0:5A:54:D9:E1:81:B4:6F:21:A4:5D:36:FA:E0:D3:7F:0F:B2:10:8D:3E
a=setup:active
a=mid:data
a=sctpmap:5000 webrtc-datachannel 1024
Here's the code:
There are two approaches to handling ICE candidates — trickle way and non-trickle way. Here's the explanation of how they differ. Basically, in a non-trickle way ICE candidates are not sent out separately, but gathered together and sent out with an offer/answer in one package. I'm using the non-trickle approach here.
const signallingServerApi = {...} // api for sending/receiving messages
const iceServers = [ { urls: [ 'stun:stun.l.google.com:19302' ] } ]
let pc
let sdc
// INIT
const = call => () {
createDataConnection()
pc.createOffer()
.then(pc.setLocalDescription)
}
// HELPERS
const createDataConnection = () => {
pc = new window.RTCPeerConnection({ iceServers })
pc.ondatachannel = onDataChannel
pc.onicecandidate = onIceCandidate
sdc = pc.createDataChannel('sdc')
}
// PC EVENTS HANDLERS
const onDataChannel = (event) => {
rdc = event.channel
}
const onIceCandidate = (event) => {
if (event.candidate) return
const description = event.target.localDescription
signallingServerApi.send(description)
}
// SIGNALLING SERVER API CALLBACKS
signallingServerApi.onOffer = (offer) => {
createDataConnection()
pc.setRemoteDescription(offer)
.then(pc.createAnswer)
.then(pc.setLocalDescription)
}
signallingServerApi.onAnswer = (answer) => {
pc.setRemoteDescription(answer)
}
Here's a dump from chrome://webrtc-internals/
{
"getUserMedia": [
{
"audio": "",
"origin": "https://olmeo.us",
"pid": 5535,
"rid": 11,
"video": ""
}
],
"PeerConnections": {
"5535-1": {
"constraints": "",
"rtcConfiguration": "{ iceServers: [stun:stun.l.google.com:19302], iceTransportPolicy: all, bundlePolicy: balanced, rtcpMuxPolicy: require, iceCandidatePoolSize: 0 }",
"stats": {
"googLibjingleSession_579639950488086086-googInitiator": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]"
},
"bweforvideo-googActualEncBitrate": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]"
},
"bweforvideo-googAvailableReceiveBandwidth": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]"
},
"bweforvideo-googAvailableSendBandwidth": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[300000,300000,300000,300000,300000,300000,300000,300000,300000,300000,300000,300000,300000,300000,300000,300000,300000,300000,300000,300000]"
},
"bweforvideo-googBucketDelay": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]"
},
"bweforvideo-googRetransmitBitrate": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]"
},
"bweforvideo-googTargetEncBitrate": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]"
},
"bweforvideo-googTargetEncBitrateCorrected": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]"
},
"bweforvideo-googTransmitBitrate": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]"
},
"datachannel_-1-protocol": {
"startTime": "2017-12-19T14:10:33.510Z",
"endTime": "2017-12-19T14:10:33.510Z",
"values": "[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]"
},
"datachannel_-1-state": {
"startTime": "2017-12-19T14:10:33.510Z",
"endTime": "2017-12-19T14:10:33.510Z",
"values": "[\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\"]"
},
"datachannel_-1-label": {
"startTime": "2017-12-19T14:10:33.510Z",
"endTime": "2017-12-19T14:10:33.510Z",
"values": "[\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\"]"
},
"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F-googDerBase64": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[\"MIIBFTCBvaADAgECAgkA/PxGIi2N1zswCgYIKoZIzj0EAwIwETEPMA0GA1UEAwwGV2ViUlRDMB4XDTE3MTIxODE0MTAxNVoXDTE4MDExODE0MTAxNVowETEPMA0GA1UEAwwGV2ViUlRDMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEcKmntD/j3C7fLzVlUZxQU72eEKOUxMvWrqwul+iIJhUppEGgnEJbmRHZ4enDYDUYsDWfz47DEtsSIqCCvvqIWzAKBggqhkjOPQQDAg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tX4gkbDgIgSlRZD5NQETFAsm6XWQ2g904Zv4CTlXrbYsTp684NAw0=\",\"MIIBFTCBvaADAgECAgkA/PxGIi2N1zswCgYIKoZIzj0EAwIwETEPMA0GA1UEAwwGV2ViUlRDMB4XDTE3MTIxODE0MTAxNVoXDTE4MDExODE0MTAxNVowETEPMA0GA1UEAwwGV2ViUlRDMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEcKmntD/j3C7fLzVlUZxQU72eEKOUxMvWrqwul+iIJhUppEGgnEJbmRHZ4enDYDUYsDWfz47DEtsSIqCCvvqIWzAKBggqhkjOPQQDAgNHADBEAiABuB2RUnFUFAAUetxwyLYwr9+hMIuyvCcKpVtX4gkbDgIgSlRZD5NQETFAsm6XWQ2g904Zv4CTlXrbYsTp684NAw0=\",\"MIIBFTCBvaADAgECAgkA/PxGIi2N1zswCgYIKoZIzj0EAwIwETEPMA0GA1UEAwwGV2ViUlRDMB4XDTE3MTIxODE0MTAxNVoXDTE4MDExODE0MTAxNVowETEPMA0GA1UEAwwGV2ViUlRDMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEcKmntD/j3C7fLzVlUZxQU72eEKOUxMvWrqwul+iIJhUppEGgnEJbmRHZ4enDYDUYsDWfz47DEtsSIqCCvvqIWzAKBggqhkjOPQQDAgNHADBEAiABuB2RUnFUFAAUetxwyLYwr9+hMIuyvCcKpVtX4gkbDgIgSlRZD5NQETFAsm6XWQ2g904Zv4CTlXrbYsTp684NAw0=\"]"
},
"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F-googFingerprint": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:1f:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\"]"
},
"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F-googFingerprintAlgorithm": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\",\"sha-256\"]"
},
"Channel-data-1-googComponent": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]"
},
"Channel-data-1-localCertificateId": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:4E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\",\"googCertificate_CB:62:2A:C7:75:C0:6B:1F:48:66:61:5C:FF:C1:00:9C:48:D0:8B:ED:6E:57:F9:FB:DB:4A:9A:85:1F:02:F1:4F\"]"
},
"datachannel_1-datachannelid": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]"
},
"datachannel_1-protocol": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]"
},
"datachannel_1-state": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\",\"connecting\"]"
},
"datachannel_1-label": {
"startTime": "2017-12-19T14:10:59.205Z",
"endTime": "2017-12-19T14:11:18.194Z",
"values": "[\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\",\"sdc\"]"
}
},
"updateLog": [],
"url": "https://olmeo.us/requests"
}
},[
"UserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36"
}
EDIT
When I make a connection between Chrome and Firefox I get an error(in Firefox):
ICE failed, add a TURN server and see about:webrtc for more details
Stun server is reachable from both machines I tested it here, so there's no problem with candidate generation.
I'm not sure if it's relevant, but in answer's srflx candidate ports don't match (24239 !== 53848). Is it normal?
a=candidate:3180321211 1 udp 1686052607 145.255.177.124 24239 typ srflx raddr 192.168.1.104 rport 53848 generation 0 network-id 1 network-cost 10
What am I missing?
I've found that sometimes signalling receive candidates before handling received offer, and it makes iceConnectionState failed. You didn't provide part of code with addIceCandidate, so it's only assumption but you can try to add timeout before addIceCandidate code.
Related
Problem of integration krakend with keycloak
I have keycloak bitnami chart and krakend deployed in in k8s. Also I have a test api, and I want being authenticated before access it. I'm able to get valid jwt token from keycloak, but when I'm trying to access my api through krakend, it returns 401 error Any help is really appreciated. Software versions: keycloak: 16.1.1 crakend: 2.0.4 { "$schema": "https://www.krakend.io/schema/v3.json", "version": 3, "timeout": "3000ms", "cache_ttl": "300s", "output_encoding": "json", "port": 8080, "endpoints": [ { "endpoint": "/mock/parents/{id}", "method": "GET", "input_headers": [ "Authorization" ], "extra_config": { "auth/validator": { "alg": "RS256", "jwk-url": "http://keycloak-headless:8080/auth/realms/master/protocol/openid-connect/certs", "disable_jwk_security": true, "roles_key_is_nested": true, "roles_key": "realm_access.roles", "roles": ["test-app-parent"], "operation_debug": true } }, "output_encoding": "json", "concurrent_calls": 1, "backend": [ { "url_pattern": "/parents/{id}", "encoding": "json", "sd": "static", "extra_config": {}, "host": [ "http://testapp-service:8400" ], "disable_host_sanitize": false, "blacklist": [ "super_secret_field" ] }, { "url_pattern": "/siblings/{id}", "encoding": "json", "sd": "static", "extra_config": {}, "host": [ "http://testapp-service:8400" ], "blacklist": [ "sibling_id" ], "group": "extra_info", "disable_host_sanitize": false }, { "url_pattern": "/parents/{id}/children", "encoding": "json", "sd": "static", "extra_config": {}, "host": [ "http://testapp-service:8400" ], "disable_host_sanitize": false, "mapping": { "content": "cars" }, "whitelist": [ "content" ] } ] }, { "endpoint": "/mock/bogus-new-api/{path}", "method": "GET", "extra_config": { "auth/validator": { "alg": "RS256", "jwk-url": "http://keycloak-headless:8080/auth/realms/master/protocol/openid-connect/certs", "disable_jwk_security": true }, "github.com/devopsfaith/krakend/proxy": { "static": { "data": { "new_field_a": 123, "new_field_b": [ "arr1", "arr2" ], "new_field_c": { "obj": "obj1" } }, "strategy": "always" } } }, "output_encoding": "json", "concurrent_calls": 1, "backend": [ { "url_pattern": "/not-finished-yet", "encoding": "json", "sd": "static", "extra_config": {}, "host": [ "nothing-here" ], "disable_host_sanitize": false } ] } ] }
Oh my God this made me go insane. In one of the last version updates they changed jwk-url to jwk_url. https://github.com/krakendio/krakend-ce/issues/495#issuecomment-1138397005 After I fixed that it worked for me.
It worked for me after I changed "jwk_url": "http://KEYCLOAK-SERVICE-NAME:8080/auth/realms/master/protocol/openid-connect/certs" to "jwk_url": "http://host.docker.internal:8080/auth/realms/master/protocol/openid-connect/certs"
Is there a known problem with HERE map tiles api in the last few days?
we are receiving errors from the HERE map tiles rest API, but the error is only when trying to get the map tiles with a computer located in Florida. From a computer located in Israel, everything is fine. Any known issue? See below - "_priority": "High", "_resourceType": "image", "cache": {}, "pageref": "page_1", "request": { "method": "GET", "url": "https://3.aerial.maps.cit.api.here.com/maptile/2.1/maptile/newest/satellite.day/15/9050/13824/256/png8?app_id=XXX=eng", "httpVersion": "", "headers": [ { "name": ":method", "value": "GET" }, { "name": ":authority", "value": "3.aerial.maps.cit.api.here.com" }, { "name": ":scheme", "value": "https" }, { "name": ":path", "value": "/maptile/2.1/maptile/newest/satellite.day/15/9050/13824/256/png8?app_id=XXX=eng" }, { "name": "user-agent", "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" }, { "name": "accept", "value": "image/avif,image/webp,image/apng,image/*,*/*;q=0.8" }, { "name": "sec-fetch-site", "value": "cross-site" }, { "name": "sec-fetch-mode", "value": "no-cors" }, { "name": "sec-fetch-dest", "value": "image" }, { "name": "referer", "value": "https://eu.percepto.co/" }, { "name": "accept-encoding", "value": "gzip, deflate, br" }, { "name": "accept-language", "value": "en-US,en;q=0.9" } ], "queryString": [ { "name": "app_id", "value": "XXX" }, { "name": "app_code", "value": "XXX" }, { "name": "lg", "value": "eng" } ], "cookies": [], "headersSize": -1, "bodySize": 0 }, "response": { "status": 0, "statusText": "", "httpVersion": "", "headers": [], "cookies": [], "content": { "size": 0, "mimeType": "x-unknown" }, "redirectURL": "", "headersSize": -1, "bodySize": -1, "_transferSize": 0, "_error": "net::ERR_ABORTED" }, "serverIPAddress": "", "startedDateTime": "2020-11-30T18:10:30.325Z", "time": 1.3352910000830889, "timings": { "blocked": 1.3352910000830889, "dns": -1, "ssl": -1, "connect": -1, "send": 0, "wait": 0, "receive": 0, "_blocked_queueing": -1 } },
Sometimes HERE services are down in some region and you can see the status of the services at this link: HERE System Status
Automatic restart of workflows in node-red
I asked this question also in the node-red forum, but there is not much activity (compared to stackoverflow). So I try it here again. The motivation of my question is, that I sometime loose the connection to an OPC-UA-Server that requires restart of the flow to work again. I want to do this automatically in background, because the rare restart of the flow is no big issue - so I can live with it. There is a thread https://discourse.nodered.org/t/how-to-restart-flows-automatically/12993 that is not really finished or solved. I implemented the last example, but get error 400, so automatic restart of flow doesn't work. Is there any fool proof description how to do this? EDIT: This is the code: [ { "id": "3623f8cf.b4d2b8", "type": "subflow", "name": "restart flows", "info": "", "category": "", "in": [ { "x": 40, "y": 80, "wires": [ { "id": "f24fbf79.77a74" } ] } ], "out": [ { "x": 960, "y": 80, "wires": [ { "id": "cb4d3992.931138", "port": 0 } ] } ], "env": [ { "name": "user", "type": "str", "value": "" }, { "name": "password", "type": "str", "value": "" } ], "color": "#FF8888", "inputLabels": [ "Injection" ], "icon": "node-red/alert.svg" }, { "id": "f24fbf79.77a74", "type": "function", "z": "3623f8cf.b4d2b8", "name": "Request Token", "func": "var user = env.get('user');\nvar pass = env.get('password');\n\nif(user === undefined || user === null)\n{\n user = 'adminuser';\n}\nif(pass === undefined || pass === null)\n{\n pass = 'adminpass';\n}\n\nmsg.payload = {\n \"client_id\": \"node-red-editor\",\n \"grant_type\": \"password\",\n \"scope\": \"*\",\n \"username\": user,\n \"password\": pass\n}\nreturn msg;\n\n/*\nmsg.payload = {\n \"client_id\": \"node-red-editor\",\n \"grant_type\": \"password\",\n \"scope\": \"*\",\n \"username\": \"type or username\",\n \"password\": \"type your password\"\n}\nreturn msg;\n*/", "outputs": 1, "noerr": 0, "x": 200, "y": 80, "wires": [ [ "3aedf561.e16f4a" ] ] }, { "id": "3aedf561.e16f4a", "type": "http request", "z": "3623f8cf.b4d2b8", "name": "Token", "method": "POST", "ret": "txt", "paytoqs": false, "url": "http://servername:port/auth/token", "tls": "", "persist": false, "proxy": "", "authType": "", "x": 390, "y": 80, "wires": [ [ "388fe2f5.639eee" ] ] }, { "id": "388fe2f5.639eee", "type": "function", "z": "3623f8cf.b4d2b8", "name": "Confirm token", "func": "// get the status of the request\nvar status = msg.statusCode;\nvar token = '';\nmsg.headers ={};\n\n//let node = feedback;\n\nswitch(status){\n case 200:\n node.log(\"Secure restart\");\n token = JSON.parse(msg.payload);\n token = 'Bearer '+token.access_token;\n msg.headers = {\n \"Authorization\": token,\n \"Node-RED-Deployment-Type\":\"reload\"\n }\n msg.payload =\"\";\n break;\n case 204:\n node.log(\"Secure without restart\");\n global.set('result','\tSuccess - with no further content');\n break;\n case 400:\n node.warn(\"Bad request\");\n break;\n case 401:\n node.warn(\"Not authorized\");\n break;\n case 403:\n node.warn(\"Forbidden\");\n break;\n case 404:\n node.log(\"Unsecure restart\");\n msg.headers = {\n \"Node-RED-Deployment-Type\":\"reload\"\n }\n break;\n case 409:\n node.warn(\"Version mismatch\");\n break;\n case 500:\n node.error(\"Server Error\");\n break;\n default:\n node.warn(\"Unknown Error\");\n break;\n}\n\nmsg.payload = \"\";\n\nsetTimeout(function() { node.send(msg) }, 10000);\n\nreturn null;", "outputs": 1, "noerr": 0, "x": 580, "y": 80, "wires": [ [ "cb4d3992.931138" ] ], "info": "Restart of Node-Red flows.\nWill check if the action needs security or not.\nNote: if the first 5 attemps return a statuscode 403 'forbidden'\nthen the server will break and only way to recover is then to\nrestart the service" }, { "id": "cb4d3992.931138", "type": "http request", "z": "3623f8cf.b4d2b8", "name": "Restart", "method": "POST", "ret": "txt", "paytoqs": false, "url": "http://servername:port/flows", "tls": "", "persist": false, "proxy": "", "authType": "", "x": 780, "y": 80, "wires": [ [] ] } ] The settings.js file is as follows: adminAuth: { type: "credentials", users: [ { username: "adminuser", password: "adminpass", permissions: "*" }, Hope this helps.
UCWA - Accepting an incoming onlineMeetingInvitation
Summary I have a UCWA application and I would like it to accept incoming onlineMeetingInvitation events and then monitor all messages. While I have been able to accept the invitation successfully, I do not receive events for any messages. I believe this may be because the messaging modality is not connected by default, so I am attempting to addMessaging. Unfortunately, this request always returns with a 409 error and the message, There was a conflict that prevented the operation from starting. Please try again later. Does anyone know, a. If attempting to addMessaging is correct? b. Why I am getting the above error? Details I set up have two normal Lync Clients in conversation. I then invite my UCWA application's user into the conversation. This results in the following response on my event channel, (including the accept link as expected) { "_links": { "self": { "href": "/ucwa/oauth/v1/applications/102547331865/events?ack=28" }, "next": { "href": "/ucwa/oauth/v1/applications/102547331865/events?ack=29" } }, "sender": [ { "rel": "me", "href": "/ucwa/oauth/v1/applications/102547331865/me", "events": [ { "link": { "rel": "presence", "href": "/ucwa/oauth/v1/applications/102547331865/me/presence" }, "type": "updated" } ] }, { "rel": "communication", "href": "/ucwa/oauth/v1/applications/102547331865/communication", "events": [ { "link": { "rel": "onlineMeetingInvitation", "href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f" }, "_embedded": { "onlineMeetingInvitation": { "direction": "Incoming", "importance": "Normal", "threadId": "AdIw2sMaOjuEJHfcRJiiK5Czug+5Ug==", "state": "Connecting", "subject": "", "onlineMeetingUri": "sip:test.user2#xxx.xxx.xx;gruu;opaque=app:conf:focus:id:KS77KG4B", "availableModalities": [ "Messaging" ], "_links": { "self": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f" }, "to": { "href": "/ucwa/oauth/v1/applications/102547331865/people/test.user1#xxx.xxx.xx" }, "conversation": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d" }, "accept": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f/accept" }, "decline": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f/decline" } }, "_embedded": { "from": { .... I perform a POST on the 'accept' href which responds succesfully with no content. I then receive 2 event responses, the 2nd of which includes the following ... { "rel": "communication", "href": "/ucwa/oauth/v1/applications/102547331865/communication", "events": [ { "link": { "rel": "conversation", "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d" }, "_embedded": { "conversation": { "state": "Conferenced", "threadId": "AdIw2sMaOjuEJHfcRJiiK5Czug+5Ug==", "subject": "", "activeModalities": [ "Messaging" ], "importance": "Normal", "participantCount": 3, "audienceMute": "Disabled", "audienceMessaging": "Enabled", "recording": false, "_links": { "self": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d" }, "applicationSharing": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/applicationSharing" }, "audioVideo": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/audioVideo" }, "dataCollaboration": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/dataCollaboration" }, "messaging": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging" }, "phoneAudio": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/phoneAudio" }, "localParticipant": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants/test.user1#xxx.xxx.xx", "title": "Test User1" }, "addParticipant": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/participantInvitations?conversation=3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d" }, "leaders": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=leaders" }, "attendees": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=attendees" }, "lobby": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=lobby" }, "onlineMeeting": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/onlineMeeting" }, "enableAudienceMuteLock": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/enableAudienceMuteLock" }, "disableAudienceMessaging": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/disableAudienceMessaging" } }, "rel": "conversation" } }, "type": "updated" } ] }, ... { "link": { "rel": "messaging", "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging" }, "_embedded": { "messaging": { "state": "Disconnected", "_links": { "self": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging" }, "conversation": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d" }, "addMessaging": { "href": "/ucwa/oauth/v1/applications/102547331865/communication/messagingInvitations?conversation=3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d" } }, "rel": "messaging" } }, "type": "updated" }, ... Again, I believe this is as expected and at this point the original Lync Clients are showing 3 participants as expected. Next I try to do a POST to the addMessaging href in the above snippet. The POST has no body. URI : https://xxx.xxx.xx/ucwa/oauth/v1/applications/102547331865/communication/messagingInvitations?conversation=0ae942e4-9133-4888-a0fb-8a7b182fff00 Method : POST Headers : {Accept=[text/plain, application/json, application/*+json, */*], Content-Length=[0]} Request body: The result is a 409 Conflict, and at no point do I receive events for new messages added to the conversation by the two Lync clients. Header {Cache-Control=[no-cache], Pragma=[no-cache], Via=[1.1 DEVLYNC2.xxx.xxx.xx RtcInt], Content-Length=[120], Content-Type=[application/json], Expires=[-1], Server=[Microsoft-IIS/7.5], X-MS-Server-Fqdn=[DEVLYNC2.xxx.xx.xx], X-AspNet-Version=[4.0.30319], Strict-Transport-Security=[max-age=31536000; includeSubDomains], X-Powered-By=[ASP.NET], Date=[Fri, 28 Oct 2016 07:31:51 GMT]} Body {"code":"Conflict","message":"There was a conflict that prevented the operation from starting. Please try again later."}
your problem seems solved by adding the operationId, even though it was mentioned as optional in the UCWA documentation. The root cause is probably that there is a reproducable bug in the display of the microsoft documentation about UCWA : for example https://ucwa.skype.com/documentation/resources-startmessaging the dropdown list to select the version of the API is not visible. This bug happens only with Mozilla Firefox and I see in your logs that it is the version you are using (nb : I tested with version 61). With Chrome it displays correctly and you can see that the operationID is sometimes mandatory (on some versions of the API only). The version of the API used by your server can be determined from this link : https://learn.microsoft.com/en-us/skype-sdk/ucwa/versioning I hope this can help you to solve further problems with UCWA - without the need to use the trial-and-error method.
Apache 2.4 sending old pages
I have an apache 2.4 server, which serves a file called resource.js. When I request the resource, it returns an old page. My browser does not send an ETAG or Last-Modified header in the request, presumably because it doesn't have this resource cached. Here's a snippet of the HAR when this happens { "startedDateTime": "2014-04-30T21:01:36.384Z", "time": 0, "request": { "method": "GET", "url": "https://someserver/resource.js", "headers": [ { "name": "User-Agent", "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36" } ], "queryString": [], "cookies": [], "headersSize": -1, "bodySize": 0 }, "response": { "status": 200, "statusText": "OK", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Date", "value": "Wed, 30 Apr 2014 20:46:57 GMT" }, { "name": "Last-Modified", "value": "Thu, 24 Apr 2014 23:42:51 GMT" }, { "name": "Server", "value": "Apache/2.4.4 (Unix) OpenSSL/1.0.1 PHP/5.4.12" }, { "name": "ETag", "value": "\"e00-4f7d2684c7fb9\"" }, { "name": "Content-Type", "value": "application/javascript" }, { "name": "Connection", "value": "Keep-Alive" }, { "name": "Accept-Ranges", "value": "bytes" }, { "name": "Keep-Alive", "value": "timeout=5, max=98" }, { "name": "Content-Length", "value": "3584" } ], "cookies": [], "content": { "size": 3584, "mimeType": "application/javascript", "text": "...." }, "redirectURL": "", "headersSize": 318, "bodySize": 0 }, "cache": {}, "timings": { "blocked": -1, "dns": -1, "connect": -1, "send": 0, "wait": 0, "receive": 0, "ssl": -1 }, "connection": "48540", "pageref": "page_1" }, I know it's an old page, because I can verify the content of the page is not what is on the server. Also, note that the response returns an ETAG (that is wrong) and a Last-Modified date that's 7 days old when I modified this file today. On the subsequent request though, the apache server returns the right page, after the ETAG and Last-Modified headers are submitted as part of the request: { "startedDateTime": "2014-04-30T21:03:02.771Z", "time": 490.7269477844238, "request": { "method": "GET", "url": "https://someserver/resource.js", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Cookie", "value": "__utma=37592696.1580400495.1393617937.1393617937.1394060568.2; __utmz=37592696.1393617937.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); m=1933:60%7C5|2491:chart|34e2:|4e71:small" }, { "name": "Accept-Encoding", "value": "gzip,deflate,sdch" }, { "name": "Host", "value": "someserver" }, { "name": "Accept-Language", "value": "en-US,en;q=0.8" }, { "name": "User-Agent", "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36" }, { "name": "Accept", "value": "*/*" }, { "name": "Cache-Control", "value": "max-age=0" }, { "name": "If-None-Match", "value": "\"e00-4f7d2684c7fb9\"" }, { "name": "Connection", "value": "keep-alive" }, { "name": "If-Modified-Since", "value": "Thu, 24 Apr 2014 23:42:51 GMT" }, { "name": "Referer", "value": "https://someserver" } ], "queryString": [], "cookies": [ { "name": "__utma", "value": "37592696.1580400495.1393617937.1393617937.1394060568.2", "expires": null, "httpOnly": false, "secure": false }, { "name": "__utmz", "value": "37592696.1393617937.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)", "expires": null, "httpOnly": false, "secure": false }, { "name": "m", "value": "1933:60%7C5|2491:chart|34e2:|4e71:small", "expires": null, "httpOnly": false, "secure": false } ], "headersSize": 667, "bodySize": 0 }, "response": { "status": 200, "statusText": "OK", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Date", "value": "Wed, 30 Apr 2014 21:03:03 GMT" }, { "name": "Last-Modified", "value": "Wed, 30 Apr 2014 21:01:19 GMT" }, { "name": "Server", "value": "Apache/2.4.4 (Unix) OpenSSL/1.0.1 PHP/5.4.12" }, { "name": "ETag", "value": "\"8bd-4f848d99ceae4\"" }, { "name": "Content-Type", "value": "application/javascript" }, { "name": "Connection", "value": "Keep-Alive" }, { "name": "Accept-Ranges", "value": "bytes" }, { "name": "Keep-Alive", "value": "timeout=5, max=100" }, { "name": "Content-Length", "value": "2237" } ], "cookies": [], "content": { "size": 2237, "mimeType": "application/javascript", "compression": 0, "text": "..." }, "redirectURL": "", "headersSize": 321, "bodySize": 2237 }, "cache": {}, "timings": { "blocked": 2.418000000034226, "dns": 69.07200000023295, "connect": 182.09600000045612, "send": 0.08100000013655517, "wait": 235.99800000010873, "receive": 1.0619477834552526, "ssl": 181.40800000037416 }, "connection": "49670", "pageref": "page_2" }, And as expected, on the 3rd request, the ETAG and Last-Modified are good so the apache server sends back a 304 response code: { "startedDateTime": "2014-04-30T21:14:56.248Z", "time": 138.21721076965332, "request": { "method": "GET", "url": "https://someserver/resource.js", "httpVersion": "HTTP/1.1", "headers": [ { "name": "If-None-Match", "value": "\"8bd-4f848d99ceae4\"" }, { "name": "Accept-Encoding", "value": "gzip,deflate,sdch" }, { "name": "Host", "value": "someserver" }, { "name": "Accept-Language", "value": "en-US,en;q=0.8" }, { "name": "User-Agent", "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36" }, { "name": "Accept", "value": "*/*" }, { "name": "Referer", "value": "https://someserver" }, { "name": "Cookie", "value": "__utma=37592696.1580400495.1393617937.1393617937.1394060568.2; __utmz=37592696.1393617937.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); m=1933:60%7C5|2491:chart|34e2:|4e71:small" }, { "name": "Connection", "value": "keep-alive" }, { "name": "If-Modified-Since", "value": "Wed, 30 Apr 2014 21:01:19 GMT" } ], "queryString": [], "cookies": [ { "name": "__utma", "value": "37592696.1580400495.1393617937.1393617937.1394060568.2", "expires": null, "httpOnly": false, "secure": false }, { "name": "__utmz", "value": "37592696.1393617937.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)", "expires": null, "httpOnly": false, "secure": false }, { "name": "m", "value": "1933:60%7C5|2491:chart|34e2:|4e71:small", "expires": null, "httpOnly": false, "secure": false } ], "headersSize": 653, "bodySize": 0 }, "response": { "status": 304, "statusText": "Not Modified", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Date", "value": "Wed, 30 Apr 2014 21:14:56 GMT" }, { "name": "ETag", "value": "\"8bd-4f848d99ceae4\"" }, { "name": "Server", "value": "Apache/2.4.4 (Unix) OpenSSL/1.0.1 PHP/5.4.12" }, { "name": "Connection", "value": "Keep-Alive" }, { "name": "Keep-Alive", "value": "timeout=5, max=100" } ], "cookies": [], "content": { "size": 2237, "mimeType": "application/javascript", "text": "..." }, "redirectURL": "", "headersSize": 203, "bodySize": 0 }, "cache": {}, "timings": { "blocked": 5.732999999963795, "dns": -1, "connect": -1, "send": 0.07100000038917642, "wait": 118.89599999994971, "receive": 13.51721076935064, "ssl": -1 }, "connection": "51334", "pageref": "page_1" }, If anyone knows why the first request returns the wrong page, please let me know.