Skip to content

SWIFT TASK CONTINUATION MISUSE-- SDK LIB Crashing Rest Api Return Null Pointer Exception #3952

@nzsrini

Description

@nzsrini

Device :iPhone [11]
OS:IOS 18.6.2
SDK: 13.0.2 / 13.1.0 (seen in version 13.1.0)
App : Native

Looks the SDK SFRestAPI is failing and crashing the Rest API get Null Pointer Exception. Yes we understand it is rest api issue. But SDK should gracefully handle instead crashing.

2 in closure #1 in SFRestAPI.send(request:) (RestClient.swift:156)
SWIFT TASK CONTINUATION MISUSE: send(request:) leaked its continuation without resuming it. This may cause tasks waiting on it to remain suspended forever. SWIFT TASK CONTINUATION MISUSE: send(request:) leaked its continuation without resuming it. This may cause tasks waiting on it to remain suspended forever. SWIFT TASK CONTINUATION MISUSE: send(request:) leaked its continuation without resuming it. This may cause tasks waiting on it to remain suspended forever. SWIFT TASK CONTINUATION MISUSE: send(reques
git/Pods/SalesforceSDKCore/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/Extensions

libswiftCore.dylib: SWIFT TASK CONTINUATION MISUSE: send(request:) leaked its continuation without resuming it. This may cause tasks waiting on it to remain suspended forever.
SWIFT TASK CONTINUATION MISUSE: send(request:) leaked its continuation without resuming it. This may cause tasks waiting on it to remain suspended forever.
SWIFT TASK CONTINUATION MISUSE: send(request:) leaked its continuation without resuming it. This may cause tasks waiting on it to remain suspended forever.
SWIFT TASK CONTINUATION MISUSE: send(request:) leaked its continuation without resuming it. This may cause tasks waiting on it to remain suspended forever.
SWIFT TASK CONTINUATION MISUSE: send(request:) leaked its continuation without resuming it. This may cause tasks waiting on it to remain suspended forever.
_Concurrency/CheckedContinuation.swift:196: Fatal error: SWIFT TASK CONTINUATION MISUSE: send(request:) tried to resume its continuation more than once, throwing apiFailed(response: Optional(<OS_dispatch_data: data[0x15fa86520] = { composite, size = 252, num_records = 1 record[0] = { from = 281, length = 252, data_object = 0x15ffc0540 }, }>), underlyingError: Error Domain=com.salesforce.RestAPI.ErrorDomain Code=400 "(null)" UserInfo={errorMessage=Attempt to de-reference a null object:111:Class.A.getPrice: line 111, column 1
Class.A.getPrice:: line 55, column 1
Class.A.getPrice:: line 53, column 1}, urlResponse: Optional(<NSHTTPURLResponse: 0x160011300> { URL: https://xxx.xxx.com/app/services/apexrest/SP?dailyDate=2025-11-17 } { Status Code: 400, Headers {
"Cache-Control" = (
"no-cache,must-revalidate,max-age=0,no-store,private"
);
"Content-Type" = (
"application/json"
);
Date = (
"Sun, 16 Nov 2025 16:45:34 GMT"
);
Server = (
sfdcedge
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions