I created a Cordova project and integrated it with Angular 6, there after added browser platform using command Cordova Platform Add Browser , after performing ng build and hosting the angular output with Cordova, using command Cordova Run browser, it works fine in chrome browser , however for Internet Explorer or Microsoft Edge it fails to render the page and throws below error message
System.ArgumentNullException: No message was deserialized prior to calling the DispatchChannelSink.
Parameter name: requestMsg
at System.Runtime.Remoting.Channels.DispatchChannelSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.MetadataServices.SdlChannelSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.Http.HttpServerTransportSink.ServiceRequest(Object state)
at System.Runtime.Remoting.Channels.SocketHandler.ProcessRequestNow()
We tried adding missing polyfills and shims and meta http-equiv like below in index.html
<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.13/es5-sham.js"></script>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
When we perform cordova run browser and Launch the hosted angular website in Internet Explorer or Microsoft Edge, it should work in a similar way as in chrome browser.
After trying for a day, found that the default port 8000 was in use, hence had to change in run.js found at path "platforms\browser\cordova\" with the following values
args.port = args.port || 8100;
args.target = args.target || "ie";//prior to this instead of "ie" it was "chrome"