question

Kevin A. avatar image
Kevin A. asked ·

Dynatrace OneAgent (iOS) auto-startup was not successful, error code = -5

Hello,

We just integrated Dynatrace 7.0.6.1013 into our client's application (Swift 3.x project) via cocoapods as we are evaluating the possibility of using this wonderful library. We included the DTXAgentStartupPath Key in the app's info.plist file and assigned a string which relates to the server url in the following format "https://m.testdomain.fr". We inspected the keys in the 'Auto-instrumentation for iOS' documentation' and we deduced that this is the only key required to get the SDK up and running. However upon launching the app the following error is thrown into XCode's console:

[Dynatrace.m:160-1027-1] Dynatrace OneAgent (iOS) auto-startup was not successful, error code = -5

Can you please enlighten us to what's wrong and/or point us to the documentation describing the error code please?

Many thanks in advance

appmonDynatrace Managedoneagentdynatrace saas
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

David N. avatar image
David N. answered ·

Hello Kevin,

I used to following sources to figure out the what needed to be changed in your configurations.

Documentation: https://help.dynatrace.com/user-experience-monitoring/mobile-apps/how-do-i-enable-user-experience-monitoring-for-ios-applications/

"To instruct your iOS mobile app to send monitoring data to the correct Dynatrace application, add the generated application and environment IDs to your project’s Info.plist file."

Support Ticket: https://support.dynatrace.com/supportportal/browse/SUPDT-34139

Case 2:

  • DTXAgentStartupPath on Info.plist.
    I get the following:
    INFO General [DTXDiagnostics.m:99-1027-1] log level set to INFO
    INFO Session [Dynatrace.m:153-1027-1] Auto-starting Dynatrace OneAgent (iOS) version 7.0.0.2362 built on 2017-04-20 20:45:11 +0000
    INFO Session [DTXAgentBootController.m:151-1027-1] ### Dynatrace OneAgent (iOS) 7.0.0.2362 built on 2017-04-20 20:45:11 +0000 ###
    WARNING Session [DTXAgentBootController.m:187-1027-1] Application ID is empty.
    SEVERE Session [Dynatrace.m:160-1027-1] Dynatrace OneAgent (iOS) auto-startup was not successful, error code = -5

Case 2:

Customer needs to add the App ID in their info.plist.

Hope that helps.

David Nicholls

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

David N. avatar image
David N. answered ·

Hello Kevin,

That error means that you need to include your DTXApplicationID in the info.plist file.

Thanks,

David Nicholls

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Kevin A. avatar image
Kevin A. answered ·

Hello David,

Thanks for your prompt reply.

Is it possible to provide a link to documentation which describe the error codes please?

Thanks again

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Kevin A. avatar image
Kevin A. answered ·

Hi @David N.,

Adding the DTXApplicationID in the info.plist file as you have suggested seems to have resolved the error code -5. Many thanks for that!

I just noticed we have other warnings, such as:

- WARNING UIControl[DTXInternalActionManager.m:2380-1027-1] setCollectionViewDelegate_DTX => detected delegate inconsistency

WARNING Communications [DTXSendIntervalManager.m:65-1027-1] removed timed out action 'WebRequest(api.xxxxxxx.com):21'

Should we be worried about these? Can you point us in the right direction to fix these warnings please? I have included DTXLogLevel and set the log level to WARNING for now to resolve any such issues first.

Thanks

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

David N. avatar image
David N. answered ·

Hello Kevin,

Regarding the first warning (delegate inconsistency):

Since RxSwift does not use the default IOS delegates instrumenting an application could lead to some of the viewController classes or UI Controls not propagating correctly and being executed. This actually results in RxSwift not being officially supported by Dynatrace. Here is how you can check to see whether your application is being severely affected by this error. You can check your console to see if you are getting any delegate proxy errors similar to this: “Delegate proxy is already implementing `tableView:didSelectRowAtIndexPath:`, a more performant way of registering might exist.”.

If you are, then you would have to exclude the relevant viewController classes or UI Controls from instrumentation by the Dynatrace agent.

You can check the following link for information on how to exclude them: https://support.dynatrace.com/supportportal/browse/SUP-1785

Regarding the second warning (removed timed out action):

That is most likely related to the TCP connection timeout errors that are thrown when a connection between two processes could not be established. This is probably just a message saying that the specific user action timed out and Dynatrace is no longer going to track it.

The top Http requests section of Dynatrace can help you to see if any requests are consistently failing: https://help.dynatrace.com/user-experience-monitoring/mobile-apps/how-do-i-analyze-http-performance-and-error-rates-for-mobile-apps/

The TCP connection time-out errors section can help you to track down any wayward processes: https://help.dynatrace.com/infrastructure-monitoring/hosts-and-processes/how-do-i-monitor-network-communication/

Thanks,

David Nicholls

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Kevin A. avatar image
Kevin A. answered ·

Hi @David N.,

Thanks again for your help. One last question (I opened a new thread for it so I don't 'dirty' this one, maybe you can help?) Should be pretty straight forward.

https://answers.dynatrace.com/spaces/482/dynatrace-open-qa/questions/188040/dtxloglevel-ios.html

Thanks again!

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.