Hello,
I am getting an error in debugger.js when debugging my app. The app sends HTTP requests some of which happen to have no "Content-Type". This seems to be causing the error.
Error: Error while parsing debug 'response' object. mimeType: string value expected.
Debugger.ts contains the following code:
let mimeType: string = <string>headers["Content-Type"] || <string>headers["content-type"];
So there will be no mimeType for requests with no "Content-Type". Locally I have temporarily fixed the problem by providing an empty string if no "Content-Type" is specified.
let mimeType: string = <string>headers["Content-Type"] || <string>headers["content-type"] || '';
Android
Cross-platform modules: 3.1.0-2017-06-16-6999 or 3.0.1
Runtime(s): 3.0.1
The issue is only reproducible when using local node server (as in the posted example above).
+1
NativeScript-Angular V3.0.3
I am using ASP.NET Core Web API services for my backend. The application crashs if one of my services returns a http status code that doesn't include content for example 404 - Not Found
I have the same issue, with the same environment as @R4ZuL
Hacky fix for now, I just modified line 15 of debugger.js in my node_modules to:
var mimeType = headers["Content-Type"] || headers["content-type"] || "text/plain";
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hacky fix for now, I just modified line 15 of debugger.js in my
node_modulesto: