google / flutter-mediapipe

Apache License 2.0
161 stars 7 forks source link

Removing Flutter dependency causes integration tests to fail #33

Closed craiglabenz closed 1 month ago

craiglabenz commented 1 month ago

32 attempts to remove a dependency on the Flutter SDK (that never should have been present in the first place) and return these MediaPipe implementations to pure-Dart packages (albeit with native components, of course).

Interestingly, doing so seems to have broken GitHub Actions' ability to resolve native symbols in integration tests. The error that's surfacing is the classic :

Invalid argument(s): Couldn't resolve native function 'language_detector_create' in 'package:mediapipe_text/src/io/third_party/mediapipe/generated/mediapipe_text_bindings.dart' :
No asset with id 'package:mediapipe_text/src/io/third_party/mediapipe/generated/mediapipe_text_bindings.dart' found.
Available native assets: .
Attempted to fallback to process lookup.
dlsym(RTLD_DEFAULT, language_detector_create): symbol not found.

Over several commits, I added logging to the CI scripts to verify that the the unavailable native asset was in fact downloaded to the correct location, and it seems to have been downloaded just fine. (Note that this apparent CI success is misleading, because I turned off early exiting. The tests still failed.)

Eventually I tested reverting the Flutter SDK removal, and then the tests all passed for real.

Note that during this whole process, all tests have passed on my local machine.