Skip to content
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

Warning: topmost() is deprecated. Use Frame.topmost() instead. #114

Open
sarboleda22 opened this issue Apr 10, 2020 · 2 comments
Open

Warning: topmost() is deprecated. Use Frame.topmost() instead. #114

sarboleda22 opened this issue Apr 10, 2020 · 2 comments

Comments

@sarboleda22
Copy link

Version numbers:

  • CLI: 6.5.0
  • Cross-platform modules: 6.5.1
  • Runtime(s):
"tns-android": {
      "version": "6.0.0"
    },
    "tns-ios": {
      "version": "6.0.1"
    }
  • Plugin(s):
  "dependencies": {
    "nativescript-vue": "^2.5.1",
    "@nativescript/theme": "^2.2.1",
    "nativescript-oauth2": "^2.4.0",
    "tns-core-modules": "^6.0.0",
    "electron": "^8.2.1",
    "email-validator": "^2.0.4",
    "vue-class-component": "^7.2.3",
    "vue-property-decorator": "^8.4.1"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "@types/node": "^12.12.16",
    "@typescript-eslint/eslint-plugin": "^2.26.0",
    "@typescript-eslint/parser": "^2.26.0",
    "@vue/cli-plugin-eslint": "^4.2.3",
    "@vue/eslint-config-airbnb": "^5.0.2",
    "@vue/eslint-config-standard": "^5.1.0",
    "babel-loader": "^8.0.2",
    "eslint": "^6.8.0",
    "eslint-config-airbnb-base": "^14.1.0",
    "eslint-config-standard": "^14.1.1",
    "eslint-plugin-import": "^2.20.2",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^4.2.1",
    "eslint-plugin-standard": "^4.0.1",
    "eslint-plugin-vue": "^7.0.0-alpha.0",
    "lint-staged": "^9.5.0",
    "nativescript-dev-webpack": "^1.0.0",
    "nativescript-vue-template-compiler": "^2.5.0",
    "nativescript-worker-loader": "~0.9.0",
    "node-sass": "^4.9.2",
    "prettier": "^2.0.2",
    "tns-platform-declarations": "^6.0.0",
    "tslint": "^6.1.1",
    "typescript": "^3.8.3",
    "vue": "^2.5.22",
    "vue-loader": "^15.4.0"
  }

Steps to reproduce it.

Follow any tutorial with ^6.5.0 versions of {N}.
Run:

client = new TnsOAuthClient(providerType, true)
client.loginWithCompletion((tokenResult: ITnsOAuthTokenResult, error) => {
    if (error) {
        console.log(error)
    } else {
        console.log(tokenResult)
    }
})

You get in console:
topmost() is deprecated. Use Frame.topmost() instead.

Solution

In both loginWithCompletion and logoutWithCompletion in oauth.ts, change:

frameModule.topmost()

For:

frameModule.Frame.topmost()
@emog
Copy link

emog commented May 17, 2020

It's the same here. I get an "topmost() is deprecated. Use Frame.topmost() instead."

@Przemase
Copy link

This fix works ok

This was referenced Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants