ThanosSiopoudis / BarrelApp

Barrel - The Wine port manager for OS X
http://barrelapp.co.uk
16 stars 2 forks source link

Cannot connect to the server #47

Closed janisc closed 11 years ago

janisc commented 11 years ago

After getting Barrel to launch, I am now facing other issue. Once I try to create a new empty bundle or add a game to the library I get an error: "Error communicating with the server! Please try again later!". Obviously pretty much nothing works then.

I did compile the project in XCode and debugged it a bit. The urls failing are: http://api.barrelapp.co.uk/WineBuilds/getAllWineBuilds.json http://api.barrelapp.co.uk/Games/searchForGame.json?gameName=ac1&identifier=ac1 (for Assassin's Creed)

I can access those urls from a browser with no problem and they return valid json text. However, if I use Barrel the error comes from RestKit domain and it is something along: Expected content type {( "text/json", "application/json", "text/javascript" )}, got text/plain

I got that from a quick debugging session on cloned github master. The official build and the debug build present same symptoms, although I can't debug those as easily. Could this be related to this: http://stackoverflow.com/questions/9164486/json-file-set-content-type-to-application-json-afnetworking

ThanosSiopoudis commented 11 years ago

I can't reproduce this locally. The server is serving proper text/json mime type, so it is not related to the stackoverflow link you mentioned. Can you please go into the file "AppCakeAPI.m", and add RKLogConfigureByName("RestKit/Network", RKLogLevelTrace); at the beginning of every function? Then build and run again, and paste here whatever is printed on the log.

janisc commented 11 years ago

Here is a link to the log (it is quite long). https://dl.dropboxusercontent.com/u/30899371/barrel.log

ThanosSiopoudis commented 11 years ago

Thanks, it's what I suspected. The remote server service has a debug kit installed that creates cache files with the wrong permissions, and then they can't be accessed. I've manually fixed the permissions for now so you can use Barrel, but I'll have to track this down on the remote service. I'll leave this open and mark it upstream, until I fix it.

janisc commented 11 years ago

It works now. Thanks.

ThanosSiopoudis commented 11 years ago

Great. I think I've fixed the issue on the server as well, so I'll close this for now and keep monitoring.