Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK 1.9.0 doesn't work under iOS 7 #388

Closed
ghugues opened this issue Oct 9, 2015 · 7 comments
Closed

SDK 1.9.0 doesn't work under iOS 7 #388

ghugues opened this issue Oct 9, 2015 · 7 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Milestone

Comments

@ghugues
Copy link

ghugues commented Oct 9, 2015

This sounds too big to be true, but I've tried cleaning caches (same problem), using the Parse Starter Project (same problem) and going back to 1.8.5 (problem solved), it doesn't seem to be coming from my end so here it is (my apologies if I made a terrible mistake) :

When running iOS 7 (and Xcode 6.4), all requests made by the SDK fail with the following error :

Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x7b6bb4c0 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}

Digging a little shows that all requests to api.parse.com return a 404 response (which then causes the JSON decoding error) :

<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.6.0</center>
</body>
</html>

It seems that all requests are made to / instead of the correct API path (e.g /1/classes/... )
Everything works fine on iOS 8 and 9.

@nlutsenko
Copy link
Contributor

Does indeed sound extremely weird, since iOS 7/8/9 all use the same API and system frameworks to perform network requests.

Do you think there might be something else specific about the device/simulator you are testing this on?

@nlutsenko nlutsenko self-assigned this Oct 9, 2015
@ghugues
Copy link
Author

ghugues commented Oct 9, 2015

I'm still investigating, as I find that strange as well, but I've removed and re added all simulators, and things work fine if I use 1.8.5 (I'm using cocoapods)

@nlutsenko
Copy link
Contributor

I am going to test from my end as well, let me know if you find anything in the meantime.

@ghugues
Copy link
Author

ghugues commented Oct 9, 2015

I think I got it : PFURLConstructor.m line 24. Shouldn't you check for path and not components.path ?

@nlutsenko
Copy link
Contributor

(-‸ლ) Yes! This probably works differently between iOS 7 and later!

@ghugues
Copy link
Author

ghugues commented Oct 9, 2015

Yep, using path seems to solve the issue. I'm a little relieved, I really thought I was losing my mind !

@nlutsenko
Copy link
Contributor

Yeah, what seems to be happening is that on iOS 8/9 - this reports an empty string instead of nil, whilst on iOS 7 - it is explicitly nil. Sending a PR in a second.

@nlutsenko nlutsenko added type:bug Impaired feature or lacking behavior that is likely assumed and removed needs investigation labels Oct 9, 2015
@nlutsenko nlutsenko added this to the 1.9.1 milestone Oct 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

2 participants