Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ray Ch
    @iraycd
    How do I get Headers on success method with callback?
    Anthony Garera
    @AmGarera
    Where do you initialize the builder/wasp?
    Said Tahsin Dane
    @tasomaniac
    Hi all, I am trying to set a custom certificate with WASP.
    I am getting the following errorjava.io.IOException: Hostname ourhostname.com not verified:
    I saw WASP is setting an EmptyHostnameValidator, and it is supposed to accept all the hostnames.
    What could be the error?
    Said Tahsin Dane
    @tasomaniac
    
            public static Service service = new Wasp.Builder(App.instance)
                    .setEndpoint(Service.BaseURL)
                    .trustCertificates(!BuildConfig.DEBUG ? R.raw.test_cert_2 : R.raw.prod_cert, !BuildConfig.DEBUG ? TEST_KEY_STORE_PASS : PROD_KEY_STORE_PASS)
                    .build()
                    .create(Service.class);
    Here is my implementation.
    I am putting a breakpoint and verify function in SSLUtils.getEmptyHostnameVerifier() function is never called.
    Said Tahsin Dane
    @tasomaniac
    I've implemented my own WaspHttpStackwith custom SslSocketFactory and HostnameVerifier and it workd.
    Something weird is happening in the default implementation.
    Orhan Obut
    @orhanobut
    I remember we had this issue but it has been fixed as I recall but Emmar was taking care of this, I think he can answer this in more precisely, and hi :)
    Emmar Kardeşlik
    @kardeslik
    hi @tasomaniac
    EmptyHostnameVerifier is only used for "trusting all certificates" case.
    If you provide any certificate, then it assumed that your certificate belongs to the host you are trying to reach. That is why we do not assign EmptyHostnameVerifier in that case.
    Orhan Obut
    @orhanobut
    I think that makes sense to have a valid hostname when we provide the certificate
    Said Tahsin Dane
    @tasomaniac
    yeah that makes sense. :smile:
    oh I see now. I looked at the code and I thought you are setting EmptyHostnameVerifier in both cases.
    So, no bug then, working as intended. Unfortunately I didn't create the certificate.
    I will sort it out. Thank you.
    Orhan Obut
    @orhanobut
    good to hear that! :+1:
    Said Tahsin Dane
    @tasomaniac
    :+1: thank you for the support.
    Said Tahsin Dane
    @tasomaniac
    Hi folks, It's me again.
    I am strangely having difficulties building the project.
    * What went wrong:
    A problem occurred evaluating project ':wasp'.
    > Failed to apply plugin [id 'com.android.library']
       > Your project contains 2 or more modules with the same identification com.orhanobut:wasp
         at ":" and ":wasp".
         You must use different identification (either name or group) for each modules.
    I am getting this error. And quick Google search gives me nothing.
    It is really strange.
    Orhan Obut
    @orhanobut
    that’s kind of strange error, let me check here as well
    Orhan Obut
    @orhanobut
    are you trying to build the project from scratch or did you add to another project as module?
    Said Tahsin Dane
    @tasomaniac
    I just check-out the repo and run . /gradlew build
    I disabled app and mock modules and it didn't work either. This is the first time I got this error and Google does not give anything related at all.
    I tried cleaning multiple times, rebooted my laptop but didn't work.
    Orhan Obut
    @orhanobut
    ok I’ll recreate the same steps as you did, checkout the repo and build and let’s see, might be some different issue
    I just tried and it works, clone repo, import to android studio and build
    Said Tahsin Dane
    @tasomaniac
    Let me try in a new folder. I've upgraded my AS to 1.4 Preview 1. I hope it is not related to that. :)
    Said Tahsin Dane
    @tasomaniac
    The project uses build-tools 21.1.1 and compileSdkVersion of 21
    Instead of installing old build-tools, I upgraded them in build.gradle and I was getting the above error.
    I downloaded SDK 21 and old build tools and it is working now.
    Orhan Obut
    @orhanobut
    unfortunately, travis was the main reason for using 21.1.1. But maybe they provide a higher api now, need to check
    Orhan Obut
    @orhanobut
    nevertheless, we need to focus on increasing test coverage
    Said Tahsin Dane
    @tasomaniac
    I think they support now. Because I even use newly released 23 in Travis.
    But the problem I have locally with build tools 22/23 is really interesting
    Orhan Obut
    @orhanobut
    I'll update travis file regarding to this
    Said Tahsin Dane
    @tasomaniac
    So we are now using jitpack :)
    Orhan Obut
    @orhanobut
    I think it makes more sense, and faster to create new releases
    now I'm curious about how optional works actually in jitpack :)
    I think it would be good to move all dependencies as optional, thus user can add them and change the version regarding to their needs
    Said Tahsin Dane
    @tasomaniac
    That makes sense
    I think it's gradle's job to determine transitive dependencies.
    Even if the library served from jitpack, its dependency can be served from jcenter when it is not found in jitpack.
    Orhan Obut
    @orhanobut
    indeed
    currently I'm adding a lot of test to cover critical parts