Parse-Swift icon indicating copy to clipboard operation
Parse-Swift copied to clipboard

Crash in `API.getHeaders(options:) `

Open pktealshift opened this issue 1 year ago • 1 comments
trafficstars

New Issue Checklist

Issue Description

A crash seems to occur when calling a particular cloud function but I don't know what's special about it.

Steps to reproduce

I'm not sure how to reproduce, but I'm getting frequent crash reports from users, and the crashing thread follows an attempt to call a cloud function that returns a ParseObject.

Actual Outcome

Crash.

Expected Outcome

No crash.

Environment

WatchOS 10.5

Client

  • Parse Swift SDK version: 4.14.2
  • Xcode version: 15.4
  • Operating system (iOS, macOS, watchOS, etc.): WatchOS
  • Operating system version: 10.5

Server

  • Parse Server version: 4.10.4
  • Operating system: n/a
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Back4App

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 3.6
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): MondoDB

Logs

OS Version:          Watch OS 10.5 (21T576)
Release Type:        User
Report Version:      104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000004363c38
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [2744]

Triggered by Thread:  3

Thread 3 Crashed:
0   WATCH_Lionheart               	0x0000000004363c38 Swift runtime failure: Unexpectedly found nil while implicitly unwrapping an Optional value + 0 (API.swift:0)
1   WATCH_Lionheart               	0x0000000004363c38 specialized static API.getHeaders(options:) + 1856 (API.swift:0)
2   WATCH_Lionheart               	0x00000000043520d0 static API.getHeaders(options:) + 8 (<compiler-generated>:0)
3   WATCH_Lionheart               	0x00000000043520d0 API.Command.prepareURLRequest(options:batching:childObjects:childFiles:) + 980
4   WATCH_Lionheart               	0x0000000004350afc API.Command.executeAsync(options:batching:callbackQueue:notificationQueue:childObjects:childFiles:uploadProgress:downloadProgress:completion:) + 928 (API+Command.swift:139)
5   WATCH_Lionheart               	0x000000000447ec3c ParseCloudable.runFunction(options:callbackQueue:completion:) + 280 (ParseCloudable.swift:60)
6   WATCH_Lionheart               	0x000000000447e554 closure #1 in ParseCloudable.runFunction(options:) + 120
7   WATCH_Lionheart               	0x000000000447e2f4 partial apply for closure #1 in ParseCloudable.runFunction(options:) + 36 (<compiler-generated>:0)
8   libswift_Concurrency.dylib    	0x00000000298cc75c closure #1 in withCheckedThrowingContinuation<A>(function:_:) + 96 (CheckedContinuation.swift:332)
9   libswift_Concurrency.dylib    	0x00000000298cc7bc withUnsafeThrowingContinuation<A>(_:) + 68 (PartialAsyncTask.swift:651)
10  libswift_Concurrency.dylib    	0x00000000298cc6b9 withCheckedThrowingContinuation<A>(function:_:) + 1 (CheckedContinuation.swift:331)
11  WATCH_Lionheart               	0x000000000447e295 ParseCloudable.runFunction(options:) + 1 (ParseCloudable+async.swift:23)

pktealshift avatar Jun 05 '24 18:06 pktealshift