Skip to content

iOS Crash on 5.4 - Podfile #1153

@tsonevn

Description

@tsonevn

@gonniegijsen commented on Fri Jun 07 2019

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.4.0
  • Cross-platform modules: 5.4.1
  • Android Runtime: 5.4.0
  • iOS Runtime: 5.4.1
  • Plugin(s): None

Describe the bug

The application is crashing on a real device on iOS (iPhone 7; iOS: 12.2) after including this podfile:

platform :ios, '10.0'
pod 'EstimoteProximitySDK'

Crash I am getting:

Unzipping LiveSync folder. This could take a while...
Unzipped 51 entries in 65.775990ms.
tns_modules folder not livesynced. Using tns_modules from the already deployed bundle...
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1   0x104c8385c NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2   0x104cc2448 -[TNSRuntime executeModule:referredBy:]
3   0x1046705bc
4   0x1ac6a68e0 <redacted>
JavaScript stack trace:
1   stringWithString@file:///app/vendor.js:36015:49
2   @file:///app/vendor.js:36015:49
3   ../node_modules/tns-core-modules/utils/utils.js@file:///app/vendor.js:36064:3
4   __webpack_require__@file:///app/runtime.js:751:34
5   fn@file:///app/runtime.js:121:39
6   ../node_modules/tns-core-modules/file-system/file-system-access.js@file:///app/vendor.js:5348:34
7   __webpack_require__@file:///app/runtime.js:751:34
8   fn@file:///app/runtime.js:121:39
9   ../node_modules/tns-core-modules/file-system/file-system.js@file:///app/vendor.js:5686:47
10  __webpack_require__@file:///app/runtime.js:751:34
11  fn@file:///app/runtime.js:121:39
12  ../node_modules/tns-core-modules/utils/debug.js@file:///app/vendor.js:35496:40
13  __webpack_require__@file:///app/runtime.js:751:34
14  fn@file:///app/runtime.js:121:39
15  @file:///app/vendor.js:13156:34
16  ../node_modules/tns-core-modules/ui/builder/builder.js@file:///app/vendor.js:13767:34
17  __webpack_require__@file:///app/runtime.js:751:34
18  fn@file:///app/runt<\M-b\M^@\M-&>
JavaScript error:
file:///app/vendor.js:36015:49: JS ERROR Error: *** -[NSPlaceholderString initWithString:]: nil argument
*** JavaScript call stack:
(
)
*** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: *** -[NSPlaceholderString initWithString:]: nil argument
at
1   stringWithString@file:///app/vendor.js:36015:49
2   @file:///app/vendor.js:36015:49
3   ../node_modules/tns-core-modules/utils/utils.js@file:///app/vendor.js:36064:3
4   __webpack_require__@file:///app/runtime.js:751:34
5   fn@file:///app/runtime.js:121:39
6   ../node_modules/tns-core-modules/file-system/file-system-access.js@file:///app/vendor.js:5348:34
7   __webpack_require__@file:///app/runtime.js:751:34
8   fn@file:///app/runtime.js:121:39
9   ../node_modules/tns-core-modules/file-system/file-system.js@file:///app/vendor.js:5686:47
10  __webpack_require__@file:///app/runtime.js:751:34
11  fn@file:///app/runtime.js:121:39
12  ../node_modules/tns-core-modules/utils/debug.js@file:///app/vendor.js:35496:40
13  __webpack_require__@file:///app/runtime.js:751:34
14  fn@file:///app/runtime.js:121:39
15  @file:///app/vendor.js:13156:34
16  ../node<\M-b\M^@\M-&>
Successfully synced application org.nativescript.testestimote on device

This crash happens when the app is launching and wasn't doing so on Nativescript 5.3.1

To Reproduce
Create a new project with typescript or angular.
Add Podfile

platform :ios, '10.0'
pod 'EstimoteProximitySDK'

Enable ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES

Run the app on a real device

tns run ios

Expected behavior
No crash

Sample project

Additional context

  • This issue was not happening before 5.4.0
  • It doesn't crash on the simulator with the same specs; Only on real device

@tsonevn commented on Fri Jun 07 2019

Hi @gonniegijsen,
Can you send us the project, that you are using for testing and demonstrates, how you are calling the native API from the JavaScript?


@gonniegijsen commented on Fri Jun 07 2019

I can reproduce it with by creating a new project, adding the pod file and not writing any code :/


@gonniegijsen commented on Fri Jun 07 2019

test-ios-crash.zip


@tsonevn commented on Fri Jun 07 2019

Hi @gonniegijsen,
We were able to recreate the issue on our side and I will mark it as a bug. We will research it further, why this problem appears only on a device.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions