Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Consistent crash during app launch #121

Closed
kohlab opened this issue Dec 29, 2019 · 4 comments
Closed

Consistent crash during app launch #121

kohlab opened this issue Dec 29, 2019 · 4 comments
Labels
build dependencies Pull requests that update a dependency file ios

Comments

@kohlab
Copy link

kohlab commented Dec 29, 2019

Steps to reproduce

  1. Clean build folder in Xcode
  2. Build
  3. Run

Expected behavior

We expect app to launch without complaint, as before we upgraded to the most recent stack. (Annoyingly the crash remains in all our attempts to far to revert.)

Actual behavior

Instead we get this stack trace:

2019-12-28 06:31:18.155853-0800 MyApp[51591:2158265] +[NSUserDefaults mme_configuration]: unrecognized selector sent to class 0x1089cecc0
2019-12-28 06:31:18.165360-0800 MyApp[51591:2158265] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSUserDefaults mme_configuration]: unrecognized selector sent to class 0x1089cecc0'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001087081e6 __exceptionPreprocess + 294
	1   libobjc.A.dylib                     0x0000000107954031 objc_exception_throw + 48
	2   CoreFoundation                      0x00000001087896c4 +[NSObject(NSObject) doesNotRecognizeSelector:] + 132
	3   CoreFoundation                      0x000000010868a898 ___forwarding___ + 1432
	4   CoreFoundation                      0x000000010868a278 _CF_forwarding_prep_0 + 120
	5   Mapbox                              0x000000010c232802 -[MGLMapboxEvents init] + 262
	6   Mapbox                              0x000000010c233a9a __33+[MGLMapboxEvents sharedInstance]_block_invoke + 38
	7   libdispatch.dylib                   0x000000010f94d7ec _dispatch_client_callout + 8
	8   libdispatch.dylib                   0x000000010f94ed64 dispatch_once_f + 285
	9   Mapbox                              0x000000010c2332ee +[MGLMapboxEvents sharedInstance] + 97
	10  Mapbox                              0x000000010c23332c +[MGLMapboxEvents setupWithAccessToken:] + 60
	11  libdispatch.dylib                   0x000000010f94c7ab _dispatch_call_block_and_release + 12
	12  libdispatch.dylib                   0x000000010f94d7ec _dispatch_client_callout + 8
	13  libdispatch.dylib                   0x000000010f9588cf _dispatch_main_queue_callback_4CF + 628
	14  CoreFoundation                      0x00000001086cac99 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	15  CoreFoundation                      0x000000010868eea6 __CFRunLoopRun + 2342
	16  CoreFoundation                      0x000000010868e30b CFRunLoopRunSpecific + 635
	17  GraphicsServices                    0x0000000111e67a73 GSEventRunModal + 62
	18  UIKit                               0x00000001097c0057 UIApplicationMain + 159
	19  MyApp                               0x000000010697a4eb main + 75
	20  libdyld.dylib                       0x000000010f9ca955 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Configuration

Mapbox SDK versions:

These are the versions we have set up in our Cartfile (the latest, we think):

github "mapbox/MapboxDirections.swift" ~> 0.30
github "mapbox/MapboxGeocoder.swift" ~> 0.12
github "mapbox/mapbox-navigation-ios" ~> 0.38.1
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" ~> 5.4

iOS/macOS versions:

Running macOS 10.15.2 to run the iOS simulator.

Device/simulator models:

Deploying on iOS 11.4 in iPhone SE Simulator.

Xcode version:

Xcode version 11.3 (11C29)

@julianrex
Copy link
Contributor

@kohlab thanks for the report. In 5.6.0 we changed to including our events SDK as a dependency. Unfortunately Carthage binary dependencies do not support adding their own dependencies and currently our SDK does not build from source cleanly (via Carthage).

Until it does (and you can specify the Maps SDK as a github dependency) developers need to manually specify the events SDK:

github "mapbox/mapbox-events-ios" ~> 0.10.2.

Please read the release notes here: https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v5.6.0.

However, since you're including mapbox-navigation-ios, which itself specifies the Maps SDK dependency and the events SDK (version 0.9.5) I believe you'll need to wait until there's a version of mapbox-navigation-ios that uses 0.10.2. @1ec5 can you confirm and is there an ETA for that?

In the meantime, I would suggest pinning to Maps SDK version 5.5.0, so:

binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" == 5.5.0

cc @alfwatt @zugaldia

@julianrex julianrex added dependencies Pull requests that update a dependency file ios labels Jan 2, 2020
@kohlab
Copy link
Author

kohlab commented Jan 2, 2020

@julianrex Thanks very much. Pinning the Maps SDK does indeed avoid the crash. I'll look for updates to the Carthage dependencies issue and will hold off on 5.6.0 until then. Thanks again.

@julianrex
Copy link
Contributor

Thanks for the update, I'll go ahead and close this issue as solved.

@1ec5
Copy link
Contributor

1ec5 commented Jan 7, 2020

mapbox/mapbox-navigation-ios#2299 tracks changes that now need to happen in the navigation SDK.

@julianrex, perhaps the map SDK’s release notes should emphasize that this is a backwards-incompatible change for existing projects that relied on ~> 5.0 or similar.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build dependencies Pull requests that update a dependency file ios
Projects
None yet
Development

No branches or pull requests

3 participants