Closed bachras closed 5 years ago
Hey @bachras , can you simulate this using the provided demo apps in this repo? If not then it must be something specific for your case.
@PeterStaev thanks for prompt reply. I just tried demo-ng app on iOS simulator and I got a new error:
JavaScript error: file:///app/tns_modules/nativescript-image-swipe/image-swipe.js:231:52: JS ERROR TypeError: this.getSafeAreaInsets is not a function. (In 'this.getSafeAreaInsets()', 'this.getSafeAreaInsets' is undefined)
After updating to latest version, Android works but shows error :
JS: ERROR TypeError: Cannot read property 'getAdapter' of undefined
JS: ERROR CONTEXT {
JS: "view": {
JS: "def": {
JS: "nodeFlags": 16793601,
JS: "rootNodeFlags": 1,
JS: "nodeMatchedQueries": 0,
JS: "flags": 2,
JS: "nodes": [
JS: {
JS: "nodeIndex": 0,
JS: "parent": null,
JS: "renderParent": null,
JS: "bindingIndex": 0,
JS: "outputIndex": 0,
JS: "checkIndex": 0,
JS: "flags": 1,
JS: "childFlags": 16793601,
JS: "directChildFlags": 1,
JS: "childMatchedQueries": 0,
JS: "matchedQueries": {},
JS: "matchedQueryIds": 0,
JS: "references": {},
JS: "ngContentIndex": null,
JS: "childCount": 8,
JS: "bindings": [],
JS: "bindingFlags": 0,
JS: "outputs": [],
JS: "element": {
JS: "ns": "",
JS: "name": "StackLayout",
JS: "attrs": [
JS: [
JS: "",
JS: "class",
JS: "_mod_a11___"
JS: ]
JS: ],
JS: "template": null,
JS: "componentProvider": null,
JS: "componentView": nul...
I tried to reproduce the error on Playground(https://play.nativescript.org/?template=play-ng&id=4yGwoR&v=3) , but I got different error there:
[Galaxy S10+]: ERROR Error: Uncaught (in promise): TypeError: Could not load view for: ImageSwipe.Error: com.tns.NativeScriptException: Failed to find module: "nativescript-image-swipe/image-swipe", relative to: app/tns_modules/
[Galaxy S10+]: com.tns.Runtime.callJSMethodImpl(Runtime.java:1083)
[Galaxy S10+]: com.tns.Runtime.callJSMethod(Runtime.java:1070)
[Galaxy S10+]: com.tns.Runtime.callJSMethod(Runtime.java:1050)
[Galaxy S10+]: com.tns.Module.resolvePathHelper(Module.java:146)
[Galaxy S10+]: com.tns.Module.resolvePath(Module.java:55)
[Galaxy S10+]: com.tns.Runtime.callJSMethodNative(Native Method)
[Galaxy S10+]: com.tns.Runtime.callJSMethod(Runtime.java:1042)
[Galaxy S10+]: com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:20)
[Galaxy S10+]: com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1203)
[Galaxy S10+]: android.app.Activity.performCreate(Activity.java:7327)
[Galaxy S10+]: android.app.Activity.performCreate(Activity.java:7318)
[Galaxy S10+]: android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
[Galaxy S10+]: android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3087)
[Galaxy S10+]: android.app.ActivityThre...
Hey @bachras , the NG demo seems was forgot to be updated after the last plugin update. I will update it shortly.
As for your original error - I accidentally reproduced it on the demo app, and was happening because the initially selected image had an imageUrl
that was not working anymore. So make sure all your images are loadable and are valid.
No further response so closing this one for now. In case you still have problems, please provide more details.
This issue is not related to loadable and/or valid images. We're encountering this exact same issue with image url's that do work.
However, looking at the sourcecode and the line where it crashes, I don't see how we get that particular exception
Hi,
Thank you for great plugin. I am using NativeScript 5.3 and navitescript-image-swipe(4.1.0). I am receiving this error and after 10s or more image swipe appears. I am using physical device iPhone X (iOS 11.4), Android works fine.
I assume problem is with: https://github.com/PeterStaev/nativescript-image-swipe/blob/master/image-swipe.ios.ts#L310
Error:
Thanks