GithubHelp home page GithubHelp logo

nativescript-awesome-webview's Introduction

nativescript-awesome-webview

A WebView plugin for NativeScript {N} that uses Chrome Custom Tabs in Android and SFSafariViewController in iOS. It is awesome because now you can use the system's default browser, letting people maintain active logins across websites (instead of having to freshly login to sites in the scope of your app's webview). Which means the custom tabs (or safari view) loads really fast! Also you can set the color of the title bar and controls of the custom tab / safari view.

Prerequisites / Requirements

As of now, there aren't any prerequisites. This should work with any device, any OS.

Installation

For tns projects (Angular, Typescript, Javascript)

tns plugin add nativescript-awesome-webview

For vue-cli projects (Nativescript-Vue)

npm install nativescript-awesome-webview

Usage

Require

Javascript -

const {init, openWebView} = require('nativescript-awesome-webview');

Typescript -

import {init, openWebView} from 'nativescript-awesome-webview';

1. Initialise (optional, only Android)

init()

NOTE: This warms up the Chrome Custom Tab on Android For details check this

Calling init() does nothing on iOS. So if you're making for both OS, calling the function doesn't hurt in iOS.

2. Open an URL

    openWebView({
      url: 'http://google.com',
      toolbarColor: '#2277aa',
      toolbarControlsColor: '#eebb99'
    });

openWebView options

AwesomeWebviewOptions structure (the object you pass into openWebView)

Property Default Description
url required The URL to open
showTitle false Shows title bar in the webview
toolbarColor undefined Color of the toolbar
toolbarControlsColor undefined (only iOS) color of buttons on toolbar
isClosed undefined callback function that will be called when webview is closed

License

This is free, open source and do-whatever-you-want-ware. I really don't care. But if you need an official license -

Apache License Version 2.0, January 2004

nativescript-awesome-webview's People

Contributors

championswimmer avatar imandyie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nativescript-awesome-webview's Issues

Can't build on Android

Make sure to check the demo app(s) for sample usage

Yes, tried building that - failed.

Which platform(s) does your issue occur on?

I've only tried building on Android.

Description

Sorry to be annoying, but I had the exact same issue with nativescript-advanced-webview and wrote it up there. bradmartin/nativescript-advanced-webview#38

The error, using the demo for this project was a little different in that this project seems to want to use an earlier version of appcompat.

Here is the (I think) relevant error from the console:
`C:\Users\Chris Haff.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\056d9800ef08bb71e4f5d3d356616abb\res\values-v26\values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.

C:\Users\Chris Haff.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\056d9800ef08bb71e4f5d3d356616abb\res\values-v26\values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.

C:\Users\Chris Haff.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\056d9800ef08bb71e4f5d3d356616abb\res\values-v26\values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
`

utils.ios.getter() is deprecated; use the respective native property instead

Which platform(s) does your issue occur on?

  • iOS emulator
    Problem Description
    I run the function openWebView({
    url: this.targetUrl,
    toolbarColor: '#2277aa',
    toolbarControlsColor: '#eebb99'
    });
    inside the events' method @tap of the image - nativescript element. So, every time you click on the image, openWebView doesn't work and in console print the string
    "utils.ios.getter() is deprecated; use the respective native property instead"
    what's the problem?
    I await your reply
    Thanks

how to close webview after reached particular url

We are developing an app which requires us to use Custom Chrome Tab. For this, we have installed awesomewebview plugin for NativeScript. However, I am having trouble trying to automatically close the browser. At the moment, I have to close the browser manually.

"isClosed" callback not working on Android

Hey, the "isClosed" callback works perfectly on IOS but it doesn't seem to be working on android.

I'm building my App on angular. (see below for package JSON)

This is my function:

  openWebView({
          url: data,
          toolbarColor: this.env.toolbarColor,
          toolbarControlsColor: this.env.toolbarControlsColor,
          isClosed: (dat)a => {
            console.log(dat, 'closed');
          },
      });

Also when i've tried to call the "Init()" function on the main.ts and App component i receive this error:
`System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
System.err: File: (file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
System.err:
System.err: StackTrace:
System.err: init(file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
System.err: at ./app.module.ts(file: app/app.module.ts:49:4)
System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
System.err: at (file: app/main.ts:1:106)
System.err: at ./main.ts(file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2672:30)
System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
System.err: at checkDeferredModules(file: app/webpack/bootstrap:43:0)
System.err: at webpackJsonpCallback(file: app/webpack/bootstrap:30:0)
System.err: at (file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2:57)
System.err: at require(:1:266)
System.err:
System.err:
System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
System.err:
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
System.err: File: (file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
System.err:
System.err: StackTrace:
System.err: init(file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
System.err: at ./app.module.ts(file: app/app.module.ts:49:4)
System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
System.err: at (file: app/main.ts:1:106)
System.err: at ./main.ts(file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2672:30)
System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
System.err: at checkDeferredModules(file: app/webpack/bootstrap:43:0)
System.err: at webpackJsonpCallback(file: app/webpack/bootstrap:30:0)
System.err: at (file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2:57)
System.err: at require(:1:266)
System.err:
System.err:
System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6720)
System.err: at android.app.ActivityThread.access$1300(ActivityThread.java:237)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
System.err: at android.os.Looper.loop(Looper.java:223)
System.err: at android.app.ActivityThread.main(ActivityThread.java:7660)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
System.err: Caused by: com.tns.NativeScriptException: Error calling module function
System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
System.err: File: (file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
System.err:
System.err: StackTrace:
System.err: init(file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
System.err: at ./app.module.ts(file: app/app.module.ts:49:4)
System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
System.err: at (file: app/main.ts:1:106)
System.err: at ./main.ts(file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2672:30)
System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
System.err: at checkDeferredModules(file: app/webpack/bootstrap:43:0)
System.err: at webpackJsonpCallback(file: app/webpack/bootstrap:30:0)
System.err: at (file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2:57)
System.err: at require(:1:266)
System.err:
System.err:
System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
System.err: at com.tns.Runtime.runModule(Native Method)
System.err: at com.tns.Runtime.runModule(Runtime.java:689)
System.err: at com.tns.Runtime.run(Runtime.java:681)
System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6715)
System.err: ... 8 more
Successfully synced application com.endsleighwalletapp.EndsleighWalletApp on device 192.168.1.225:5555.
File change detected. Starting incremental webpack compilation...
Hash: 7ad56d00832cb573316e
Version: webpack 4.44.2
Time: 1066ms
Built at: 26/02/2021 14:46:29
Asset Size Chunks Chunk Names
bundle.js 1.09 MiB bundle [emitted] bundle

  • 5 hidden assets
    Entrypoint bundle = runtime.js vendor.js bundle.js
    [../$$_lazy_route_resource lazy recursive] ../$$_lazy_route_resource lazy namespace object 160 bytes {bundle} [built]
    [./app.module.ts] 5.53 KiB {bundle} [built]
    [./main.ts] 3.82 KiB {bundle} [built]
    • 1038 hidden modules
      Webpack compilation complete. Watching for file changes.
      Webpack build done!
      Successfully transferred bundle.js on device 192.168.1.225:5555.
      Restarting application on device 192.168.1.225:5555...
      System.err: An uncaught Exception occurred on "main" thread.
      System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
      System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
      System.err: File: (file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
      System.err:
      System.err: StackTrace:
      System.err: init(file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
      System.err: at ./app.module.ts(file: app/app.module.ts:49:4)
      System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
      System.err: at (file: app/main.ts:1:106)
      System.err: at ./main.ts(file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2662:30)
      System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
      System.err: at checkDeferredModules(file: app/webpack/bootstrap:43:0)
      System.err: at webpackJsonpCallback(file: app/webpack/bootstrap:30:0)
      System.err: at (file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2:57)
      System.err: at require(:1:266)
      System.err:
      System.err:
      System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
      System.err:
      System.err: StackTrace:
      System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
      System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
      System.err: File: (file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
      System.err:
      System.err: StackTrace:
      System.err: init(file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
      System.err: at ./app.module.ts(file: app/app.module.ts:49:4)
      System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
      System.err: at (file: app/main.ts:1:106)
      System.err: at ./main.ts(file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2662:30)
      System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
      System.err: at checkDeferredModules(file: app/webpack/bootstrap:43:0)
      System.err: at webpackJsonpCallback(file: app/webpack/bootstrap:30:0)
      System.err: at (file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2:57)
      System.err: at require(:1:266)
      System.err:
      System.err:
      System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
      System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6720)
      System.err: at android.app.ActivityThread.access$1300(ActivityThread.java:237)
      System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
      System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
      System.err: at android.os.Looper.loop(Looper.java:223)
      System.err: at android.app.ActivityThread.main(ActivityThread.java:7660)
      System.err: at java.lang.reflect.Method.invoke(Native Method)
      System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
      System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
      System.err: Caused by: com.tns.NativeScriptException: Error calling module function
      System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
      System.err: File: (file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
      System.err:
      System.err: StackTrace:
      System.err: init(file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0)
      System.err: at ./app.module.ts(file: app/app.module.ts:49:4)
      System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
      System.err: at (file: app/main.ts:1:106)
      System.err: at ./main.ts(file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2662:30)
      System.err: at webpack_require(file: app/webpack/bootstrap:74:0)
      System.err: at checkDeferredModules(file: app/webpack/bootstrap:43:0)
      System.err: at webpackJsonpCallback(file: app/webpack/bootstrap:30:0)
      System.err: at (file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2:57)
      System.err: at require(:1:266)
      System.err:
      System.err:
      System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
      System.err: at com.tns.Runtime.runModule(Native Method)
      System.err: at com.tns.Runtime.runModule(Runtime.java:689)
      System.err: at com.tns.Runtime.run(Runtime.java:681)
      System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
      System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
      System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6715)
      System.err: ... 8 more
      Successfully synced application com.endsleighwalletapp.EndsleighWalletApp on device 192.168.1.225:5555.`

My package JSON

}, "dependencies": { "@angular/animations": "~11.0.0", "@angular/common": "~11.0.0", "@angular/compiler": "~11.0.0", "@angular/core": "~11.0.0", "@angular/forms": "~11.0.0", "@angular/platform-browser": "~11.0.0", "@angular/platform-browser-dynamic": "~11.0.0", "@angular/router": "~11.0.0", "@nativescript/angular": "~11.0.1", "@nativescript/animated-circle": "^1.1.5", "@nativescript/appversion": "~2.0.0", "@nativescript/core": "~7.2.1", "@nativescript/directions": "^2.0.0", "@nativescript/email": "~2.0.0", "@nativescript/fingerprint-auth": "~7.0.0", "@nativescript/firebase": "^11.1.0", "@nativescript/secure-storage": "~3.0.0", "@nstudio/nativescript-cardview": "~2.0.1", "@nstudio/nativescript-https": "^3.0.1", "@nstudio/nativescript-pulltorefresh": "3.0.1", "@types/node": "^12.12.12", "html-encoder-decoder": "^1.3.8", "jwt-decode": "^2.2.0", "nativescript-awesome-webview-with-custom-menu-items": "^70.1.1", "nativescript-lottie": "^5.0.3", "nativescript-ngx-fonticon": "^7.0.0", "nativescript-rater": "^2.1.2", "nativescript-root-detection": "^1.0.0", "nativescript-taptic-engine": "^2.1.0", "nativescript-ui-gauge": "^7.0.2", "nativescript-ui-listview": "^9.1.0", "reflect-metadata": "~0.1.13", "rxjs": "^6.6.0", "rxjs-compat": "^6.5.3", "zone.js": "^0.9.1" }, "devDependencies": { "@angular/compiler-cli": "~11.0.0", "@nativescript/android": "7.0.1", "@nativescript/ios": "7.2.0", "@nativescript/types": "~7.2.0", "@nativescript/webpack": "~4.0.0", "@ngtools/webpack": "~11.0.0", "@typescript-eslint/eslint-plugin": "^4.6.0", "@typescript-eslint/parser": "^4.5.0", "codelyzer": "~5.2.0", "eslint": "^7.11.0", "eslint-config-airbnb-typescript": "^12.0.0", "eslint-config-prettier": "^6.13.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-nativescript": "0.0.0", "eslint-plugin-prettier": "^3.1.4", "husky": "^4.3.7", "lint-staged": "^10.5.3", "node-sass": "^4.13.1", "prettier": "^2.1.2", "sonarqube-scanner": "^2.8.0", "typescript": "~4.0.0", "webpack-obfuscator": "^0.27.2" }, "readme": "NativeScript Application", "main": "main.js" }

System.err: An uncaught Exception occurred on "main" thread. System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference System.err: File: (file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0) System.err: System.err: StackTrace: System.err: init(file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0) System.err: at ./app.module.ts(file: app/app.module.ts:49:4) System.err: at __webpack_require__(file: app/webpack/bootstrap:74:0) System.err: at (file: app/main.ts:1:106) System.err: at ./main.ts(file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2662:30) System.err: at __webpack_require__(file: app/webpack/bootstrap:74:0) System.err: at checkDeferredModules(file: app/webpack/bootstrap:43:0) System.err: at webpackJsonpCallback(file: app/webpack/bootstrap:30:0) System.err: at (file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2:57) System.err: at require(:1:266) System.err: System.err: System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference System.err: System.err: StackTrace: System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference System.err: File: (file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0) System.err: System.err: StackTrace: System.err: init(file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0) System.err: at ./app.module.ts(file: app/app.module.ts:49:4) System.err: at __webpack_require__(file: app/webpack/bootstrap:74:0) System.err: at (file: app/main.ts:1:106) System.err: at ./main.ts(file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2662:30) System.err: at __webpack_require__(file: app/webpack/bootstrap:74:0) System.err: at checkDeferredModules(file: app/webpack/bootstrap:43:0) System.err: at webpackJsonpCallback(file: app/webpack/bootstrap:30:0) System.err: at (file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2:57) System.err: at require(:1:266) System.err: System.err: System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6720) System.err: at android.app.ActivityThread.access$1300(ActivityThread.java:237) System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) System.err: at android.os.Handler.dispatchMessage(Handler.java:106) System.err: at android.os.Looper.loop(Looper.java:223) System.err: at android.app.ActivityThread.main(ActivityThread.java:7660) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) System.err: Caused by: com.tns.NativeScriptException: Error calling module function System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference System.err: File: (file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0) System.err: System.err: StackTrace: System.err: init(file: node_modules/nativescript-awesome-webview-with-custom-menu-items/awesome-webview.android.js:21:0) System.err: at ./app.module.ts(file: app/app.module.ts:49:4) System.err: at __webpack_require__(file: app/webpack/bootstrap:74:0) System.err: at (file: app/main.ts:1:106) System.err: at ./main.ts(file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2662:30) System.err: at __webpack_require__(file: app/webpack/bootstrap:74:0) System.err: at checkDeferredModules(file: app/webpack/bootstrap:43:0) System.err: at webpackJsonpCallback(file: app/webpack/bootstrap:30:0) System.err: at (file:///data/data/com.endsleighwalletapp.EndsleighWalletApp/files/app/bundle.js:2:57) System.err: at require(:1:266) System.err: System.err: System.err: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference System.err: at com.tns.Runtime.runModule(Native Method) System.err: at com.tns.Runtime.runModule(Runtime.java:689) System.err: at com.tns.Runtime.run(Runtime.java:681) System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21) System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192) System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6715) System.err: ... 8 more Successfully synced application com.endsleighwalletapp.EndsleighWalletApp on device 192.168.1.225:5555.

Thanks in advance!

Cannot read property 'extend' of undefined

Which platform(s) does your issue occur on?

Android

  • emulator

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

  • CLI: 6.0.3
  • Cross-platform modules: (check the 'version' attribute in the
    node_modules/tns-core-modules/package.json file in your project)
  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the package.json file of your project)
  • Plugin(s): (look for the version numbers in the package.json file of your
    project and paste your dependencies and devDependencies here)

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

Describe the steps to reproduce it.
On an image, the ontap attribute points to a function where i execute the awesome-webview code. I think it is coming from the com.android.support.customTabs native package, my compiler isnt very fond of using native libs, it always gives an undefined error.

Is there any code involved?

imported required modules
init(); openWebView({ url: 'http://google.com', toolbarColor: '#2277aa', toolbarControlsColor: '#eebb99' });
error
JS: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'extend' of undefined JS: TypeError: Cannot read property 'extend' of undefined JS: at init (file:///data/data/org.nativescript.AngularYt/files/app/vendor.js:91562:69) JS: at new VideoComponent file:///src\app\video\video.component.ts:32:8 JS: at createClass file:///node_modules\@angular\core\fesm5\core.js:19396:0 JS: at createDirectiveInstance file:///node_modules\@angular\core\fesm5\core.js:19271:0 JS: at createViewNodes file:///node_modules\@angular\core\fesm5\core.js:27489:0 JS: at createRootView file:///node_modules\@angular\core\fesm5\core.js:27403:0 JS: at callWithDebugContext file:///node_modules\@angular\core\fesm5\core.js:28411:0 JS: at Object.debugCreateRootView [as createRootView] file:///node_modules\@angular\core\fesm5\core.js:27921:0 JS: at ComponentFactory_.push...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.