Skip to content

readStream crash in iOS with new architecture enabled #428

@basilkurianmb

Description

@basilkurianmb

While migrating react native to latest version 0.80.1

Enabled the new architecture

And using the latest react-native-blob-util version 0.22.0.

readStream method is crashing in iOS device(Android it is working).

Below mentioned is the crash logs.

terminating due to uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
CoreSimulator 1010.15 - Device: iPhone 16 Pro Max (F1C10B56-90F1-44F7-84B6-B45F43F77B5F) - Runtime: iOS 18.5 (22F77) - DeviceType: iPhone 16 Pro Max

On further issue evaluation it is found that the streamId is coming as null in ReactNativeBlobUtilFS.mm -> readStream method. But, the streamId is getting generated in ReactNativeBlobUtilReadStream.js file.

Seems like after the streamId is generated and passed to native layer, the streamId is getting missed at iOS native layer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions