WebRTC app not working on firefox - firefox

I have a very tremendous issue in my app. App is using webrtc to create video connection between two people.
Currently the app it's in the test phase.
Everything is working fine on Chrome, but on Firefox there is a strange issue.
When the second Peer connects I receive this error:
Error adding ice candidate for pcInvalidStateError: setRemoteDescription needs to called before addIceCandidate
I know that the error message seems to be clear, but how it's possible that on Chrome this error does not exist?
I mean, maybe there is a bigger issue, not completely depending on this error message.
Do you have any ideas or solutions to this?

A part from WebRTC doc: (See Deprecated Exception section)
Deprecated exceptions
When using the deprecated callback-based version of
setRemoteDescription(), the following exceptions may occur:
InvalidStateError The connection's signalingState is "closed",
indicating that the connection is not currently open, so negotiation
cannot take place.
You should check you are not using deprecated callback version of this function. Also you should keep an eye on signalingState of the peer connection.
Hope it helps!

Related

What exactly happens when we disable history in Firefox?

I have a problem with live video streams in the system I am developing that happens only in Firefox and only in normal mode.
The player correctly loads the stream, but after a few seconds can't continue to load and just keeps trying and trying forever.
This doesn't happen in Chrome, nor if I load the page in Private Mode, nor with normal videos. Just with live streams, just in Firefox, just in normal mode.
This happens both in local development (home, remote connection) and in the corporative cloud.
It's an Angular 8/NodeJs system and the player I use is Clappr. I changed to Video.js and the problem continued.
The stream is coming from a load balancer with 6 children servers, each one with an apache server who have a proxy to an icecast server that originates the stream.
[load balancer] < [6 child servers with apache server proxy] > [icecast server]
I work for a very large company that has an IPS system installed. It was the first thing I thought. But the IPS team could not find any blocked traffic. Also if it was that, why would the traffic not be blocked in private mode?
So I thought about trying to pinpoint what the exact configuration is different in private mode that does the trick and I figured out that disabling all history (not only navigation and downloads or forms) makes it work too.
Does anyone knows what exactly happens when the navigation history is disabled? Besides not saving history, does it have an impact on something else? Some type of cache, network or something like that? Anyone has any idea about how to make stream work without disabling history? I can't ask my users to disable history just to use my system.
EDIT
One thing that may be relevant to the issue is that in Firefox it doesn't show LIVE label when the transmission starts. It shows a negative number. Maybe this could create some problem with the history.
I couldn't find the information on what exactly happens when we disable history in Firefox, but I could solve the problem of playing the stream in Firefox, so I won't accept this answer, but leave it here for future reference in case someone has a similar problem.
I solved it by adding ?nocache=<random integer of length 10> to the video url. Please notice that if you already have some parameter in your url, you can't have 2 ? characters in your url and have to mix parameters correctly.

Fineuploader to Azure Blob storage not always working

So I have implemented fineuploader uploading to azure blob storage and fully followed all instructions in the guides, including setting up CORS, error handling, signature creation, file completion notification etc. But for some reason Im getting inconsistent results from different people around the world.
I have tested successfully on Chrome 53 uploading large files. I have seen other users upload using Safari 9.1 on OS X 10.11 failing with errors that do not get logged to my server even though I have implemented an AJAX call when onError callback occurs.
Up until yesterday I had used fineuploader with AWS for the past 4 months with a success rate of around 80% of video files uploaded successfully. But I decided it was time to try Azure to see if I can get a higher success rate. Unfortunately so far I cant.
Would REALLY love any advice anyone has before I have to start looking at an alternative way for people to upload videos to our website....
Sometimes, users’ networks could be unreliable, and uploads could fail. Fine Uploader offers the ability to retry via enable the retry option. You could check your code to make sure whether you enable the retry option.
retry: {
enableAuto: true
}
Besides, it seems that onError callback function doesn’t help you collect the error logs, and you don’t want to let users report error details. You could try to setup same environment with Safari 9.1 on OS X 10.11 to reproduce the issue on your side. And Fine Uploader provides the debug option which will make the plugin spit out logging messages to the browser's developer tools console. You could enable the Debug mode to diagnose application errors, and then you could see errors in the console tab.
debug: true,
For more information about the retry option and the debug option, you could check this documentation.

bad internet connection and PFQueryCollectionViewController

I was testing my app and I noticed this error message popping up from the PFQueryCollectionViewController:
2015-07-06 21:40:58.445 Noms[320:29335] [Error]: The Internet connection appears to be offline. (Code: 100, Version: 1.7.5)
2015-07-06 21:40:58.446 Noms[320:29335] [Error]: Network connection failed. Making attempt 2 after sleeping for 1.604623 seconds.
This was expected, since my phone was not connected to the internet. However, I want to detect this error and handle it myself, rather having the endless loading scroll on the screen. Looking at the documentation didn't yield any variables that I thought could be useful.
Does anyone know how I might receive this callback so I can handle them?
Parse provides a "cancel" method on all PFQueries, including the one in PFQueryTableViewController. In theory, you could cancel your query after a timeout of your choosing. Unfortunately, many developers are reporting a bug in that method that prevents it from working.
My best recommendation recommendation is to check for internet connection before firing your query. Apple's Reachability project is a great tool for this.

SignalR Intermittent Failure to call client method

I am currently using SignalR 2.0 and MVC 5.0 for my project. All the signalR update works fine except when I have updated the web.config file which causes the application pool to recycle. This is the starting point I notice SignalR behaving inconsistently. Sometimes I need to perform an action multiple times before the SignalR update can be propagated to the client. I have enabled the SignalR logging and I can't see anything displayed in the log whenever it failed to propagate to the client.
Do we need to do something in the hub, like reconnect or anything when the app pool got recycled?
At the moment, i didnt do anything in terms of coding and simply refresh the page. But it gives me that problems with SignalR. And the only way to fix that intermittent problem completely is to reboot the server.
Have anyone experienced this kind of behavior in SignalR?
Thanks in advance.

What does CFNetwork error -4 in domain CFStreamErrorHTTP mean?

A customer is reporting a connection failure with a strange profile: it apparently only fails for the very first URL request via CFNetwork since the app has launched.
The error code apparently being returned by CFNetwork is domain CFStreamErrorHTTP, but with error code -4, which does not correspond to any publicly defined error code for this domain.
In CFHTTPStream.h, the publicly defined error codes for CFStreamErrorHTTP end auspiciously at -3, strongly hinting that -4 may be an error code that Apple is using but which has not yet been publicly documented.
Any idea what's going on here? Has anybody else seen this error code and found rhyme or reason for it?
Probably not the final answer and this may have changed since they closed sourced CFNetwork, but I did find the following online which indicates that -4 is a connection lost error.
http://www.opensource.apple.com/source/CFNetwork/CFNetwork-129.9/HTTP/CFHTTPConnection.c
I guess you'll have to show some of the code that's failing, but a few questions spring to mind. First, can you trace this issue yourself, can you reproduce it? In particular, it would be interesting to see on which thread this happens, and what's the current runLoop mode. It could be indicative of a stream or connection that fails scheduling on the internal CF runloops.
Other than this (and it's a shame CFNetwork is no longer publicly updated), it could be a zillion things, but you'll need to log as much information as you can if you can't directly debug the failure (hint hint -- https://github.com/fpillet/NSLogger can help you remotely log the info from the client).
Finally, ask the question on Mac Dev Forums (or iOS Dev Forums if your code runs on iOS). Ping Quinn, He Knows It All. Once he can't publicly answer the question, open a DTS incident and send him the ticket #. He's the guy you want to look into your problem :-)

Resources