Hi!
After migrating my project from NS 4.2 to 5.1, it started crashing while calling firebase.init(). I have been enabling/disabling features, but so far to no avail. Crashlytics shows me that it is around this (see full thread dump below):
5 nativescript 0x10c44bfeb -[FIRFirestore setSettings:] (FIRFirestore.mm:202)
Since this is something with FIRFirestore, I already tried disabling Firestore (to try and isolate the issue) and rebuilding after deleting platforms, but still same crash.
I was wondering whether someone is experiencing similar issues or if someone can understand what the problem might be from the crash log.
Thanks!
Can you try the demo-ng app? It's also on NativeScript 5 and I don't see this issue: https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/653401b8ab1bef255e59364cc0061f7a51b65474/demo-ng/package.json#L12
Crashed: com.apple.main-thread
0 libunwind.dylib 0x113208a76 libunwind::CFI_Parser<libunwind::LocalAddressSpace>::decodeFDE(libunwind::LocalAddressSpace&, unsigned long long, libunwind::CFI_Parser<libunwind::LocalAddressSpace>::FDE_Info*, libunwind::CFI_Parser<libunwind::LocalAddressSpace>::CIE_Info*) + 26
1 libunwind.dylib 0x113207b1f libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step() + 127
2 libunwind.dylib 0x11320be4d _Unwind_RaiseException + 249
3 libc++abi.dylib 0x112dde0f1 __cxa_throw + 104
4 libobjc.A.dylib 0x11179f86a _objc_exception_destructor(void*) + 355
5 nativescript 0x10c44bfeb -[FIRFirestore setSettings:] (FIRFirestore.mm:202)
6 NativeScript 0x110824ebd ffi_call_unix64 + 85
7 NativeScript 0x110824141 ffi_call_int + 1377
8 NativeScript 0x110823bd9 ffi_call + 89
9 NativeScript 0x10fe9bebe NativeScript::FFICall::call(JSC::ExecState*) + 302
10 NativeScript 0x1108151db vmEntryToNative + 241
11 NativeScript 0x1105b4a1c JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 684
12 NativeScript 0x1107c093e JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 62
13 NativeScript 0x10ff7b0d0 JSC::callSetter(JSC::ExecState*, JSC::JSValue, JSC::JSValue, JSC::JSValue, JSC::ECMAMode) + 304
14 NativeScript 0x11000500a JSC::JSObject::putInlineSlow(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&) + 874
15 NativeScript 0x11067bd3a llint_slow_path_put_by_id + 1626
16 NativeScript 0x1108183fe llint_entry + 12748
17 NativeScript 0x11081ba8b llint_entry + 26713
18 NativeScript 0x11081bd81 llint_entry + 27471
19 NativeScript 0x11081ba8b llint_entry + 26713
20 NativeScript 0x11081ba8b llint_entry + 26713
21 NativeScript 0x1108150bd vmEntryToJavaScript + 235
22 NativeScript 0x1105b4d11 JSC::Interpreter::executeConstruct(JSC::ExecState*, JSC::JSObject*, JSC::ConstructType, JSC::ConstructData const&, JSC::ArgList const&, JSC::JSValue) + 545
23 NativeScript 0x1107efdde JSC::construct(JSC::ExecState*, JSC::JSValue, JSC::ConstructType, JSC::ConstructData const&, JSC::ArgList const&, JSC::JSValue) + 62
24 NativeScript 0x10ff964ab JSC::boundFunctionConstruct(JSC::ExecState*) + 683
25 ??? 0x676b725b237 (Missing)
26 ??? 0x676b78578aa (Missing)
27 ??? 0x676b784259e (Missing)
28 ??? 0x676b783e0d5 (Missing)
29 NativeScript 0x11081ba30 llint_entry + 26622
30 NativeScript 0x11081ba30 llint_entry + 26622
31 NativeScript 0x11081ba30 llint_entry + 26622
32 NativeScript 0x11081ba30 llint_entry + 26622
33 NativeScript 0x11081ba30 llint_entry + 26622
34 NativeScript 0x11081ba30 llint_entry + 26622
35 NativeScript 0x11081ba8b llint_entry + 26713
36 NativeScript 0x11081ba8b llint_entry + 26713
37 NativeScript 0x11081ba30 llint_entry + 26622
38 ??? 0x676b745c667 (Missing)
39 NativeScript 0x11081ba30 llint_entry + 26622
40 NativeScript 0x11081ba8b llint_entry + 26713
41 NativeScript 0x11081ba8b llint_entry + 26713
42 ??? 0x676b745c667 (Missing)
43 NativeScript 0x11081ba8b llint_entry + 26713
44 NativeScript 0x11081ba8b llint_entry + 26713
45 NativeScript 0x11081ba8b llint_entry + 26713
46 NativeScript 0x11081ba8b llint_entry + 26713
47 ??? 0x676b787042e (Missing)
48 NativeScript 0x11081ba30 llint_entry + 26622
49 ??? 0x676b78703ec (Missing)
50 NativeScript 0x11081ba30 llint_entry + 26622
51 ??? 0x676b787042e (Missing)
52 NativeScript 0x11081ba30 llint_entry + 26622
53 NativeScript 0x11081ba30 llint_entry + 26622
54 ??? 0x676b7870462 (Missing)
55 NativeScript 0x11081ba30 llint_entry + 26622
56 ??? 0x676b787042e (Missing)
57 NativeScript 0x11081ba30 llint_entry + 26622
58 NativeScript 0x11081ba8b llint_entry + 26713
59 ??? 0x676b745c1a6 (Missing)
60 ??? 0x676b773bbc3 (Missing)
61 NativeScript 0x11081ba30 llint_entry + 26622
62 NativeScript 0x11081ba30 llint_entry + 26622
63 ??? 0x676b7868f3b (Missing)
64 NativeScript 0x11081ba8b llint_entry + 26713
65 NativeScript 0x11081ba8b llint_entry + 26713
66 ??? 0x676b7870062 (Missing)
67 NativeScript 0x11081ba30 llint_entry + 26622
68 ??? 0x676b787002e (Missing)
69 NativeScript 0x11081ba30 llint_entry + 26622
70 ??? 0x676b7868f3b (Missing)
71 NativeScript 0x11081ba30 llint_entry + 26622
72 NativeScript 0x11081ba30 llint_entry + 26622
73 ??? 0x676b786fb71 (Missing)
74 NativeScript 0x11081ba30 llint_entry + 26622
75 ??? 0x676b786fb92 (Missing)
76 NativeScript 0x11081ba8b llint_entry + 26713
77 ??? 0x676b7866720 (Missing)
78 NativeScript 0x11081ba30 llint_entry + 26622
79 ??? 0x676b7866f3b (Missing)
80 NativeScript 0x11081ba30 llint_entry + 26622
81 ??? 0x676b7866ed8 (Missing)
82 NativeScript 0x11081ba30 llint_entry + 26622
83 NativeScript 0x11081ba8b llint_entry + 26713
84 ??? 0x676b745c1a6 (Missing)
85 ??? 0x676b773bc05 (Missing)
86 ??? 0x676b773bc47 (Missing)
87 ??? 0x676b773bc68 (Missing)
88 ??? 0x676b773bbc3 (Missing)
89 NativeScript 0x11081ba30 llint_entry + 26622
90 NativeScript 0x11081ba30 llint_entry + 26622
91 NativeScript 0x11081ba30 llint_entry + 26622
92 ??? 0x676b7868f3b (Missing)
93 NativeScript 0x11081ba8b llint_entry + 26713
94 ??? 0x676b7868f3b (Missing)
95 NativeScript 0x11081ba30 llint_entry + 26622
96 NativeScript 0x11081ba8b llint_entry + 26713
97 ??? 0x676b745c1a6 (Missing)
98 ??? 0x676b773bb4e (Missing)
99 ??? 0x676b773bc05 (Missing)
100 ??? 0x676b773bb4e (Missing)
101 ??? 0x676b773bbc3 (Missing)
102 NativeScript 0x11081ba30 llint_entry + 26622
103 NativeScript 0x11081ba30 llint_entry + 26622
104 ??? 0x676b753bf94 (Missing)
105 NativeScript 0x11081ba8b llint_entry + 26713
106 ??? 0x676b753bf1e (Missing)
107 NativeScript 0x11081ba30 llint_entry + 26622
108 ??? 0x676b753bef9 (Missing)
109 NativeScript 0x11081ba30 llint_entry + 26622
110 ??? 0x676b753bef9 (Missing)
111 NativeScript 0x11081ba30 llint_entry + 26622
112 NativeScript 0x11081ba30 llint_entry + 26622
113 ??? 0x676b753bfd5 (Missing)
114 NativeScript 0x11081ba30 llint_entry + 26622
115 ??? 0x676b753bf73 (Missing)
116 NativeScript 0x11081ba30 llint_entry + 26622
117 NativeScript 0x11081ba30 llint_entry + 26622
118 ??? 0x676b753bfd5 (Missing)
119 NativeScript 0x11081ba30 llint_entry + 26622
120 ??? 0x676b7866ef9 (Missing)
121 NativeScript 0x11081ba30 llint_entry + 26622
122 ??? 0x676b7866f3b (Missing)
123 NativeScript 0x11081ba30 llint_entry + 26622
124 ??? 0x676b7866f3b (Missing)
125 NativeScript 0x11081ba30 llint_entry + 26622
126 ??? 0x676b7866ed8 (Missing)
127 NativeScript 0x11081ba30 llint_entry + 26622
128 NativeScript 0x11081ba8b llint_entry + 26713
129 ??? 0x676b745c1a6 (Missing)
130 ??? 0x676b7635d62 (Missing)
131 ??? 0x676b7635d0d (Missing)
132 ??? 0x676b7635d2e (Missing)
133 ??? 0x676b7635ccc (Missing)
134 NativeScript 0x11081ba30 llint_entry + 26622
135 NativeScript 0x11081ba30 llint_entry + 26622
136 NativeScript 0x11081ba30 llint_entry + 26622
137 ??? 0x676b753bf3f (Missing)
138 NativeScript 0x11081ba8b llint_entry + 26713
139 NativeScript 0x11081ba8b llint_entry + 26713
140 NativeScript 0x11081ba30 llint_entry + 26622
141 NativeScript 0x11081ba30 llint_entry + 26622
142 NativeScript 0x11081ba30 llint_entry + 26622
143 NativeScript 0x11081ba8b llint_entry + 26713
144 NativeScript 0x11081ba30 llint_entry + 26622
145 NativeScript 0x11081ba8b llint_entry + 26713
146 NativeScript 0x11081ba30 llint_entry + 26622
147 NativeScript 0x11081ba8b llint_entry + 26713
148 ??? 0x676b745c1a6 (Missing)
149 ??? 0x676b7635d62 (Missing)
150 ??? 0x676b7635d0d (Missing)
151 ??? 0x676b7635d2e (Missing)
152 ??? 0x676b7855204 (Missing)
153 ??? 0x676b76cb6ae (Missing)
154 ??? 0x676b76cb711 (Missing)
155 NativeScript 0x11081ba30 llint_entry + 26622
156 NativeScript 0x11081ba30 llint_entry + 26622
157 NativeScript 0x11081ba30 llint_entry + 26622
158 ??? 0x676b785b33d (Missing)
159 NativeScript 0x11081ba30 llint_entry + 26622
160 ??? 0x676b75eaf9e (Missing)
161 NativeScript 0x11081ba30 llint_entry + 26622
162 ??? 0x676b785b33d (Missing)
163 NativeScript 0x11081ba30 llint_entry + 26622
164 NativeScript 0x11081ba30 llint_entry + 26622
165 ??? 0x676b778915b (Missing)
166 NativeScript 0x11081ba8b llint_entry + 26713
167 ??? 0x676b785b33d (Missing)
168 NativeScript 0x11081ba8b llint_entry + 26713
169 NativeScript 0x11081ba8b llint_entry + 26713
170 ??? 0x676b745c1a6 (Missing)
171 ??? 0x676b76cb711 (Missing)
172 NativeScript 0x11081ba30 llint_entry + 26622
173 NativeScript 0x11081ba30 llint_entry + 26622
174 ??? 0x676b785b33d (Missing)
175 NativeScript 0x11081ba8b llint_entry + 26713
176 NativeScript 0x11081ba8b llint_entry + 26713
177 ??? 0x676b785b33d (Missing)
178 NativeScript 0x11081ba8b llint_entry + 26713
179 NativeScript 0x11081ba8b llint_entry + 26713
180 NativeScript 0x11081ba30 llint_entry + 26622
181 NativeScript 0x11081ba8b llint_entry + 26713
182 NativeScript 0x11081ba8b llint_entry + 26713
183 NativeScript 0x11081ba30 llint_entry + 26622
184 NativeScript 0x11081ba8b llint_entry + 26713
185 NativeScript 0x11081ba30 llint_entry + 26622
186 NativeScript 0x11081ba8b llint_entry + 26713
187 ??? 0x676b745c1a6 (Missing)
188 ??? 0x676b76cb711 (Missing)
189 NativeScript 0x11081ba30 llint_entry + 26622
190 NativeScript 0x11081ba30 llint_entry + 26622
191 NativeScript 0x11081ba30 llint_entry + 26622
192 NativeScript 0x11081ba8b llint_entry + 26713
193 NativeScript 0x11081ba30 llint_entry + 26622
194 NativeScript 0x11081ba8b llint_entry + 26713
195 NativeScript 0x11081ba8b llint_entry + 26713
196 NativeScript 0x11081ba30 llint_entry + 26622
197 NativeScript 0x11081ba8b llint_entry + 26713
198 NativeScript 0x11081ba30 llint_entry + 26622
199 NativeScript 0x11081ba8b llint_entry + 26713
200 NativeScript 0x11081ba30 llint_entry + 26622
201 NativeScript 0x11081ba30 llint_entry + 26622
202 NativeScript 0x11081ba30 llint_entry + 26622
203 NativeScript 0x11081ba30 llint_entry + 26622
204 NativeScript 0x11081ba30 llint_entry + 26622
205 NativeScript 0x11081ba8b llint_entry + 26713
206 NativeScript 0x11081ba30 llint_entry + 26622
207 NativeScript 0x11081ba8b llint_entry + 26713
208 NativeScript 0x11081ba8b llint_entry + 26713
209 NativeScript 0x11081ba8b llint_entry + 26713
210 NativeScript 0x11081ba8b llint_entry + 26713
211 NativeScript 0x11081ba8b llint_entry + 26713
212 NativeScript 0x11081ba30 llint_entry + 26622
213 NativeScript 0x11081ba8b llint_entry + 26713
214 ??? 0x676b7855593 (Missing)
215 ??? 0x676b7855204 (Missing)
216 ??? 0x676b7855204 (Missing)
217 ??? 0x676b7855204 (Missing)
218 ??? 0x676b76026c6 (Missing)
219 ??? 0x676b76026c6 (Missing)
220 ??? 0x676b76026c6 (Missing)
221 ??? 0x676b7855204 (Missing)
222 ??? 0x676b7855204 (Missing)
223 NativeScript 0x11081ba30 llint_entry + 26622
224 NativeScript 0x11081ba30 llint_entry + 26622
225 NativeScript 0x11081ba8b llint_entry + 26713
226 NativeScript 0x11081ba30 llint_entry + 26622
227 NativeScript 0x11081ba30 llint_entry + 26622
228 NativeScript 0x11081ba8b llint_entry + 26713
229 NativeScript 0x11081ba8b llint_entry + 26713
230 NativeScript 0x11081ba30 llint_entry + 26622
231 NativeScript 0x11081ba30 llint_entry + 26622
232 NativeScript 0x11081ba30 llint_entry + 26622
233 NativeScript 0x11081ba30 llint_entry + 26622
234 NativeScript 0x11081ba30 llint_entry + 26622
235 NativeScript 0x11081ba30 llint_entry + 26622
236 NativeScript 0x11081ba8b llint_entry + 26713
237 NativeScript 0x11081ba8b llint_entry + 26713
238 NativeScript 0x1108150bd vmEntryToJavaScript + 235
239 NativeScript 0x1105b49b7 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 583
240 NativeScript 0x1107c093e JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 62
241 NativeScript 0x10ff95c36 JSC::boundThisNoArgsFunctionCall(JSC::ExecState*) + 374
242 ??? 0x676b726ca36 (Missing)
243 NativeScript 0x11081ba8b llint_entry + 26713
244 NativeScript 0x11081ba8b llint_entry + 26713
245 NativeScript 0x1108150bd vmEntryToJavaScript + 235
246 NativeScript 0x1105b49b7 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 583
247 NativeScript 0x1107c093e JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 62
248 NativeScript 0x10ff95c36 JSC::boundThisNoArgsFunctionCall(JSC::ExecState*) + 374
249 ??? 0x676b726ca36 (Missing)
250 NativeScript 0x11081ba8b llint_entry + 26713
251 NativeScript 0x1108150bd vmEntryToJavaScript + 235
252 NativeScript 0x1105b49b7 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 583
253 NativeScript 0x1107c093e JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 62
254 NativeScript 0x10ff07c8c NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::callFunction(JSC::JSValue const&, JSC::ArgList const&, void*) + 124
255 NativeScript 0x10ff07801 NativeScript::ObjCMethodCallback::ffiClosureCallback(void*, void**, void*) + 449
256 NativeScript 0x10ff07e74 NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*) + 84
257 NativeScript 0x110824656 ffi_closure_unix64_inner + 982
258 NativeScript 0x11082507a ffi_closure_unix64 + 72
259 ??? 0x60000094d2c0 (Missing)
260 CoreFoundation 0x1128ce02f _CFXRegistrationPost + 447
261 CoreFoundation 0x1128cdd71 ___CFXNotificationPost_block_invoke + 225
262 CoreFoundation 0x1129b4ae2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826
263 CoreFoundation 0x1128cd694 _CFXNotificationPost + 964
264 Foundation 0x10d967589 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
265 UIKitCore 0x11be568c2 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4738
266 UIKitCore 0x11be5bc2f -[UIApplication _runWithMainScene:transitionContext:completion:] + 1623
267 UIKitCore 0x11b67a4e9 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
268 UIKitCore 0x11b68329c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
269 UIKitCore 0x11b67a126 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 233
270 UIKitCore 0x11b67aae0 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1085
271 UIKitCore 0x11b678cb5 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 795
272 UIKitCore 0x11b67895f -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 435
273 UIKitCore 0x11b67da90 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 584
274 UIKitCore 0x11b67e80e _performActionsWithDelayForTransitionContext + 100
275 UIKitCore 0x11b67d7ef -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 221
276 UIKitCore 0x11b68293a -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
277 UIKitCore 0x11be5a44e -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
278 UIKitCore 0x11b9fed09 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 357
279 FrontBoardServices 0x1195952da -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
280 FrontBoardServices 0x1195a0443 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 271
281 FrontBoardServices 0x11959fb3a __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
282 libdispatch.dylib 0x112ee954b _dispatch_client_callout + 8
283 libdispatch.dylib 0x112eec60b _dispatch_block_invoke_direct + 312
284 FrontBoardServices 0x1195d4ba8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
285 FrontBoardServices 0x1195d4860 -[FBSSerialQueue _performNext] + 457
286 FrontBoardServices 0x1195d4e40 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
287 CoreFoundation 0x1128f4721 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
288 CoreFoundation 0x1128f3f93 __CFRunLoopDoSources0 + 243
289 CoreFoundation 0x1128ee63f __CFRunLoopRun + 1263
290 CoreFoundation 0x1128ede11 CFRunLoopRunSpecific + 625
291 GraphicsServices 0x1182611dd GSEventRunModal + 62
292 UIKitCore 0x11be5d81d UIApplicationMain + 140
293 NativeScript 0x110824ebd ffi_call_unix64 + 85
294 NativeScript 0x110824141 ffi_call_int + 1377
295 NativeScript 0x110823bd9 ffi_call + 89
296 NativeScript 0x10fe9bebe NativeScript::FFICall::call(JSC::ExecState*) + 302
297 ??? 0x676b725b02d (Missing)
298 NativeScript 0x11081ba8b llint_entry + 26713
299 NativeScript 0x11081ba8b llint_entry + 26713
300 NativeScript 0x11081ba8b llint_entry + 26713
301 NativeScript 0x11081ba8b llint_entry + 26713
302 NativeScript 0x11081ba8b llint_entry + 26713
303 NativeScript 0x11081ba8b llint_entry + 26713
304 NativeScript 0x1108150bd vmEntryToJavaScript + 235
305 NativeScript 0x1105b49b7 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 583
306 NativeScript 0x1107c09a5 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 85
307 NativeScript 0x10feb4c6e NativeScript::GlobalObject::moduleLoaderEvaluate(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue, JSC::JSValue) + 2622
308 NativeScript 0x10fff0a2e JSC::JSModuleLoader::evaluate(JSC::ExecState*, JSC::JSValue, JSC::JSValue, JSC::JSValue) + 238
309 ??? 0x676b725b177 (Missing)
310 NativeScript 0x11081ba8b llint_entry + 26713
311 NativeScript 0x11081ba8b llint_entry + 26713
312 NativeScript 0x1108150bd vmEntryToJavaScript + 235
313 NativeScript 0x1105b49b7 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 583
314 NativeScript 0x1107c0b11 JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 177
315 NativeScript 0x10ffec0a3 JSC::JSJobMicrotask::run(JSC::ExecState*) + 483
316 NativeScript 0x10feab5c7 NativeScript::GlobalObject::drainMicrotasks() + 183
317 NativeScript 0x10ff133d1 -[TNSRuntime executeModule:referredBy:] + 481
318 nativescript 0x10c33b433 main (main.m:85)
319 libdyld.dylib 0x112f59575 start + 1
Please elaborate..
@EddyVerbruggen hey man, to be honest it works fine on another project (although a much smaller one), so I guess it must be something environmental. I was too soon to hit enter in the original post, please see updated post.
Cheers mate - let me know if there's a repo I can look at to assist with. Will have some time this evening.
@EddyVerbruggen honestly I don't want to bother you with looking at a repo. Maybe just a hint from your experience what/how to check/investigate (I want to learn how to debug better). Am I right to assume that FIRFirestore setSettings is loading the Info.plist and as such I need to check there? (although it didn't change apart from the location since App_Resources is now in the project root and things like launch icons/splash screens are loaded just fine). What else should/could I check?
Thanks!
@EddyVerbruggen after some trial and error, I found that my other project started to crash at the same point as well after updating the pods repo. Unfortunately, I was unable to run the demo-ng project (I got some errors about functions as you can see below). Could you maybe try to update your pods repo and see if you also get issues?
I read on the Firebase Github, that there are some versioning issues and that Firebase 5.14.0 should solve them, but that one has certificate issues that should be solved with Firestore 0.16.1 which is not yet released. I really hope that one will solve these crashes.
By the way: this is the runtime error I get when running the demo-ng project of this plugin:
JavaScript error:
file:///app/tns_modules/nativescript-plugin-firebase/functions/functions.js:5:23: JS ERROR ReferenceError: Can't find variable: functionName
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: ReferenceError: Can't find variable: functionName
at
1 anonymous@file:///app/tns_modules/nativescript-plugin-firebase/functions/functions.js:5:23
2 evaluate@[native code]
3 moduleEvaluation@[native code]
4 promiseReactionJob@[native code]
5 require@[native code]
6 anonymous@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:6:32
7 evaluate@[native code]
8 moduleEvaluation@[native code]
9 promiseReactionJob@[native code]
10 require@[native code]
11 anonymous@file:///app/app.component.js:4:23
12 evaluate@[native code]
13 moduleEvaluation@[native code]
14 promiseReactionJob@[native code]
15 require@[native code]
16 anonymous@file:///app/app.module.js:6:30
17 evaluate@[native code]
18 moduleEvaluation@[native code]
19 promiseReactionJob@[native code]
20 require@[native code]
21 anonymous@file:///app/main.js:5:27
22 evaluate@[native code]
23 moduleEvaluation@[native code]
Also when I run demo-ng.ios this I get these errors:
$ npm run "demo-ng.ios"
> [email protected] demo-ng.ios /Users/joni/projects/plugins/nativescript-plugin-firebase/src
> npm run preparedemo-ng && cd ../demo-ng && tns run ios
> [email protected] preparedemo-ng /Users/joni/projects/plugins/nativescript-plugin-firebase/src
> npm run tsc && npm run package && cd ../demo-ng && tns plugin remove nativescript-plugin-firebase && tns plugin add ../publish/package/*.tgz && tns install
> [email protected] tsc /Users/joni/projects/plugins/nativescript-plugin-firebase/src
> tsc -skipLibCheck
213 installApp?: false;
~~~~~
firebase.d.ts(213,18): error TS1110: Type expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.android.ts(4,33): error TS1005: ',' expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.android.ts(4,35): error TS1005: '>' expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.android.ts(4,37): error TS1128: Declaration or statement expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.android.ts(4,59): error TS1005: ')' expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.android.ts(4,67): error TS1005: ';' expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.android.ts(4,68): error TS1128: Declaration or statement expected.
5 const instance = com.google.firebase.functions.FirebaseFunctions.getInstance();
~~~~~~~~
functions/functions.android.ts(5,9): error TS1005: ':' expected.
5 const instance = com.google.firebase.functions.FirebaseFunctions.getInstance();
~
functions/functions.android.ts(5,81): error TS1005: ',' expected.
7 return (data: I) => new Promise<O>((resolve, reject) => {
~~
functions/functions.android.ts(7,20): error TS1005: '{' expected.
7 return (data: I) => new Promise<O>((resolve, reject) => {
~~~~~~~
functions/functions.android.ts(7,27): error TS1005: ':' expected.
28 });
~
functions/functions.android.ts(28,5): error TS1005: ',' expected.
2 export declare function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O>;
~
functions/functions.d.ts(2,41): error TS1005: ',' expected.
2 export declare function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O>;
~
functions/functions.d.ts(2,43): error TS1005: '>' expected.
2 export declare function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O>;
~
functions/functions.d.ts(2,45): error TS1128: Declaration or statement expected.
2 export declare function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O>;
~
functions/functions.d.ts(2,67): error TS1005: ')' expected.
2 export declare function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O>;
~
functions/functions.d.ts(2,75): error TS1005: ';' expected.
2 export declare function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O>;
~
functions/functions.d.ts(2,76): error TS1128: Declaration or statement expected.
2 export declare function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O>;
~
functions/functions.d.ts(2,97): error TS1005: '(' expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.ios.ts(4,33): error TS1005: ',' expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.ios.ts(4,35): error TS1005: '>' expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.ios.ts(4,37): error TS1128: Declaration or statement expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.ios.ts(4,59): error TS1005: ')' expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.ios.ts(4,67): error TS1005: ';' expected.
4 export function httpsCallable<I = {}, O = {}>(functionName: string): HttpsCallable<I, O> {
~
functions/functions.ios.ts(4,68): error TS1128: Declaration or statement expected.
6 const functions = FIRFunctions.functions();
~~~~~~~~~
functions/functions.ios.ts(6,9): error TS1005: ':' expected.
6 const functions = FIRFunctions.functions();
~
functions/functions.ios.ts(6,45): error TS1005: ',' expected.
8 return (data: I) => new Promise((resolve, reject) => {
~~
functions/functions.ios.ts(8,20): error TS1005: '{' expected.
8 return (data: I) => new Promise((resolve, reject) => {
~~~~~~~
functions/functions.ios.ts(8,27): error TS1005: ':' expected.
34 });
~
functions/functions.ios.ts(34,5): error TS1005: ',' expected.
50 getVisionOrientation(imageOrientation: UIImageOrientation): FIRVisionDetectorImageOrientation {
~~~~~~~~~~~~~~~~~~
mlkit/facedetection/index.ios.ts(50,42): error TS4073: Parameter 'imageOrientation' of public method from exported class has or is using private name 'UIImageOrientation'.
121 getVisionOrientation(imageOrientation: UIImageOrientation): FIRVisionDetectorImageOrientation {
~~~~~~~~~~~~~~~~~~
mlkit/mlkit-cameraview.ios.ts(121,42): error TS4073: Parameter 'imageOrientation' of public method from exported class has or is using private name 'UIImageOrientation'.
18 type ErrorFn<E = Error> = (error: E) => void;
~
platforms/web/typings/firebase-webapi.d.ts(18,18): error TS1005: ',' expected.
28 interface Observer<T, E = Error> {
~
platforms/web/typings/firebase-webapi.d.ts(28,27): error TS1005: ',' expected.
151 | 'ok'
~
platforms/web/typings/firebase-webapi.d.ts(151,7): error TS1110: Type expected.
232 | firebase.Observer<any>
~
platforms/web/typings/firebase-webapi.d.ts(232,13): error TS1110: Type expected.
239 | firebase.Observer<any>
~
platforms/web/typings/firebase-webapi.d.ts(239,13): error TS1110: Type expected.
487 | 'value'
~
platforms/web/typings/firebase-webapi.d.ts(487,7): error TS1110: Type expected.
2057 | 'cancelled'
~
platforms/web/typings/firebase-webapi.d.ts(2057,7): error TS1110: Type expected.
Thanks for those details. I'll 馃this weekend.
@EddyVerbruggen before you invest any time in this:
I fiddled around some more with a test project to reproduce the issue and very possibly the mistake is mine. I have a FirebaseProvider in which I define a reference to a collection for use in multiple methods (before firebase.init() is run) like below:
export class FirebaseProvider {
private userDataRef:firestore.CollectionReference = firestore.collection("users");
The app doesn't crash on this definition, but immediately after running firebase.init(). Like I wrote, with the previous Firestore Pods this used to work. If I move the definition to the methods themselves then it works fine. What do you think? Is this expected behavior or should I expect that future versions of the Firestore will 'tolerate' this?
Let me know if you want me to post the repo with the test project.
Thanks!
Hey @abhayastudios please post that repo. I'm happy to see your response because I tried to break the demo apps this evening and wasn't able to do so. Maybe with your repo I can find a way to harden against this type of usage.
@EddyVerbruggen here you go. It is about this line. If you can guard it and I can still use this kind of class variable it would be really useful in order to avoid all kinds of timing checks and/or repetitive declaration in each method that references the collection.
If you have another suggestion, I would be happy to hear.
So I've been thinking. I considered queueing the calls and execute them after init is called but since firebase.firestore.collection() immediately returns a collection reference I can't delay it. If it were Promise based that would work, but that would make using this function harder and break compatibility with the Web API.
So I'm going to add this to the function (and a bunch of other functions) instead:
if (!firebase.initialized) {
console.log("Please run firebase.init() before firebase.firestore.collection()");
return null;
}
I already have similar logic in a bunch of other functions, but not the Firestore stuff. It makes a lot of sense though, because - as you experienced - the app just crashes without any feedback on iOS.
Btw, the reason of the crash is: init needs to set some settings on the Firestore object (based on what you pass to init, like setting the persist flag), but that's not allowed after it has been already used (creating the doc/collection reference in this example).
Thanks @EddyVerbruggen, yes I think it would be good to guard it like this, so at least we know what is going on.
Ahhh good to know what the reason is for the crash (weird though that the Firestore code doesn't report anything!) So that means that, if I delay initialization of the FirebaseProvider until after firebase.init() then it should work...
Thanks again!
Yes, you could move it to the resolve of init() for instance.