nativescript-community / ui-canvas

Implement Canvas into your NativeScript apps.
https://nativescript-community.github.io/ui-canvas/
Apache License 2.0
31 stars 9 forks source link

Android: TypeError: Cannot read property 'Symbol(Symbol.toStringTag)' of undefined #27

Closed dukewan closed 3 years ago

dukewan commented 3 years ago

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

Done.

Make sure to check the existing issues in this repository

Done.

If the demo apps cannot help and there is no issue for your problem, tell us about it

Please, ensure your title is less than 63 characters long and starts with a capital letter.

Which platform(s) does your issue occur on?

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

  "dependencies": {
      "@nativescript/theme": "^2.2.1",
      "@nstudio/nativescript-camera-plus": "^3.1.1",
      "@nstudio/nativescript-cardview": "^1.0.0",
      "@nstudio/nativescript-checkbox": "^1.0.0",
      "@nstudio/nativescript-loading-indicator": "^3.0.4",
      "@proplugins/nativescript-orientation": "2.4.2",
      "@proplugins/nativescript-purchase": "^6.0.0",
      "@vue/devtools": "^5.3.3",
      "axios": "^0.19.2",
      "bson-objectid": "^1.3.1",
      "crypto-js": "^4.0.0",
      "handlebars": "^4.7.6",
      "lodash": "^4.17.15",
      "marked": "^1.2.2",
      "md5": "^2.3.0",
      "moment": "^2.27.0",
      "nativescript-akylas-fonticon": "^2.0.7",
      "nativescript-apple-sign-in-knotes": "^1.1.1",
      "nativescript-background-http": "^4.2.1",
      "nativescript-camera": "^4.5.0",
      "nativescript-canvas": "^3.0.10",
      "nativescript-clipboard": "^1.2.0",
      "nativescript-cscreenshot": "^1.0.2",
      "nativescript-generate-pdf": "^1.0.0",
      "nativescript-image": "^3.0.12",
      "nativescript-imagepicker-knotes": "^7.1.0",
      "nativescript-inappbrowser": "^2.3.0",
      "nativescript-iqkeyboardmanager": "^1.5.1",
      "nativescript-keyboard-toolbar": "^1.1.0",
      "nativescript-local-notifications": "^4.2.1",
      "nativescript-plugin-firebase": "^10.5.2",
      "nativescript-share-file-knotes": "^1.0.11",
      "nativescript-social-share-knotes": "^1.7.0",
      "nativescript-socketio": "^3.3.1",
      "nativescript-sqlite": "^2.6.3",
      "nativescript-taptic-engine": "^2.1.0",
      "nativescript-toasty": "^3.0.0-alpha.2",
      "nativescript-ui-listview": "^8.2.0",
      "nativescript-vue": "~2.4.0",
      "nativescript-vue-devtools": "^1.4.0",
      "nativescript-vue-shadow": "^0.1.0",
      "nativescript-wechat-login-knotes": "^1.0.8",
      "nativescript-windowed-modal": "^6.2.1",
      "tns-core-modules": "^6.5.8",
      "typescript": "^4.1.3",
      "vuex": "^3.4.0",
      "vuex-i18n": "^1.13.1"
  },
  "devDependencies": {
      "@babel/core": "~7.1.0",
      "@babel/preset-env": "~7.1.0",
      "babel-loader": "~8.0.0",
      "eslint": "^6.8.0",
      "eslint-config-airbnb-base": "^14.2.0",
      "eslint-plugin-html": "^6.0.2",
      "eslint-plugin-import": "^2.21.2",
      "eslint-plugin-vue": "^6.2.2",
      "handlebars-loader": "^1.7.1",
      "nativescript-dev-webpack": "~1.5.1",
      "nativescript-vue-template-compiler": "~2.4.0",
      "node-sass": "^4.14.1",
      "tns-android": "6.5.3",
      "tns-ios": "6.5.3",
      "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.

I'm using nativescript-canvas@3.0.10 with NS6, we can't migrate to NS7 yet as some plugins we use do not support NS7 so far.

The error TypeError: Cannot read property 'Symbol(Symbol.toStringTag)' of undefined arises whenever I use CanvasView on android device.

More details: 8831609120445_ pic_hd

Is there any code involved?

I use nativescript-vue:

import CanvasPlugin from 'nativescript-canvas/vue'
Vue.use(CanvasPlugin)

Basically when CanvasView is used the error arises so it errors out when initializing.

<CanvasView
  id="canvasTarget"
  @draw="canvasTargetReady"
  left="0" top="0" width="100%" height="100%" />
<CanvasView
  id="canvas"
  @draw="canvasReady" @touch="onCanvasTouch"
  left="0" top="0" width="100%" height="100%"
  />
farfromrefug commented 3 years ago

@dukewan you are trying to use a N7 plugin with N6. Sorry but this is not possible. Either upgrade to N 7 or switch to using nativescript-canvas(though i dont maintain the 6.x version anymore)

dukewan commented 3 years ago

The issue still exists after migrated to NS7 and using the latest version of ui-canvas.