Skip to content

Parse SDK 1.13.1 still uses OkHttp 2 #491

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

Closed
igokoro opened this issue Jun 30, 2016 · 8 comments
Closed

Parse SDK 1.13.1 still uses OkHttp 2 #491

igokoro opened this issue Jun 30, 2016 · 8 comments

Comments

@igokoro
Copy link

igokoro commented Jun 30, 2016

Release notes for Parse SDK v. 1.13.1 state that Parse SDK now uses OkHttp3. But this is not what I see in the 1.13.1 jar file. After decompilation I see that ParseHttpClient still uses com.squareup.okhttp package to discover OkHttp - while OkHttp3 uses okhttp3 package. Looks like something went wrong with the 1.13.1 build and publishing.

screen shot 2016-06-30 at 10 15 01 am

@rogerhu
Copy link
Contributor

rogerhu commented Jul 11, 2016

There is a problem with the jCenter release in that it seems to contain OkHttp2 still: https://bintray.com/bintray/jcenter/com.parse%3Aparse-android/1.13.1#files/com/parse/parse-android/1.13.1

The checksum does not match:

wget https://bintray.com/bintray/jcenter/download_file?file_path=com%2Fparse%2Fparse-android%2F1.13.1%2Fparse-android-1.13.1-sources.jar
md5 download_file\?file_path\=com%2Fparse%2Fparse-android%2F1.13.1%2Fparse-android-1.13.1-sources.jar 

Result:

MD5 (download_file?file_path=com%2Fparse%2Fparse-android%2F1.13.1%2Fparse-android-1.13.1-sources.jar) = bbe3e2515f8584898e7d7328330f9556
md5sum ./caches/modules-2/files-2.1/com.parse/parse-android/1.13.1/ef266d93357210b530c5b400e3d40de64fd86a0d/parse-android-1.13.1.jar

Result:

223c77d27180ba98aa1726bf0adb4914  ./caches/modules-2/files-2.1/com.parse/parse-android/1.13.1/ef266d93357210b530c5b400e3d40de64fd86a0d/parse-android-1.13.1.jar

The file hosted on Maven Central seems fine:

 md5sum parse-android-1.13.1.jar 
e2c65c5ae20cbd196b83994a3522a1b1  parse-android-1.13.1.jar

http://repo1.maven.org/maven2/com/parse/parse-android/1.13.1/parse-android-1.13.1.jar.md5

@rogerhu
Copy link
Contributor

rogerhu commented Jul 11, 2016

@grantland

@rogerhu
Copy link
Contributor

rogerhu commented Jul 11, 2016

The workaround is to specify mavenCentral() over jCenter() as the preferred repo in your allprojects:

allprojects {
    repositories {
        mavenCentral() // delete this line after Parse fixes
        jCenter()
    }
}

You need to delete your Gradle cache possibly. I nuked the ~/.gradle/caches dir where I could find com.parse directories and reloaded.

@igokoro
Copy link
Author

igokoro commented Jul 11, 2016

@rogerhu This also happens with the JAR file I downloaded from Parse.com.

@rogerhu
Copy link
Contributor

rogerhu commented Jul 21, 2016

ping on this one again?

@grantland
Copy link
Contributor

I've confirmed that the build on JCenter is incorrect and that using Maven Central is the correct workaround. I've sent a message to JCenter to resolve this, but it's out of my hands as we only directly upload to Maven Central. If this is still occurring after a few days, I'd recommend to reach out to JCenter yourselves.

@igokoro We're no longer updating parse.com with the latest artifacts and it seems you've downloaded 1.13.0 as 1.13.1 is not there. Please refer to Maven Central or this repository for future updates.

@rogerhu
Copy link
Contributor

rogerhu commented Jul 21, 2016

I contacted jCenter and they have resolved:

We appreciate your patience, we have resolved this issue. We believe the only way this could have occurred was that the offending jar was outdated in Maven Central for a brief period of time, during this time, Bintray cached the jar file. The cache has been cleared and this issue should not reoccur.

@danielapsmaior
Copy link

Hi,
I noticed that my code was referencing OkHttp2 today and tried many things to refresh the cache.
Then I removed maven { url 'https://maven.parse.com/repo' } as it's not mentioned as necessary anymore and the repository can't be found..

What I have now is

repositories {
    mavenCentral()
    maven { url 'https://maven.fabric.io/public' }
    jcenter()
}

and compile 'com.parse:parse-android:1.13.1'
Tried gradle --refresh-dependencies with no success.
The only way working now is by using the jar lib.
Could someone help me?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants