Reveal won't make connection. Comes back with error:

will's Avatar

will

19 Dec, 2013 08:57 PM

12/19/13 3:55:43.249 PM Reveal[50010]: ERROR: Refresh application state failed: Error Domain=com.ittybittyapps.Reveal.DataService.ErrorDomain Code=1003 "The operation couldn’t be completed. Server response body is in an unexpected format." UserInfo=0x6000002e5b00 {NSLocalizedRecoveryOptions=(
"Open Console...", Cancel ), NSLocalizedRecoverySuggestion=Check console log messages for further details., NSRecoveryAttempter=, NSLocalizedFailureReason=Server response body is in an unexpected format.}

  1. Support Staff 1 Posted by Oliver Jones on 19 Dec, 2013 11:57 PM

    Oliver Jones's Avatar

    Hi Will,

    Are you on a corporate network with proxies? Also, is this when trying to connect to a device or the simulator.

    Thanks.

  2. 2 Posted by will on 20 Dec, 2013 12:41 AM

    will's Avatar

    No proxies that a I know of. This is device and simulator.

    I’ve actually isolated it to one view controller and one STATE of the view controller.

    I’m able to connect and view everything just fine until I view that.

    The error you see is the one I would get if I have the app in that state and then try to connect Reveal.

    Will Larche
    Lead iOS Developer
    LearnVest, Inc.
    113 University Pl, 5th Floor
    New York, NY 10003
    212.675.6711 (office)
    917.720.9067 (fax)
    www.learnvest.com
    @LearnVest

  3. Support Staff 3 Posted by Oliver Jones on 20 Dec, 2013 02:48 AM

    Oliver Jones's Avatar

    OK. Can you tell me more about this specific view controller?

    The error message you posted only occurs when Reveal fails to get JSON content from the request it makes to the iOS app. Basically we expect a JSON blob to be decoded into a dictionary and if we don’t get a dictionary we display that error message. This might happen due to a network error or an exception occurring in the iOS app when we request data from the view hierarchy. Are any exceptions being thrown in your iOS app? Set an exception break point if you haven’t already.

    I’m also interested in knowing the output of this command run against your iOS app (i.e., what is in the dump file and output as headers).

    curl -s -D - http://localhost:55378/application -o ~/dump.json

    You will have to replace the port number in the command above with the port that the Reveal library is listening on (it is randomly assigned each time your app comes to the foreground). To figure out what this port number is for your running app you can use Bonjour Browser (available for free from here http://www.tildesoft.com/) or use dns-sd at the command line as outlined here: http://support.revealapp.com/kb/tips-tricks/bonjour-debugging-why-cant-i-connect-to-my-app

    Regards

  4. 4 Posted by will on 27 Dec, 2013 11:50 PM

    will's Avatar

    It was a view controller where someone (not me) had set a layer.sublayers to nil. Bad programming. Confused the hell out of reveal.

    Will Larche
    Lead iOS Developer
    LearnVest, Inc.
    113 University Pl, 5th Floor
    New York, NY 10003
    212.675.6711 (office)
    917.720.9067 (fax)
    www.learnvest.com
    @LearnVest

  5. Support Staff 5 Posted by Sean Woodhouse on 28 Dec, 2013 05:59 AM

    Sean Woodhouse's Avatar

    Awesome. Thanks for tracking that down Will. Much appreciated.

  6. Support Staff 6 Posted by Oliver Jones on 28 Dec, 2013 07:54 AM

    Oliver Jones's Avatar

    That probably confused the hell out of iOS as well. Thanks for letting us know what the issue was.

    Sent from my iPhone

  7. 7 Posted by will on 28 Dec, 2013 03:57 PM

    will's Avatar

    Yeah. It caused crashes if touched.

    Sent from my iPhone

  8. Support Staff 8 Posted by Sean Woodhouse on 30 Dec, 2013 01:23 AM

    Sean Woodhouse's Avatar

    Hey Will, I've scheduled someone to look at this for the next release. Thanks again

  9. Sean Woodhouse closed this discussion on 30 Dec, 2013 01:23 AM.

  10. will re-opened this discussion on 30 Dec, 2013 01:24 AM

  11. 9 Posted by will on 30 Dec, 2013 01:24 AM

    will's Avatar

    I have more information. looks like the dev set sublayers.nil and then in the draw rect immediately set sublayers.nil again. Don’t know why he did it twice.

    Will Larche
    Lead iOS Developer
    LearnVest, Inc.
    113 University Pl, 5th Floor
    New York, NY 10003
    212.675.6711 (office)
    917.720.9067 (fax)
    www.learnvest.com
    @LearnVest

  12. Support Staff 10 Posted by Sean Woodhouse on 30 Dec, 2013 01:48 AM

    Sean Woodhouse's Avatar

    Ok, thanks

  13. Sean Woodhouse closed this discussion on 30 Dec, 2013 01:48 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac