07 Jun 2024 06:03 AM
Hi Dynatrace team,
Our iOS project currently uses Firebase to process dSyms and capture crash reports. We use a build phase on our project that executes a script that the Firebase iOS SDK provides.
"${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
We are now transitioning to Dynatrace and I'm looking on how to do the equivalent using the Dynatrace SDK.
Upon reading the documentation on https://docs.dynatrace.com/docs/platform-modules/digital-experience/mobile-applications/analyze-and-... it says
The DSSClient is bundled with OneAgent, and you can find it in the release package under Symbolication/DTXDssClient
Does it mean that we can access this DSSClient inside the Dynatrace Swift package that we have installed on our project?
I'm trying to mirror the Firebase command above to locate the application but I haven't been successful. Is there an example of how it would look like to invoke the DTXDssClient from Xcode build phase and Dynatrace installed via SPM?
Thank you very much
Solved! Go to Solution.
07 Jun 2024 06:39 AM - edited 07 Jun 2024 06:48 AM
Hi!
this seems to be an outdated statement as it is only valid if you manually add the agent - then you have it bundled in the downloaded zip file.
I suggest to fetch it via cluster UI: https://docs.dynatrace.com/docs/shortlink/mobile-symbolication#get-dssclient or in case you always want the latest version in CI you can use https://api.mobileagent.downloads.dynatrace.com/latest-dss-client to fetch the latest version (but keep in mind that this direct API does not perform a compatibility check like the webUI does in case you are using a managed cluster that is not running on latest version.
10 Jun 2024 03:56 AM
Hi Patrick,
Thank you very much for your reply. For now I decided to just download the DSS client from the website and add it to our codebase. However, when I try to execute it via our build phase or via terminal
./DTXDssClient -h
I'm getting the following output
dyld[10639]: Library not loaded: @rpath/LLDB.framework/Versions/A/LLDB
Referenced from: <BEF7289E-E6CA-3B70-8BDA-244E09C817CE> /Users/raph/Workspace/iOS/iOS/scripts/DTXDssClient
Reason: tried: '/Users/raph/Workspace/iOS/iOS/scripts/LLDB.framework/Versions/A/LLDB' (no such file), '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks/LLDB.framework/Versions/A/LLDB' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/../SharedFrameworks/LLDB.framework/Versions/A/LLDB' (no such file), '/Users/raph/Workspace/iOS/iOS/scripts/LLDB.framework/Versions/A/LLDB' (no such file), '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks/LLDB.framework/Versions/A/LLDB' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/../SharedFrameworks/LLDB.framework/Versions/A/LLDB' (no such file)
It looks like the executable is trying to find the LLDB.framework and I believe it can't because my Xcode is called "Xcode 15.2" instead of just "Xcode". Is there a way to pass the path? Or would the alternative be to paste the framework inside our repo as well?
Thank you again.
10 Jun 2024 07:41 AM - edited 10 Jun 2024 07:42 AM
Yes, this is because Xcode has a non-standard path. If our fastlane plugin is used this will be automatically fixed, but if you do not want to use fastlane you can manually link it.
The easiest workaround without changing the setup too much is to create a symlink posing as an Xcode installation from the default path e.g.
ln -s /path/to/Xcode\ 15.2/Applications/Xcode.app
20 Jun 2024 05:28 AM - edited 20 Jun 2024 05:29 AM
Hey Patrick_H, thank you for your previous reply.
Our team decided to give it a try adding Fastlane and the Dynatrace Fastlane plugin to our project. We are currently experiencing an issue that would be much appreciated if you could help us out.
Below are the logs from Fastlane with the debugMode flag (please note I stripped some sensitive information):
[05:28:25]: ---------------------------------------
[05:28:25]: --- Step: dynatrace_process_symbols ---
[05:28:25]: ---------------------------------------
[05:28:25]: OS: ios
[05:28:25]: Version string: 2.63.0
[05:28:25]: Version: 0
[05:28:25]: Server URL: https://{environmentid}.live.dynatrace.com
[05:28:25]: Tempdir:
[05:28:25]: Symbols file path: /Users/runner/work/1/QA-dSYM
[05:28:25]: Checking AppFile for possible AppID
[05:28:25]: BundleID: example.com
[05:28:25]: Remote DSS client: https://{environmentid}.live.dynatrace.com
[07:39:22]: Tempdir:
[07:39:22]: Symbols file path: /Users/runner/work/1/QA-dSYM
[07:39:22]: Checking AppFile for possible AppID
[07:39:22]: BundleID: example.com
[07:39:23]: Remote DSS client: https://api.mobileagent.downloads.dynatrace.com/sprint-latest-dss-client/294
[07:39:27]: Unzipping fetched file with MD5 hash: b7f4d834d5a52afb698ae94e7fc842e5
[07:39:27]: Found a different remote DTXDssClient client. Removing local version and updating.
[07:39:27]: Successfully updated DTXDssClient.
[07:39:27]: No existing LLDB symlink at destination: dynatrace/LLDB.framework
[07:39:27]: Custom LLDB framework path `/Applications/Xcode_15.2.0.app/Contents/SharedFrameworks/LLDB.framework` exists.
[07:39:27]: Preparing to symlink custom LLDB framework path to: dynatrace
[07:39:27]: Creating a symlink of /Applications/Xcode_15.2.0.app/Contents/SharedFrameworks/LLDB.framework at /Users/runner/work/1/s/dynatrace/LLDB.framework
[07:39:27]: Unknown method 'print_command'
+---------------------------------------+
| Lane Context |
+------------------+--------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios dsym_upload_qa |
| VERSION_NUMBER | 2.63.0 |
| BUILD_NUMBER | 0 |
+------------------+--------------------+
[07:39:27]: To call another action from an action use `other_action.print_command` instead
We tried reading the open source code from the plugin but we couldn't figure out. Any help would be much appreciated, thanks!
20 Jun 2024 05:33 AM
We also tried without the debugMode flag and we get the following log:
[05:28:25]: ---------------------------------------
[05:28:25]: --- Step: dynatrace_process_symbols ---
[05:28:25]: ---------------------------------------
[05:28:25]: OS: ios
[05:28:25]: Version string: 2.63.0
[05:28:25]: Version: 0
[05:28:25]: Server URL: https://{environmentid}.live.dynatrace.com
[05:28:25]: Tempdir:
[05:28:25]: Symbols file path: /Users/runner/work/1/QA-dSYM
[05:28:25]: Checking AppFile for possible AppID
[05:28:25]: BundleID: example.com
[05:28:25]: Remote DSS client: https://api.mobileagent.downloads.dynatrace.com/sprint-latest-dss-client/294
[05:28:31]: Unzipping fetched file with MD5 hash: b7f4d834d5a52afb698ae94e7fc842e5
[05:28:31]: Found a different remote DTXDssClient client. Removing local version and updating.
[05:28:31]: Successfully updated DTXDssClient.
[05:28:31]: No existing LLDB symlink at destination: dynatrace/LLDB.framework
[05:28:31]: Custom LLDB framework path `/Applications/Xcode_15.2.0.app/Contents/SharedFrameworks/LLDB.framework` exists.
[05:28:31]: Preparing to symlink custom LLDB framework path to: dynatrace
[05:28:31]: Creating a symlink of /Applications/Xcode_15.2.0.app/Contents/SharedFrameworks/LLDB.framework at /Users/runner/work/1/s/dynatrace/LLDB.framework
[05:28:32]: Shell command exited with exit status 1 instead of 0.
+---------------------------------------+
| Lane Context |
+------------------+--------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios dsym_upload_qa |
| VERSION_NUMBER | 2.63.0 |
| BUILD_NUMBER | 0 |
+------------------+--------------------+
[05:28:32]: DTXDssClient finished with errors.
20 Jun 2024 06:52 AM
Hi!
thank you for reporting this, it seemed a bug slipped in with our last release... We will look into this and a fix should be available next week.
25 Jun 2024 07:07 AM
Hi!
Version 2.1.4 of the fastlane plugin that was just released fixes this issue.