React-native-background-geolocation: Sending emailLog

Created on 27 Jan 2018  路  2Comments  路  Source: transistorsoft/react-native-background-geolocation

Sending emailLog throwing error if default mail client is not installed or in iCloud settings permission to mail client is disabled.

Your Environment

  • Plugin version: 2.10.1
  • Platform: iOS
  • OS version: 11.2.1
  • Device manufacturer / model: iphone SE
  • React Native version (react-native -v): 0.52.1
  • Plugin config
{
      desiredAccuracy: 0,
      distanceFilter: parseInt(await LocalStorage.getItem('interval')),
      // distanceFilter: 5,
      // HTTP / SQLite config
      method: 'POST',
      url: AppConfig.API.postCoords,
      // debug: true,
      // logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
      autoSync: true, // Set true to sync each location to server as it arrives.
      stopOnTerminate: false,
      preventSuspend: true,
      startOnBoot: startOnBoot,
      httpRootProperty: '.',
      locationTemplate: '{"latitude":<%= latitude %>, "longitude":<%= longitude %>, "accuracy":<%= accuracy %>}',
      extras: {
        id: driverId,
        auth_key: token
      },
      maxRecordsToPersist: 1, // Disable persisting to db, store only last coords.
    }

Expected Behavior

Tell to the user that it is not possible without default mail app and permission into icloud settings.

Actual Behavior

App crashing without any errors.

Steps to Reproduce

  1. Run app
  2. Call emailLog method.

Context

Call "emailLog" method without default mail app, or with disabled mail permission in iCloud settings.

Debug logs

2018-01-27 17:58:05.100788+0200 myApp[3123:2787395] [] nw_connection_get_connected_socket 27 Connection has no connected handler 2018-01-27 17:58:05.100868+0200 myApp[3123:2787395] TCP Conn 0x1c0174700 Failed : error 0:61 [61] 2018-01-27 17:58:06.602640+0200 myApp[3123:2787593] [MC] Filtering mail sheet accounts for bundle ID: com.app.my, source account management: 1 2018-01-27 17:58:06.658411+0200 myApp[3123:2787325] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present a nil modal view controller on target <UIViewController: 0x151d183f0>.' *** First throw call stack: (0x1850b2364 0x1842f8528 0x18e90d148 0x18e90f800 0x18e90fd34 0x18e90f750 0x18e671388 0x10512128c 0x105133c38 0x10512128c 0x105125ea0 0x18505a544 0x185058120 0x184f77e58 0x186e24f84 0x18e5f767c 0x1046424f8 0x184a9456c) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

bug

Most helpful comment

This is fixed now in 2.11.0

All 2 comments

I鈥檒l have a look at this next week.

This is fixed now in 2.11.0

Was this page helpful?
0 / 5 - 0 ratings