Skip to content

IOS Expo App crashes on getWorkoutRouteSamples call for some workouts #423

@yesmanmx

Description

@yesmanmx

Describe the bug
I am developing an app that syncs your apple-health workouts.
Everything worked fine until I faced a large workout (Walk, 6h 50m, 20.7km)
When I call

    try {
        AppleHealthKit.getWorkoutRouteSamples(options, (err: string, results: WorkoutRouteQueryResults) => {
          console.log('here', err, results);
        });
      } catch (error) {
        console.error('error', error);
      }

App is crashing (no 'here' or 'error' app logs). If I launch the app from Xcode, the only thing I can see in the logs before a crash is:

F0913 16:34:55.070605 1804955648 RCTTurboModule.mm:156] Callback arg cannot be called more than once
*** Check failure stack trace: ***

Stacktrace:
See the "Screenshots" section

The same behaviour I have for one more workout (Walk, 4h 17m, 15km). So only 2 out of 621 workouts are failing
These workouts are not the largest I have had. I have multiple bike rides of 40+km and walk with 30+km. No problems with them

To Reproduce
Steps to reproduce the behavior:

  1. Launch expo app npx expo run:ios --device
  2. Execute the code from the "Describe the bug" section
  3. The app has crashed

Expected behavior
App is not crashing

Screenshots
Image

Smartphone (please complete the following information):

  • Device: iPhone 12 Pro
  • OS: iOS 18.6.2
  • Version 18.6.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions