Group Group Group Group Group Group Group Group Group

Chapter 4 - Starter App Crash

When I tired to build and run the Chapter 4 starter app, it crashed. But the Final version was ok. I redownloaded the app but the problem still exist. Anyone can comment? (Am using Xcode ver 11) Thanks.

Hopes it helps - following are the messages from the console :

2019-12-04 15:41:56.738888+0800 Bubble Tea Finder[2119:44837] [error] error: -addPersistentStoreWithType:SQLite configuration:(null) URL:file:///Users/vincentkoh/Library/Developer/CoreSimulator/Devices/D33F9CF0-646F-4158-A255-F23F7D5F0267/data/Containers/Data/Application/3B5F7A84-1937-4DD2-8DFE-3546D4C45AB5/Library/Application%20Support/Bubble_Tea_Finder.sqlite options:{
NSInferMappingModelAutomaticallyOption = 1;
NSMigratePersistentStoresAutomaticallyOption = 1;
} … returned error NSCocoaErrorDomain(134130) with userInfo dictionary {
URL = “file:///Users/vincentkoh/Library/Developer/CoreSimulator/Devices/D33F9CF0-646F-4158-A255-F23F7D5F0267/data/Containers/Data/Application/3B5F7A84-1937-4DD2-8DFE-3546D4C45AB5/Library/Application%20Support/Bubble_Tea_Finder.sqlite”;
metadata = {
NSPersistenceFrameworkVersion = 962;
NSStoreModelVersionHashes = {
Category = {length = 32, bytes = 0x9ae4d08d fba40021 685d6977 c3556800 … f6e421b2 32b7392a };
Entity = {length = 32, bytes = 0xcb122d10 055b6f51 1220d40e d8db2aec … b741a06f d5a356ea };
Location = {length = 32, bytes = 0x230c2114 d5f00667 66efd5a9 009ffd47 … 41b6174e 288901db };
PriceInfo = {length = 32, bytes = 0x5b97b4ba 580ff3c0 acfdfb7d 2d682c44 … 7f3a7863 a9a4e5e0 };
Stats = {length = 32, bytes = 0x01f2d957 b7ef2cfa ccf978aa 5a7e21f0 … fb448bf0 ff42835a };
Venue = {length = 32, bytes = 0x1fb65451 53d6150e 6bdaaf2c 6127a318 … 25530bf3 e1f548ec };
};
NSStoreModelVersionHashesDigest = “9JceqUm2OZVNJKGFEbaez0XgjTwqZMI79SBAOGFwYlrJkoPJw/hh0iHUtKs9V5f1rcGGlmCAnN2S5rCn8mfd2Q==”;
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
“”
);
NSStoreType = SQLite;
NSStoreUUID = “FB8D26A0-146F-45DB-A488-2829B5B83D12”;
“_NSAutoVacuumLevel” = 2;
};
reason = “Can’t find model for source store”;
}
CoreData: error: -addPersistentStoreWithType:SQLite configuration:(null) URL:file:///Users/vincentkoh/Library/Developer/CoreSimulator/Devices/D33F9CF0-646F-4158-A255-F23F7D5F0267/data/Containers/Data/Application/3B5F7A84-1937-4DD2-8DFE-3546D4C45AB5/Library/Application%20Support/Bubble_Tea_Finder.sqlite options:{
NSInferMappingModelAutomaticallyOption = 1;
NSMigratePersistentStoresAutomaticallyOption = 1;
} … returned error NSCocoaErrorDomain(134130) with userInfo dictionary {
URL = “file:///Users/vincentkoh/Library/Developer/CoreSimulator/Devices/D33F9CF0-646F-4158-A255-F23F7D5F0267/data/Containers/Data/Application/3B5F7A84-1937-4DD2-8DFE-3546D4C45AB5/Library/Application%20Support/Bubble_Tea_Finder.sqlite”;
metadata = {
NSPersistenceFrameworkVersion = 962;
NSStoreModelVersionHashes = {
Category = {length = 32, bytes = 0x9ae4d08d fba40021 685d6977 c3556800 … f6e421b2 32b7392a };
Entity = {length = 32, bytes = 0xcb122d10 055b6f51 1220d40e d8db2aec … b741a06f d5a356ea };
Location = {length = 32, bytes = 0x230c2114 d5f00667 66efd5a9 009ffd47 … 41b6174e 288901db };
PriceInfo = {length = 32, bytes = 0x5b97b4ba 580ff3c0 acfdfb7d 2d682c44 … 7f3a7863 a9a4e5e0 };
Stats = {length = 32, bytes = 0x01f2d957 b7ef2cfa ccf978aa 5a7e21f0 … fb448bf0 ff42835a };
Venue = {length = 32, bytes = 0x1fb65451 53d6150e 6bdaaf2c 6127a318 … 25530bf3 e1f548ec };
};
NSStoreModelVersionHashesDigest = “9JceqUm2OZVNJKGFEbaez0XgjTwqZMI79SBAOGFwYlrJkoPJw/hh0iHUtKs9V5f1rcGGlmCAnN2S5rCn8mfd2Q==”;
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
“”
);
NSStoreType = SQLite;
NSStoreUUID = “FB8D26A0-146F-45DB-A488-2829B5B83D12”;
“_NSAutoVacuumLevel” = 2;
};
reason = “Can’t find model for source store”;
}
CoreData: annotation: NSPersistentStoreCoordinator’s current model hashes are {
Category = {length = 32, bytes = 0x9ae4d08d fba40021 685d6977 c3556800 … f6e421b2 32b7392a };
Location = {length = 32, bytes = 0x230c2114 d5f00667 66efd5a9 009ffd47 … 41b6174e 288901db };
PriceInfo = {length = 32, bytes = 0x5b97b4ba 580ff3c0 acfdfb7d 2d682c44 … 7f3a7863 a9a4e5e0 };
Stats = {length = 32, bytes = 0x01f2d957 b7ef2cfa ccf978aa 5a7e21f0 … fb448bf0 ff42835a };
Venue = {length = 32, bytes = 0x1fb65451 53d6150e 6bdaaf2c 6127a318 … 25530bf3 e1f548ec };
}
CoreData: annotation: <NSPersistentStoreCoordinator: 0x600003900f80>: Attempting recovery from error encountered during addPersistentStore: Error Domain=NSCocoaErrorDomain Code=134130 “Persistent store migration failed, missing source managed object model.” UserInfo={URL=file:///Users/vincentkoh/Library/Developer/CoreSimulator/Devices/D33F9CF0-646F-4158-A255-F23F7D5F0267/data/Containers/Data/Application/3B5F7A84-1937-4DD2-8DFE-3546D4C45AB5/Library/Application%20Support/Bubble_Tea_Finder.sqlite, metadata={
NSPersistenceFrameworkVersion = 962;
NSStoreModelVersionHashes = {
Category = {length = 32, bytes = 0x9ae4d08d fba40021 685d6977 c3556800 … f6e421b2 32b7392a };
Entity = {length = 32, bytes = 0xcb122d10 055b6f51 1220d40e d8db2aec … b741a06f d5a356ea };
Location = {length = 32, bytes = 0x230c2114 d5f00667 66efd5a9 009ffd47 … 41b6174e 288901db };
PriceInfo = {length = 32, bytes = 0x5b97b4ba 580ff3c0 acfdfb7d 2d682c44 … 7f3a7863 a9a4e5e0 };
Stats = {length = 32, bytes = 0x01f2d957 b7ef2cfa ccf978aa 5a7e21f0 … fb448bf0 ff42835a };
Venue = {length = 32, bytes = 0x1fb65451 53d6150e 6bdaaf2c 6127a318 … 25530bf3 e1f548ec };
};
NSStoreModelVersionHashesDigest = “9JceqUm2OZVNJKGFEbaez0XgjTwqZMI79SBAOGFwYlrJkoPJw/hh0iHUtKs9V5f1rcGGlmCAnN2S5rCn8mfd2Q==”;
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
“”
);
NSStoreType = SQLite;
NSStoreUUID = “FB8D26A0-146F-45DB-A488-2829B5B83D12”;
“_NSAutoVacuumLevel” = 2;
}, reason=Can’t find model for source store}
Unresolved error Error Domain=NSCocoaErrorDomain Code=134130 “Persistent store migration failed, missing source managed object model.” UserInfo={URL=file:///Users/vincentkoh/Library/Developer/CoreSimulator/Devices/D33F9CF0-646F-4158-A255-F23F7D5F0267/data/Containers/Data/Application/3B5F7A84-1937-4DD2-8DFE-3546D4C45AB5/Library/Application%20Support/Bubble_Tea_Finder.sqlite, metadata={
NSPersistenceFrameworkVersion = 962;
NSStoreModelVersionHashes = {
Category = {length = 32, bytes = 0x9ae4d08d fba40021 685d6977 c3556800 … f6e421b2 32b7392a };
Entity = {length = 32, bytes = 0xcb122d10 055b6f51 1220d40e d8db2aec … b741a06f d5a356ea };
Location = {length = 32, bytes = 0x230c2114 d5f00667 66efd5a9 009ffd47 … 41b6174e 288901db };
PriceInfo = {length = 32, bytes = 0x5b97b4ba 580ff3c0 acfdfb7d 2d682c44 … 7f3a7863 a9a4e5e0 };
Stats = {length = 32, bytes = 0x01f2d957 b7ef2cfa ccf978aa 5a7e21f0 … fb448bf0 ff42835a };
Venue = {length = 32, bytes = 0x1fb65451 53d6150e 6bdaaf2c 6127a318 … 25530bf3 e1f548ec };
};
NSStoreModelVersionHashesDigest = “9JceqUm2OZVNJKGFEbaez0XgjTwqZMI79SBAOGFwYlrJkoPJw/hh0iHUtKs9V5f1rcGGlmCAnN2S5rCn8mfd2Q==”;
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
“”
);
NSStoreType = SQLite;
NSStoreUUID = “FB8D26A0-146F-45DB-A488-2829B5B83D12”;
“_NSAutoVacuumLevel” = 2;
}, reason=Can’t find model for source store}, [“metadata”: {
NSPersistenceFrameworkVersion = 962;
NSStoreModelVersionHashes = {
Category = {length = 32, bytes = 0x9ae4d08d fba40021 685d6977 c3556800 … f6e421b2 32b7392a };
Entity = {length = 32, bytes = 0xcb122d10 055b6f51 1220d40e d8db2aec … b741a06f d5a356ea };
Location = {length = 32, bytes = 0x230c2114 d5f00667 66efd5a9 009ffd47 … 41b6174e 288901db };
PriceInfo = {length = 32, bytes = 0x5b97b4ba 580ff3c0 acfdfb7d 2d682c44 … 7f3a7863 a9a4e5e0 };
Stats = {length = 32, bytes = 0x01f2d957 b7ef2cfa ccf978aa 5a7e21f0 … fb448bf0 ff42835a };
Venue = {length = 32, bytes = 0x1fb65451 53d6150e 6bdaaf2c 6127a318 … 25530bf3 e1f548ec };
};
NSStoreModelVersionHashesDigest = “9JceqUm2OZVNJKGFEbaez0XgjTwqZMI79SBAOGFwYlrJkoPJw/hh0iHUtKs9V5f1rcGGlmCAnN2S5rCn8mfd2Q==”;
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
“”
);
NSStoreType = SQLite;
NSStoreUUID = “FB8D26A0-146F-45DB-A488-2829B5B83D12”;
“_NSAutoVacuumLevel” = 2;
}, “URL”: file:///Users/vincentkoh/Library/Developer/CoreSimulator/Devices/D33F9CF0-646F-4158-A255-F23F7D5F0267/data/Containers/Data/Application/3B5F7A84-1937-4DD2-8DFE-3546D4C45AB5/Library/Application%20Support/Bubble_Tea_Finder.sqlite, “reason”: Can’t find model for source store]
2019-12-04 15:41:56.756470+0800 Bubble Tea Finder[2119:44837] [error] warning: View context accessed for persistent container Bubble_Tea_Finder with no stores loaded
CoreData: warning: View context accessed for persistent container Bubble_Tea_Finder with no stores loaded
2019-12-04 15:41:56.767960+0800 Bubble Tea Finder[2119:44837] [error] error: Illegal attempt to save to a file that was never opened. “This NSPersistentStoreCoordinator has no persistent stores (schema mismatch or migration failure). It cannot perform a save operation.”. Last recorded error = NSCocoaErrorDomain(134130) / {
NSFilePath = “/Users/vincentkoh/Library/Developer/CoreSimulator/Devices/D33F9CF0-646F-4158-A255-F23F7D5F0267/data/Containers/Data/Application/3B5F7A84-1937-4DD2-8DFE-3546D4C45AB5/Library/Application Support/Bubble_Tea_Finder.sqlite”;
}
CoreData: error: Illegal attempt to save to a file that was never opened. “This NSPersistentStoreCoordinator has no persistent stores (schema mismatch or migration failure). It cannot perform a save operation.”. Last recorded error = NSCocoaErrorDomain(134130) / {
NSFilePath = “/Users/vincentkoh/Library/Developer/CoreSimulator/Devices/D33F9CF0-646F-4158-A255-F23F7D5F0267/data/Containers/Data/Application/3B5F7A84-1937-4DD2-8DFE-3546D4C45AB5/Library/Application Support/Bubble_Tea_Finder.sqlite”;
}

2019-12-04 15:41:56.774162+0800 Bubble Tea Finder[2119:44837] *** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘This NSPersistentStoreCoordinator has no persistent stores (schema mismatch or migration failure). It cannot perform a save operation.’
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23b98bde __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff503b5b20 objc_exception_throw + 48
2 CoreData 0x00007fff23835674 -[NSPersistentStoreCoordinator _exceptionNoStoreSaveFailureForError:recommendedFrame:] + 0
3 CoreData 0x00007fff23835ca0 -[NSPersistentStoreCoordinator _introspectLastErrorAndThrow] + 164
4 CoreData 0x00007fff238364d7 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke.756 + 1450
5 CoreData 0x00007fff2382f157 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 233
6 CoreData 0x00007fff2373304f -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1355
7 CoreData 0x00007fff23733082 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1406
8 CoreData 0x00007fff23759859 -[NSManagedObjectContext save:] + 1741
9 Bubble Tea Finder 0x000000010ee8397a $s17Bubble_Tea_Finder13CoreDataStackC11saveContextyyF + 186
10 Bubble Tea Finder 0x000000010ee90770 $s17Bubble_Tea_Finder11AppDelegateC18importJSONSeedDatayyF + 20800
11 Bubble Tea Finder 0x000000010ee8aebd $s17Bubble_Tea_Finder11AppDelegateC26importJSONSeedDataIfNeededyyF + 957
12 Bubble Tea Finder 0x000000010ee8a777 $s17Bubble_Tea_Finder11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0l6LaunchK3KeyaypGSgtF + 871
13 Bubble Tea Finder 0x000000010ee8a8f4 $s17Bubble_Tea_Finder11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0l6LaunchK3KeyaypGSgtFTo + 212
14 UIKitCore 0x00007fff4715994f -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232
15 UIKitCore 0x00007fff4715b2e7 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3980
16 UIKitCore 0x00007fff47160c05 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1281
17 UIKitCore 0x00007fff468b58b1 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
18 UIKitCore 0x00007fff46d96cd5 _UIScenePerformActionsWithLifecycleActionMask + 83
19 UIKitCore 0x00007fff468b63c3 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
20 UIKitCore 0x00007fff468b5e84 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 474
21 UIKitCore 0x00007fff468b61f3 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 821
22 UIKitCore 0x00007fff468b5a85 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
23 UIKitCore 0x00007fff468b9e70 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 159
24 UIKitCore 0x00007fff46cbdf8b +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 865
25 UIKitCore 0x00007fff46db51cf _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
26 UIKitCore 0x00007fff468b9b9e __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153
27 UIKitCore 0x00007fff46db50d2 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84
28 UIKitCore 0x00007fff468b9a0c -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381
29 UIKitCore 0x00007fff46717c96 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657
30 UIKitCore 0x00007fff4671681b -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
31 UIKitCore 0x00007fff467179c0 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210
32 UIKitCore 0x00007fff4715f262 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 535
33 UIKitCore 0x00007fff46cdf774 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
34 FrontBoardServices 0x00007fff362e1d43 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 442
35 FrontBoardServices 0x00007fff3630a00c __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102
36 FrontBoardServices 0x00007fff362ecd21 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
37 FrontBoardServices 0x00007fff36309c9d __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355
38 libdispatch.dylib 0x000000010fc19d64 _dispatch_client_callout + 8
39 libdispatch.dylib 0x000000010fc1ccd5 _dispatch_block_invoke_direct + 300
40 FrontBoardServices 0x00007fff3633108a FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 30
41 FrontBoardServices 0x00007fff36330d78 -[FBSSerialQueue _queue_performNextIfPossible] + 441
42 FrontBoardServices 0x00007fff36331287 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
43 CoreFoundation 0x00007fff23afbac1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
44 CoreFoundation 0x00007fff23afb9ec __CFRunLoopDoSource0 + 76
45 CoreFoundation 0x00007fff23afb1c4 __CFRunLoopDoSources0 + 180
46 CoreFoundation 0x00007fff23af5ecf __CFRunLoopRun + 1263
47 CoreFoundation 0x00007fff23af56b6 CFRunLoopRunSpecific + 438
48 GraphicsServices 0x00007fff3815cbb0 GSEventRunModal + 65
49 UIKitCore 0x00007fff47162a67 UIApplicationMain + 1621
50 Bubble Tea Finder 0x000000010ee91078 main + 72
51 libdyld.dylib 0x00007fff5123bcf5 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Hi I managed to solved the problem. I just deleted the app on my Mac and run it again. Everything works. :slight_smile: