2

I have the following code in my SDK:

public MatchDomainTrustManager(String domain) throws GeneralSecurityException, AssertionError {

        if (domain == null) throw new IllegalArgumentException("domain can not be null");

        this.domain = domain;

        TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
        tmf.init((KeyStore) null); //This is where the error thrown

        defaultTrustManager = findX509TrustManager(tmf);
        if (defaultTrustManager == null) {
            throw new IllegalStateException("Couldn't find X509TrustManager");
        }

        List<X509Certificate> allIssuers = new ArrayList<>();
        for (X509Certificate cert : defaultTrustManager.getAcceptedIssuers()) {
            allIssuers.add(cert);
        }
        acceptedIssuers = allIssuers.toArray(new X509Certificate[allIssuers.size()]);
    }

In crashlytics I see the following error:

Fatal Exception: java.lang.NoSuchMethodError
No static method z}ey??Hٲ?e!Σt s;o?+??rʇ,Ԯڧ?^휜ƀ|ڞߵEE?AU粴&}l3 㬻4?Ӊ*ϩH6<0ۙ '^$T܈ưdž♧??Ԉgʯ1%;/߻C!Q̨Ljava/lang/String;)Ljavax/net/ssl/TrustManagerFactory; in class Ljavax/net/ssl/TrustManagerFactory; or its super classes (declaration of 'javax.net.ssl.TrustManagerFactory' appears in /system/framework/core-oj.jar)
com.tawkon.data.lib.ssl.MatchDomainTrustManager.<init> (MatchDomainTrustManager.java:39)
com.tawkon.data.lib.helper.ServerHelper.?͞rƹ!w?#?X QB?Aퟶ?،̡ݽɗόt1R:鏡"Ѫ⡦EE摶Ƴ (ServerHelper.java:459)
com.tawkon.data.lib.helper.ServerHelper.getDataLibConfiguration (ServerHelper.java:88)
com.tawkon.data.lib.jobScheduler.jobService.RemoteConfigurationJobService$1.run (RemoteConfigurationJobService.java:44)
java.lang.Thread.run (Thread.java:764)

As you can see, I have this weird gibberish error, which I have no idea where it came from? Did anyone deal with something like that before?

The device specs are Samsung phone with OS 8.

It's weird exception because the app runs on many different devices from OS 4 to OS 9, and I can't think for any reason that TrustManagerFactory methods would be missing, unless it's some custom ROM of the OS.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Keselme
  • 3,779
  • 7
  • 36
  • 68

0 Answers0