We observed for images in Android we are seeing 404(Not found) errors if Image not found and it’s captured in MobileRequestError but in iOS nothing captured in MobileRequestError if image downloading failed.
Sometimes when we see this happening, it is because of a network object that was created before our agent began instrumenting and that rouge network object is handling these network calls; in this case, such a networking object may be handling all the calls somewhere else.
In order for the New Relic agent to instrument your app correctly and track all networking objects, the agent needs be the first thing that happens after the application launches. Could you walk me through what is happening before calling
application(didFinishLaunchingWithOptions:) , if anything?
Hi @dmurray, In our code before calling NewRelic.start(withApplicationToken:) this, we instantiate class and enable feature like : NewRelic.enableFeatures(NRMAFeatureFlags.NRFeatureFlag_NetworkRequestEvents)
This is happening only for images othewise whatever api failed captured in MobileRequestError, Issue happening for IOS platform only.
Are you attempting to load images from the same endpoint for both Android and iOS? Can you please provide a permalink to your iOS app?
Thanks for getting back to me, I’d like to take a closer look at this. Can you post a permalink to your account? It’s safe to post a permalink on the forum; only New Relic staff and users with existing access to your account will be able to use it. This will allow us to take a look at the specifics and better aid in troubleshooting this issue.
below is the permalink for same:
Thank you for sending the permalink. When looking into this, it appears the images you are calling are stored in s3 in AWS. Upon querying these endpoints in Insights, I’m consistently seeing a higher count for request failures in Android vs iOS.
I believe this may require a deeper dive into what’s causing the discrepancy between platforms. I am going to open a ticket and continue troubleshooting with you outside of the public forum. Once a solution is reached, I will update this thread.
You will receive an email once the ticket is created.
Any updates here ? This is causing inconsistency between platforms.
No updates at this time. I have opened a private ticket with the original poster @sbhardwaj13, but have yet to receive a response. When I have more information regarding this issue, I will update this forum.
Can you share that private ticket link here? so that I can check and update with in my team. I didn’t get notification regarding the same.
I just wanted to jump in here and update this thread with the latest update. Our mobile engineers have been working on this issue, and I’d like to offer up their findings.
The issue you reported seems to be related to caching of the images Picasso loads. That’s why the first image loads successfully from a network call, but later loads (from local cache) fail to decode.
We believe this conflict arose from another change to the NR agent introduced in 5.20.0. We anticipate this conflict to be fixed in an upcoming Android agent release. To avoid these issues in the meantime, you could use v5.19.1, the last agent version before the change.
You can keep up to date with our latest mobile agent releases here: https://docs.newrelic.com/docs/release-notes/mobile-release-notes/android-release-notes