Re: [chromium-discuss] Chrome gives a 500 error even though request is received, processed, and returned by the API

3,133 views
Skip to first unread message

PhistucK

unread,
Apr 16, 2015, 5:23:57 PM4/16/15
to owen.d...@gmail.com, Chromium-discuss
I do not think Chrome translates responses to "500 Internal server error", so your server is returning this error.
Have you tried to use Fiddler or Wireshark and see the actual headers that the server sends? If the server returns this error (very likely), then you should debug your server application. It might be related to cookies, for example, so try using incognito mode.


PhistucK

On Fri, Apr 17, 2015 at 12:17 AM, Owen Dismuke <owen.d...@gmail.com> wrote:
It was suggested that I post here as well.


I am developing a website with separate UI/API components that are currently deployed on the same IIS 7.5, Windows Server 2008 R2 box.
 

When my website and public API are on the same origin server with different urls, i.e. http://company.com/web and http://company.com/api, I used to get a same-origin error on a previous version. Now (version 41.0.2272.118 m), I get a 500 Internal Server Error from the website even though my request is received, processed, and returned by my API.

This only happens in Chrome. FireFox and even IE work without issue.

I don't have much leeway as to where I can deploy, and this restriction/error with Chrome makes it difficult to instill confidence to QA to pass my project.

Regards

I have now tested against Version 42.0.2311.90 m as well with the same results.

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

PhistucK

unread,
Apr 17, 2015, 6:38:14 AM4/17/15
to owen.d...@gmail.com, Chromium-discuss
Then your server rejects the "Origin" header for some reason, perhaps look into that?

Even if it is isolated to one browser (remember that "User-Agent" is also different, by the way), your application returns the error - not the browser, so debug your application and see if either of those is the issue, or maybe something else.

Also, note that "Accept-Language" and "Cookie" are also different in Chrome (and "Pragma" is missing).

Debug your application and see what makes it return an error, it seems like it is mishandling the request.


PhistucK

On Fri, Apr 17, 2015 at 12:59 AM, Owen Dismuke <owen.d...@gmail.com> wrote:
Incognito mode produces the same error. 
We've always had issues with Chrome in our test environment where the UI and API are on the same server.
It's hard to call this a server error when the problem is limited to one browser of many.

All I can see in the headers is that Chrome is sending an Origin tag that isn't present in the IE or FF request. The IE request works, by the way. Firefox doesn't even show up in fiddler, but it works fine as well.

Chrome from fiddler: (gets a 500)
Content-Type: application/json;charset=UTF-8
Accept: application/json, text/plain, */*
Referer: http://testweb.company.com/website
Accept-Language: en-US,en;q=0.8
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Connection: keep-alive
Content-Length: 62
DNT: 1
Cookie: _ga=cookie; _gat=1

IE from fiddler: (gets a 200)
Content-Type: application/json;charset=utf-8
Accept: application/json, text/plain, */*
Accept-Language: en-US
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; TNJB; rv:11.0) like Gecko
Connection: Keep-Alive
Content-Length: 62
DNT: 1
Pragma: no-cache
Cookie: _ga=cookie; __utma=cookie; __utmz=cookie; _gat=1

FireFox from Firebug: (gets a 200)
POST /api/controller/method HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json;charset=utf-8
Content-Length: 61
Cookie: __utma=cookie; __utmz=cookie; _ga=cookie; _gat=1
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages