Question

Version Conflict for 'Amplitude' in amplitude_flutter on CodeMagic Builds

  • 20 February 2024
  • 0 replies
  • 52 views

Expected Behavior

The amplitude_flutter plugin should resolve its dependencies correctly when running pod install as part of a Flutter project build process, especially when using publicly available versions of its dependencies like Amplitude. The build should complete successfully without version conflicts in the dependency resolution process.

Current Behavior

When attempting to run pod install in the CI/CD environment provided by CodeMagic, a version conflict arises for the Amplitude pod. Specifically, the amplitude_flutter plugin requires Amplitude version 8.18.0, which does not appear to be publicly available on pub.dev. This requirement leads to a failure in the dependency resolution process, as indicated by the error message suggesting a conflict between the version specified in Podfile.lock (8.16.1) and the one required by amplitude_flutter (8.18.0). This issue only occurs on the CodeMagic build machine; local environments do not exhibit the same problem.

Possible Solution

A potential solution could involve the amplitude_flutter plugin maintainers updating the plugin to depend on a version of Amplitude that is publicly available, or providing clear guidance on how to manage this dependency when the specified version is not available. Additionally, investigating why this issue only manifests in the CodeMagic environment could provide insights into a more targeted solution.

Steps to Reproduce

  1. Include the amplitude_flutter plugin in the pubspec.yaml of a Flutter project.
  2. Run flutter pub get to fetch the project's dependencies.
  3. Navigate to the ios directory of the Flutter project and execute pod install as part of the build process configured in CodeMagic.
  4. Observe the version conflict error and the absence of Amplitude version 8.18.0 on pub.dev.

Environment

SDK Version: 8.16.2
Flutter Version: 3.16.9
CI/CD: CodeMagic
Note: This issue specifically occurs in the CodeMagic build environment and does not replicate in local development environments.


0 replies

Be the first to reply!

Reply