Last post Jul 16, 2020 10:51 AM by bzero
Jul 15, 2020 01:34 PM|bzero|LINK
hello guys, we are trying to upgrade cordova-ios to 6.1.0 since uiwebview is deprecated and wont be accepted on stores anymore. but after upgrading we faced a connectivity issue with signalr that we didn't have before. excuse me, but all i have is
this, since i don't know what our problem is.
for a start i got this call:
Status: 200 OK
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
Access-Control-Allow-Methods: GET, POST
Date: Wed, 15 Jul 2020 12:37:22 GMT
Query String Parameters
although the status is 200 ok, the call is marked in red as it failed, and preview give this: an error occurred trying to load the resource
and then i have this error in console:
XMLHttpRequest cannot load http://192.168.47.105:55554/signalr/abort?transport=serverSentEvents&clientProtocol=1.5&connectionToken=OC0LMC6PzDP%2BbksoG4PF3OlmAX6ScrTdg3yOxtaZFnHAspQjvqfFpDSCIWJGLNME%2FlCUg86Vpg1h12VOoR2uB0b2LyBVPbsRU%2BVo%2BNONkFIgdFfNcVahRec6xURdjwMs&connectionData=%5B%7B%22name%22%3A%22kindoohub%22%7D%5D.
i have these custom headers in Web.config:
<add name="Access-Control-Allow-Headers" value="Content-Type" />
<add name="Access-Control-Allow-Methods" value="GET, POST" />
<add name="Access-Control-Allow-Credentials" value="true" />
and in Global.asax.cs i have this code to handle a null origin from cordova-ios:
protected void Application_BeginRequest(object sender, EventArgs e)
if (Context.Request.UrlReferrer != null)
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", Context.Request.UrlReferrer.GetLeftPart(UriPartial.Authority)); //browser
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "null"); //wrapper
and for the startup i have this:
public class Startup
public void Configuration(IAppBuilder app)
string redisIP = ConfigurationManager.AppSettings["RedisIP"].ToString();
int redisPort = int.Parse(ConfigurationManager.AppSettings["RedisPort"].ToString());
GlobalHost.DependencyResolver.UseRedis(redisIP, redisPort, null, "SignalRChat");
app.Map("/signalr", map =>
var hubConfiguration = new HubConfiguration
EnableDetailedErrors = true,
// Run the SignalR pipeline. We're not using MapSignalR
// since this branch already runs under the "/signalr"
catch (Exception ex)
File.WriteAllText(@"C:\Logs\ex" + DateTime.UtcNow.Ticks.ToString() + ".txt", ex.Message + " " + ex.StackTrace);
i tried enabling cors, but with no use and get a different error stating that Access-Control-Allow-Credentials is not set to true .
now this problem i am facing is only occurring on ios devices with cordova-ios 6.1.0.
on android and safari and chrome working normally
Jul 16, 2020 10:38 AM|XuDong Peng|LINK
SignalR can be used in a variety of web browsers, but typically, only the latest two versions are supported.
Have you checked the effect of browser version on it?
For more details, you can refer to below document.
Jul 16, 2020 10:51 AM|bzero|LINK
yeah i checked it works fine with safari, and worked fine with earlier version of cordova-ios. only when we upgraded to the new version we faced this trouble. till now we can't find out what the problem is, or how to solve it