Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Crashes on IOS 13 #53

Open
JungMinHur opened this issue Dec 16, 2019 · 17 comments
Open

Crashes on IOS 13 #53

JungMinHur opened this issue Dec 16, 2019 · 17 comments
Assignees
Labels
bug Something isn't working

Comments

@JungMinHur
Copy link

JungMinHur commented Dec 16, 2019

Which platform(s) does your issue occur on?

  • iOS
  • 12 & 13 both
  • Iphone 6S

Please, provide the following version numbers that your issue occurs with:

  • CLI: 6.2.0
  • iOS: 11.3
  • nodejs: 10.16.3
  • tns-core-modules: 6.2.0
  • Runtime(s): 6.2.0
  • Plugin(s):
    dependencies
    "@nota/nativescript-webview-ext": "^6.2.1",
    "@nstudio/nativescript-cardview": "^1.0.0",
    "@vue/devtools": "^5.0.6",
    "animate": "^1.0.0",
    "axios": "^0.19.0",
    "moment-timezone": "^0.5.27",
    "nativescript-local-notifications": "^4.1.3",
    "nativescript-oauth2": "^2.2.2",
    "nativescript-plugin-firebase": "^10.2.0",
    "nativescript-socketio": "^3.2.1",
    "nativescript-theme-core": "^1.0.6",
    "nativescript-toasty": "^1.3.0",
    "nativescript-ui-sidedrawer": "^7.0.4",
    "nativescript-vue": "^2.4.0",
    "nativescript-vue-devtools": "^1.2.0",
    "nativescript-vue-multi-drawer": "0.0.2",
    "set-cookie-parser": "^2.4.0",
    "tns-core-modules": "^6.0.0",
    "vue-moment": "^4.0.0",
    "vuex": "^3.1.1"
    dev
    "@babel/core": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "babel-loader": "^8.0.2",
    "nativescript-dev-webpack": "^1.0.0",
    "nativescript-vue-template-compiler": "^2.0.0",
    "nativescript-worker-loader": "~0.9.0",
    "node-sass": "^4.9.2",
    "vue-loader": "^15.4.0"

Please, tell us how to recreate the issue in as much detail as possible.

Describe the steps to reproduce it.

Loading and firing functions like window.nsWebViewBridge.emit causes kill() returned unexpected error 1 in ios

Is there any code involved?

  • If possible provide an example project demonstrating the issue.
  • Provide a code example to recreate the problem
@JungMinHur JungMinHur changed the title crashes on IOS 13 Crashes on IOS 13 Dec 16, 2019
@m-abs
Copy link
Contributor

m-abs commented Dec 16, 2019

@ddfreiling Could you have a look at this?

@m-abs
Copy link
Contributor

m-abs commented Dec 20, 2019

Hi @JungMinHur,

Thank you for reporting this issue.

I don't have access to an iOS device at the moment (I'm on my x-mas vacation), so I can't reproduce it right now.

I noticed your dependency lists tns-core-module@^6.0.0 not 6.2.0, are you sure you're running the 6.2.0-version of NativeScript in the project?

NS 6.3.0 was just released, could you try updating and see, if the problem still exists?

@kdagithub
Copy link

Hi @m-abs ,
Thanks for this great plugin. It worked great until version tns-ios:6.2.0.

After the update to version tns-ios: 6.3.0 my app crashes at startup.
I think the error message: "kill() returned unexpected error 1" is related to a webkit bug.
Also see StackOverflow-Related-Issue.

Nevertheless, the update from tns-ios: 6.2.0 -> 6.3.0 results in the following error:

`CONSOLE WARN file:///node_modules@nativescript\core\application\application.js:312:0: Error: Error: Building UI from XML. @app-root.xml:5:1

Building UI from XML. @views/main/main-page.xml:33:17
Metadata for "NotaWebViewExt." found but symbol not available at runtime.
***** Fatal JavaScript exception - application has been terminated. *****`

I found some related issue here: NativeScript/ios-jsc#1061

It seems to be a problem with the EXTERNAL_SYMBOL_FILE (functions are missing at runtime because the linker by default strips any unused C++ symbols.)

Do you have any idea how this can be fixed?
If you need any further information, please do not hesitate to ask.

My project settings are:
{ "nativescript": { "tns-ios": { "version": "6.3.0" }, "tns-android": { "version": "6.3.1" } }, "dependencies": { "@nota/nativescript-webview-ext": "^6.2.1", "nativescript-directions": "^1.3.1", "nativescript-email": "^1.5.5", "nativescript-iqkeyboardmanager": "^1.5.1", "nativescript-phone": "^1.4.1", "nativescript-secure-storage": "^2.6.0", "nativescript-theme-core": "~1.0.6", "nativescript-ui-listview": "^8.0.1", "tns-core-modules": "^6.3.2" },

Tested on an iPhone6S with iOS: 13.3

@m-abs m-abs self-assigned this Jan 9, 2020
@m-abs m-abs added the bug Something isn't working label Jan 9, 2020
@m-abs
Copy link
Contributor

m-abs commented Jan 10, 2020

@JungMinHur

kill() returned unexpected error 1

We can reproduce this error/warning, but it doesn't seem to break our own app.

@kdagithub

We can't reproduce that error on our systems.

It might be caused by an older version of xcode, do you have the latest version installed?

@kdagithub
Copy link

@m-abs
Currently i am using the cloud build service along with NativeScript-Sidekick.
I prepared a sample project to reproduce the error.
webviewtest.zip

with tns-ios: 6.2.0 no error occurs at startup
with tns-ios: 6.3.0 the app crashes:
crash_tns-ios_6_3_0.txt

Is it possible that the error only occurs when the project is a JavaScript NativeScript-Core Application?

If the error is not reproducible on your side with a local build i would file a bug report for the NativeScript-Sidekick Team (https://github.com/NativeScript/sidekick-feedback)

Thank you very much for your help.

@m-abs
Copy link
Contributor

m-abs commented Jan 14, 2020

I think it is caused by the way we bundle the native-classes.
We've never tested it with sidekick builds.

We're working on switching to XCFramework for the iOS classes, in the hope that it solves the problem.

@m-abs
Copy link
Contributor

m-abs commented Jan 15, 2020

@kdagithub
Could you try 6.3.0-alpha.0?

We've gone back to pre-building the iOS natives, it will lock on XCode version but should work better.
XCFramework support is broken in nativescript.

@kdagithub
Copy link

@m-abs
I tested Version 6.3.0-alpha.0 on tns-ios: 6.3.0 but the App-crash is still present.
Error: ReferenceError: Metadata for "NotaWebViewExt." found but symbol not available at runtime.

Using Version 6.3.0-alpha.0 with tns-ios: 6.2.0 works.

Do you think that this is related to the WebKit 13.2 (NativeScript/ios-jsc#1220) update in tns-ios: 6.3.0?

@m-abs
Copy link
Contributor

m-abs commented Jan 20, 2020

@kdagithub
I doubt it. We don't have the same issue when we build locally.

@m-abs
Copy link
Contributor

m-abs commented Jan 29, 2020

@kdagithub could you try the latest alpha? 6.3.0-alpha.1

@kdagithub
Copy link

@m-abs Still the same error using the cloud-build:
Metadata for "NotaWebViewExt." found but symbol not available at runtime.

Configuration:
"nativescript": { "tns-ios": { "version": "6.3.0" }, "tns-android": { "version": "6.3.1" } }, "dependencies": { "@nota/nativescript-webview-ext": "^6.3.0-alpha.1", "nativescript-directions": "^1.3.1", "nativescript-email": "^1.5.5", "nativescript-iqkeyboardmanager": "^1.5.1", "nativescript-phone": "^1.4.1", "nativescript-secure-storage": "^2.6.0", "nativescript-theme-core": "~1.0.6", "nativescript-ui-listview": "^7.1.0", "tns-core-modules": "~6.3.0" }

@ricky-bos
Copy link

I am using ios version 13.3 and nativescript-vue, but on ios the is not showing up. Working finde on android.

@NathanaelA
Copy link

@m-abs - Metadata for "NotaWebViewExt." found but symbol not available at runtime. that error would in my experience only occur in release versions.

The easiest way to fix it is typically in create a build.xcconfig in your <plugin>/platform/ios folder and add to it:

OTHER_LDFLAGS = $(inherited) -Wl,-exported_symbol,NotaWebViewExt

@simityx
Copy link

simityx commented Apr 26, 2020

@m-abs - Metadata for "NotaWebViewExt." found but symbol not available at runtime. that error would in my experience only occur in release versions.

The easiest way to fix it is typically in create a build.xcconfig in your <plugin>/platform/ios folder and add to it:

OTHER_LDFLAGS = $(inherited) -Wl,-exported_symbol,NotaWebViewExt

Hi, I try your way to put build.xcconfig in nativescript-webview-ext⁩/⁨platforms⁩/⁨ios⁩/, but it come out an error when I build the app with command tns build ios --bundle --release. My tns-ios version is 6.5.0 and
nativescript-webview-ext version is 6.5.2.

Undefined symbols for architecture x86_64:
  "NotaWebViewExt", referenced from:
     -exported_symbol[s_list] command line option
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Planning build
note: Constructing build description

@m-abs
Copy link
Contributor

m-abs commented May 4, 2020

Hi @NathanaelA,

Thank you for your suggestion.

Unfortunately I get the same error as @simitdev5

NotaWebViewExt is bundled with the plugin as a XCFramework, if that makes any difference.

@NathanaelA
Copy link

@m-abs - Not sure, I haven't really played with XCFramework's so it is possible that the exported symbol command doesn't work as expected with them. I just know in the past that particular command solves release runtime building with that error message.

@m-abs
Copy link
Contributor

m-abs commented Nov 19, 2020

Is this still an issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants