# Dynatrace OneAgent (iOS) not running, error code is 1

**URL:** <https://community.dynatrace.com/t/dynatrace-oneagent-ios-not-running-error-code-is-1/45762>\
**Category:** Real User Monitoring\
**Tags:** mobile-monitoring, oneagent\
**Created:** [May 27, 2024, 4:54am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-ios-not-running-error-code-is-1/45762 "2024-05-27T04:54:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexW](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@AlexW](https://community.dynatrace.com/u/AlexW)\
**Post date:** [May 27, 2024, 4:54am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-ios-not-running-error-code-is-1/45762/1 "2024-05-27T04:54:07Z")

</div>

I got few customised actions and some are init successful, but the rest return nil.  
I try to catch that with&nbsp; Dynatrace.lastErrorCode() Dynatrace.lastErrorMsg() and found the code is 1 and msg is “Dynatrace OneAgent (iOS) not running”

Can someone please help me out if they got this issue before?

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [May 27, 2024, 6:01am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-ios-not-running-error-code-is-1/45762/2 "2024-05-27T06:01:59Z")

</div>

The SDK does not seem to be initialized. Ensure the SDK initialized either by auto start or start it manually depending on your preference. Also you can run the OneAgent in DEBUG mode to see what is going on - see&nbsp;[OneAgent for iOS debug logging in RUM Classic — Dynatrace Docs](https://docs.dynatrace.com/docs/platform-modules/digital-experience/mobile-applications/instrument-ios-app/customization/logging-for-ios)

---

<div class="post-metadata">

**Author:** ![Patrick\_H](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/patrick_h/32/37540_2.png) [@Patrick\_H](https://community.dynatrace.com/u/Patrick_H)\
**Post date:** [May 27, 2024, 9:08am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-ios-not-running-error-code-is-1/45762/3 "2024-05-27T09:08:00Z")

</div>

If agent is not running this can have several reasons:

- agent was misconfigured
- session is skipped because of capture percentage set to \<100%
- capture was turned off for this application on cluster
- agent turned off because of no more license credits

when logging is enabled on agent it should be more easy to detect why it did not start up - I suggest to enable logging and check the log or ask for help submitting the full log to our support team.
