Raygun client unable to send - failed resolution of InetAddressUtils

Nick Wri

Posted on
Mar 04 2019

Is anyone who is using Raygun in their Android apps seeing this error exception when calling RaygunClient.send():

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/conn/util/InetAddressUtils;

Happens intermittently, I think when using Android Pie (no complaints on 6 or 7). I was wondering whether it was anything to do with the Apache HTTP client deprecation in apps targeting SDK:28

https://developer.android.com/about/versions/pie/android-9.0-changes-28

I've put the recommended legacy link into my app, and I'm now getting raygun error reports being logged whenever my app hits a problem (mainly server connection errors - which is expected from time to time).

StackOverflow issue here: https://stackoverflow.com/questions/54947141/raygun-client-unable-to-send-failed-resolution-of-inetaddressutils

Thanks


Deleted User

Raygun

Posted on
Mar 08 2019

Hi Nick,

Thank you for getting in touch. We are currently working on a major version update to the Raygun4Android provider. We will be addressing this issue within the update. We will be looking to determine a release date for this update next week. I will be in contact once we have a date confirmed.

Regards, Mitchell.


Nick Wri

Posted on
Mar 08 2019

Thanks Mitchell. I notice that there was a release v3.0.6 a few months back - it contains some fixes around background jobs and http calls. I guess it would be a good plan to upgrade to v3.0.6?

I also wanted to let you know about another related exception i was getting - I think its related to the first problem:

Process: rpl.vircarda, PID: 7145 java.lang.IllegalStateException: Not allowed to start service Intent { act=main.java.com.mindscapehq.android.raygun4android.RaygunClient.RaygunPostService pkg=main.java.com.mindscapehq.android.raygun4android.RaygunClient cmp=rpl.vircarda/main.java.com.mindscapehq.android.raygun4android.RaygunPostService (has extras) }: app is in background uid UidRecord{66efc46 u0a179 CEM idle change:cached procs:1 seq(0,0,0)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1842) at android.app.ContextImpl.startService(ContextImpl.java:1797) at android.content.ContextWrapper.startService(ContextWrapper.java:664) at main.java.com.mindscapehq.android.raygun4android.RaygunClient.spinUpService(SourceFile:606) at main.java.com.mindscapehq.android.raygun4android.RaygunClient.send(SourceFile:239)


Deleted User

Raygun

Posted on
Mar 13 2019

Hi Nick,

Yes, the release of v3.0.6 includes fixes we back-ported from our future v4.0.0 release. The fixes included should address the problems seen with InetAddressUtils NoClassDefFoundError exceptions. As part of the latest release we also changed the services that send data, which may address the last problem you mentioned.

Please update to release 3.0.6 and let us know if the problems persist. There has been some changes to the setup of the provider in the latest release. You can find up to date documentation on the providers GitHub repository. I will look to update the documentation on our website shortly.

https://github.com/MindscapeHQ/raygun4android

Thank you, Mitchell.


Nick Wri

Posted on
Apr 08 2019

Hi Mitchell,

When upgrading to v3.0.6, the manifest is unable to resolve RaygunPostService - it is flagged in red as an "unresolved class" [main.java.com.mindscapehq.android.raygun4android.RaygunPostService]

I have to down-grade back to v3.0.2 to resolve it. v3.0.4 doesn't resolve either.

I note that your Installation Notes for Android still reference v3.0.2.

Please advise.

P.S - when is v4.0 going to be shipped?


Deleted User

Raygun

Posted on
Apr 09 2019

Hi Nick,

There was a mistake in the documentation for the source repositories. I have also found that the setup instructions has a link to the old documentation. The correct documentation link is found here: https://raygun.com/documentation/language-guides/android/crash-reporting/installation/. I will look to get this corrected shortly. In the mean time can you please try updating to 3.0.6 again following the newest documentation.

I am sorry for the documentation not being correct, we will have this sorted shortly.

Thank you, Mitchell.


Deleted User

Raygun

Posted on
Apr 09 2019

We are currently alpha testing version 4.0.0 of the Raygun4Android provider. If you wish to try it out you can take a look at the instructions found here: https://github.com/MindscapeHQ/raygun4android/tree/4.0.0.

Cheers, Mitchell.


Nick Wri

Posted on
Apr 09 2019

Hi, that's not working for me. Same problem as before. I am using a newer version of okhttp:

com.squareup.okhttp3:okhttp:3.12.0

Sorry, busy right now to look into this fully. Reverting to v3.0.2.


Deleted User

Raygun

Posted on
Apr 11 2019

Hi Nick,

One of the developers of the Raygun4Android provider has put together a sample app that uses both v3.0.6 of the Raygun4Android provider and v3.12.0 of the okhttp library. Please feel free to use this as a reference, if you have the time to update to v3.0.6 again.

Link: https://github.com/TheRealAgentK/RG4A306test

Regards, Mitchell.


Nick Wri

Posted on
Apr 11 2019

Thanks for this Mitchell.

I'm sure its just something in my app configuration which is causing the problem, just don't have time right now to look at it.

Hopefully in next week or two when we start our next dev cycle.


Deleted User

Raygun

Posted on
Apr 12 2019

No worries Nick. Reach out if you need any assistance.

Regards, Mitchell.


ct

Posted on
May 01 2019

I had the same issue after updating the Raygun library, using your sample code I figured out I needed to change the old service declaration from:

<service
    android:name="main.java.com.mindscapehq.android.raygun4android.RaygunPostService"
    android:exported="false"
    android:process=":raygunpostservice" />

to:

<service
    android:name="main.java.com.mindscapehq.android.raygun4android.services.CrashReportingPostService"
    android:exported="false"
    android:permission="android.permission.BIND_JOB_SERVICE"
    android:process=":crashreportingpostservice" />

Nick Wri

Posted on
May 01 2019

Thanks ct.

The RaygunPostService appears to no longer exist. Its been replaced by the CrashReportingPostService.

There is also a new service called RUMPostService - Mitchell - can you confirm what this does please?


Deleted User

Raygun

Posted on
May 02 2019

We have split the original RaygunPostService into two, the CrashReportingPostService and RUMPostService. These services manage the posting of http requests for the different products.

Now each of the products can now make http requests independently without the worry of affecting each other. We also perform different operations depending on the results of these http requests and product type.


Reply