-
Notifications
You must be signed in to change notification settings - Fork 35
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
"Uncaught TypeError: Cannot read property '_onNativeEvent' of undefined" #26
Comments
I'm having the same problem. |
i am having the same issue ... |
I solved it by cloning the demo and including the folder ‘www’ from the demo into my App, then modify the ‘www/index.js’ to my liking(am using leafletjs for my Map, so I get events from the map and to the map from {N}) hope it helps
From: Idrees Khan [mailto:[email protected]]
Sent: March 21, 2018 09:01 AM
To: shripalsoni04/nativescript-webview-interface <[email protected]>
Cc: devyaz <[email protected]>; Author <[email protected]>
Subject: Re: [shripalsoni04/nativescript-webview-interface] "Uncaught TypeError: Cannot read property '_onNativeEvent' of undefined" (#26)
i am having the same issue ...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#26 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ATfQSZ2th8aAYiw9qWy6cVwPBCrzLIDMks5tgfq6gaJpZM4Rsla0> . <https://github.com/notifications/beacon/ATfQSWm1_3pTaeaIR1aCGa4EnbF27MtIks5tgfq6gaJpZM4Rsla0.gif>
|
Hello. I have the same issue on iOS device. |
Nothing Work for me this error comes once |
hi, you need nativescript-webview-interface in your www folder or just clone it and use the www folder in your app or clone my repo Nativescript-Leaflet-Map as a working example you need a Mapbox Mapbox signup access token insert it into the index.html file |
@devyaz , does the HTML file needs to be available locally? |
yes it has, i didn't test hosted file, but i believe it should work
…On Tue, 2 Mar 2021 04:44 Eric Locop, ***@***.***> wrote:
@devyaz <https://github.com/devyaz> , does the HTML file needs to be
available locally?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE35ASLOVMBGZTMWOLMAMGDTBRGJ5ANCNFSM4ENSK22A>
.
|
@devyaz , BTW, the plugin does not work on iOS (no logs in the console at all) and on Android, passing data from webview to nativeapp works but not when passing data from nativeapp to webview and showing this error.
Note: I'm trying to load a hosted page and not a local file. |
Someone got news from that ? |
@ejlocop did you find the solution??? |
I did back then, but thanks to webpack it doesn't work any more, I've switched to Flutter now trying flutter_webview_plus but I can't get leaflet map to render with local assets, only hosted |
This was the way I solved it out |
It's a race condition problem. setTimeout(function () {
oWebViewInterface.emit("from-native", { data: "testing" });
}, 300); I'm using the latest {N} and android 12. |
i get this in console @shripalsoni04
chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property '_onNativeEvent' of undefined", source: (1)
heres my system info
$ tns info All NativeScript components versions information ┌──────────────────┬─────────────────┬────────────────┬─────────────┐ │ Component │ Current version │ Latest version │ Information │ │ nativescript │ 3.4.1 │ 3.4.1 │ Up to date │ │ tns-core-modules │ 3.4.0 │ 3.4.0 │ Up to date │ │ tns-android │ 3.4.1 │ 3.4.1 │ Up to date │ │ tns-ios │ 3.4.1 │ 3.4.1 │ Up to date │ └──────────────────┴─────────────────┴────────────────┴─────────────┘
am using vanilla JavascriptThe text was updated successfully, but these errors were encountered: