Skip to content

Error when running app from XCode after tns build ios #4721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
VladimirAmiorkov opened this issue Jun 14, 2019 · 2 comments
Closed

Error when running app from XCode after tns build ios #4721

VladimirAmiorkov opened this issue Jun 14, 2019 · 2 comments
Labels
bug build Describes issues related to build operations webpack

Comments

@VladimirAmiorkov
Copy link

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.2
  • iOS Runtime: 5.4.0

Describe the bug
After I prepare the project using tns build ios and opening Xcode to run the application to a device I get the following error:

2019-06-13 17:18:19.552275+0300 demo[297:22292] CONSOLE INFO file:///app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal.

CONSOLE INFO file:///app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal.
2019-06-13 17:18:19.592674+0300 demo[297:22292] ***** Fatal JavaScript exception - application has been terminated. *****
2019-06-13 17:18:19.592734+0300 demo[297:22292] Native stack trace:
2019-06-13 17:18:19.596031+0300 demo[297:22292] 1   0x104d533b0 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
1   0x104d533b0 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2019-06-13 17:18:19.596151+0300 demo[297:22292] 2   0x104d91a00 -[TNSRuntime executeModule:referredBy:]
2   0x104d91a00 -[TNSRuntime executeModule:referredBy:]
2019-06-13 17:18:19.596213+0300 demo[297:22292] 3   0x1044a45cc main
3   0x1044a45cc main
2019-06-13 17:18:19.596252+0300 demo[297:22292] 4   0x185bbc56c <redacted>
4   0x185bbc56c <redacted>
2019-06-13 17:18:19.596325+0300 demo[297:22292] JavaScript stack trace:
2019-06-13 17:18:19.596402+0300 demo[297:22292] 1   onError@file:///app/vendor.js:6660:24
2   getFile@file:///app/vendor.js:6022:32
3   getFile@file:///app/vendor.js:6662:42
4   @file:///app/vendor.js:114:67
5   getNextHash@file:///app/vendor.js:275:32
6   checkState@file:///app/vendor.js:289:23
7   exports@file:///app/vendor.js:114:18
8   @file:///app/bundle.js:3329:22
9   ./app.ts@file:///app/bundle.js:3351:34
10  __webpack_require__@file:///app/runtime.js:751:34
11  checkDeferredModules@file:///app/runtime.js:44:42
12  webpackJsonpCallback@file:///app/runtime.js:31:39
13  anonymous@file:///app/bundle.js:2:61
14  evaluate@[native code]
15  moduleEvaluation@[native code]
16  promiseReactionJob@[native code]
17  require@[native code]
18  anonymous@file:///app/starter.js:3:8
19  evaluate@[native code]
20  moduleEvaluation@[native code]
21  promiseReactionJob@[native code]
2019-06-13 17:18:19.596437+0300 demo[297:22292] JavaScript error:
2019-06-13 17:18:19.596506+0300 demo[297:22292] file:///app/vendor.js:6660:24: JS ERROR Error: Failed to create file at path '/var/containers/Bundle/Application/8760CA3B-BBFF-4877-9E41-2D0B3C0DD858/demo.app/app/1a3da59578e9df00a2cf.hot-update.json'

file:///app/vendor.js:6660:24: JS ERROR Error: Failed to create file at path '/var/containers/Bundle/Application/8760CA3B-BBFF-4877-9E41-2D0B3C0DD858/demo.app/app/1a3da59578e9df00a2cf.hot-update.json'
2019-06-13 17:18:19.597940+0300 demo[297:22292] *** JavaScript call stack:
(

)
2019-06-13 17:18:19.598086+0300 demo[297:22292] *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: Failed to create file at path '/var/containers/Bundle/Application/8760CA3B-BBFF-4877-9E41-2D0B3C0DD858/demo.app/app/1a3da59578e9df00a2cf.hot-update.json'
 at 
1   onError@file:///app/vendor.js:6660:24
2   getFile@file:///app/vendor.js:6022:32
3   getFile@file:///app/vendor.js:6662:42
4   @file:///app/vendor.js:114:67
5   getNextHash@file:///app/vendor.js:275:32
6   checkState@file:///app/vendor.js:289:23
7   exports@file:///app/vendor.js:114:18
8   @file:///app/bundle.js:3329:22
9   ./app.ts@file:///app/bundle.js:3351:34
10  __webpack_require__@file:///app/runtime.js:751:34
11  checkDeferredModules@file:///app/runtime.js:44:42
12  webpackJsonpCallback@file:///app/runtime.js:31:39
13  anonymous@file:///app/bundle.js:2:61
14  evaluate@[native code]
15  moduleEvaluation@[native code]
16  promiseReactionJob@[native code]
17  require@[native code]
18  anonymous@file:///app/starter.js:3:8
19  evaluate@[native code]
20  moduleEvaluation@[native code]
21  promiseReactionJob@[native code]
', reason: '(null)'
*** First throw call stack:
(0x1861d7164 0x185420528 0x104d537f4 0x104d91a00 0x1044a45cc 0x185bbc56c)
libc++abi.dylib: terminating with uncaught exception of type NSException

To Reproduce

Expected behavior
Adfter tns build ios I should be able to run the app via Xcode

Sample project

Additional context

@VladimirAmiorkov
Copy link
Author

VladimirAmiorkov commented Jun 14, 2019

Workaround:

  • Run the app via tns before opening Xcode using tns run ios --no-hmr. After that you can safely run the app via Xcode

@rosen-vladimirov rosen-vladimirov added bug build Describes issues related to build operations webpack labels Jun 17, 2019
@Fatme
Copy link
Contributor

Fatme commented Jul 25, 2019

@VladimirAmiorkov,

The main part of this issue is fixed and released with CLI 6.0.1 - #4846. Currently NativeScript CLI executes prepare, build and deploy commands without any hmr specific logic. However, the case when tns run ios command is executed and after that the .ipa is uploaded through Xcode on another device, is still not resoled. As this problem is in nativescript-dev-webpack repo, I'm closing this issue and opening an another there - NativeScript/nativescript-dev-webpack#1005

@Fatme Fatme closed this as completed Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build Describes issues related to build operations webpack
Projects
None yet
Development

No branches or pull requests

3 participants