Pulse not working for specific app
gauche
Posted on
Aug 23 2017
Hi,
I integrated with Pulse a month or so ago, ran it against a test application, and got it working. Now that we've released to production and it's running against our real application, events are not showing up.
I've disassembled the binaries in the APK and the code looks fine. Can I have someone look into this for me please? I don't want to paste application IDs here just in case it's a security issue...
Thanks
Jason Fauchelle
Raygun
Posted on
Aug 23 2017
Hi gauche,
Please let us know the name of your application and what platform Pulse is being set up with (e.g. iOS, Android, Xamarin).
-Jason Fauchelle
gauche
Posted on
Aug 23 2017
Hi Jason,
The platform is Xamarin.Android and Xamarin.iOS.
The name of the application that worked is "Raygun Playground". The name of the application that is not working is "QUT".
Thanks
Jason Fauchelle
Raygun
Posted on
Aug 23 2017
Thanks gauche,
So far it looks like our api has not received any messages from the QUT app, suggesting that it is an issue in the provider. If you run your code for the application (via XCode or deployed to a test device), are you able to get Real User Monitoring data showing in your QUT or/and Raygun Playground apps?
-Jason Fauchelle
gauche
Posted on
Aug 23 2017
via XCode or deployed to a test device
This is a Xamarin app, so I assume you mean via Visual Studio (or VS4M). Yes, that is what I did when developing the Pulse integration. I ran against the Raygun Playground app, which collated data just fine (barring a hiccup with the display, which Raygun support sorted out). If you take a look in the Raygun Playground app, you'll see it has data (from August 1st, which is when I worked on the feature).
But for QUT, nothing. Oh, and I've double-checked the app ID is correct, and it is.
Jason Fauchelle
Raygun
Posted on
Aug 23 2017
Yes sorry, I meant Visual Studio.
When you get a chance, please run the code for your QUT application, pointing at either "Raygun Playground" or "QUT" (or ideally try both if you don't mind the QUT app having a bit of local data) and this will help us narrow down if anything has changed. Also, let me know if Raygun outputs anything into the Visual Studio console.
-Jason Fauchelle
gauche
Posted on
Aug 23 2017
OK, the QUT app is currently running against the Raygun Playground (I'd really prefer not to run it against our production app). As you can see, it's working.
I don't see any Raygun output in VS...
gauche
Posted on
Aug 24 2017
Any update on this please?
Jason Fauchelle
Raygun
Posted on
Aug 24 2017
Hi gauche,
Apologies for the delayed reply. Thanks for trying out your app locally.
I'm going to test a new theory a colleague suggested and get back to you soon.
-Jason Fauchelle
Jason Fauchelle
Raygun
Posted on
Aug 24 2017
Hi gauche,
Ignore my previous comment, the test did not reveal any issues.
So it sounds like the only difference is where the application is being run from - it works fine when running locally, but not when downloaded from the store. The fact that nothing is coming from either your iOS or Android apps suggests there may be a common issue among them. What we do know is that no messages are being sent from your production app to our api, meaning the issue is occurring within the app.
What we recommend now is that you do some further troubleshooting in your app to narrow down on the issue. Since the issue is only present in the app downloaded from the store, debugging this issue will be a little tricky. The Android app store provides the ability to release alpha and beta versions of your app. What you could try is use the RaygunClient to send a pulse event manually using the sendPulseEventTiming method and see if that shows up in the app. You may want to point this at your Raygun Playground application. Then deploy this modified app as an alpha or beta to the Android store and test that out.
If you could send the Raygun setup code you saw when decompiling the APK, I could see if anything looks out of place, though I can't think of anything setup wise that would work locally and not in production - especially since Crash reporting is working fine from the same setup.
-Jason Fauchelle
gauche
Posted on
Aug 24 2017
Thanks Jason. Ugh, I'm guessing the linker is stripping something in our release builds that is causing Pulse to silently fail. I'll try a linked build locally later on against the Playground and see how it goes.
gauche
Posted on
Aug 24 2017
I can confirm this was linker-related. Linking my app locally and running exhibited the same behavior observed in production. And by excluding the Raygun assembly altogether from linking, the pulse data is now appearing even when linking.
I really think you guys should be making your Xamarin assembly linker-friendly by using LinkerSafeAttribute
(and PreserveAttribute
). Considering it just stops working silently, it's quite dangerous to not do so.
Jason Fauchelle
Raygun
Posted on
Aug 24 2017
Great to hear you found the root cause of the issue. Apologies for the inconvenience and thanks for getting back to us about it. We'll get this sorted in the next package release.
-Jason Fauchelle
gauche
Posted on
Aug 28 2017
Thanks Jason. Just so we can plan accordingly, when do you think your next client release will take place?
Jason Fauchelle
Raygun
Posted on
Aug 29 2017
It's hard to say when the next Raygun4Net release will be sorry. It would likely be a month or two. Just to clarify, is there a workaround such as linker options that allows Pulse to function in your app in the meantime?
-Jason Fauchelle
gauche
Posted on
Aug 29 2017
Yes, I have already created a PR to resolve the problem, and was trying to figure out whether it needs to be merged before our next release. I'd prefer not to have to double-handle the issue, but sounds like that's the only option.
Thanks for confirming.