sitefinitysteve / nativescript-auth0

Nativescript Auth0 https://auth0.com/ social authentication plugin
Other
57 stars 25 forks source link

java.lang.ClassNotFoundException: Didn't find class "org.nativescript.auth0.RedirectActivity" #46

Closed oezer-sahin-ext closed 5 years ago

oezer-sahin-ext commented 5 years ago

Description

Hot module reload does not work with this plugin, because the compiled version misses one java class RedirectActivity. If I compile without the --hmr flag, RedirectActivity will be created in the Android Java output. My guess is, there is something wrong with the tns or webpack config.

Which platform(s) does your issue occur on?

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

  "dependencies": {
    "@angular/animations": "~6.1.0",
    "@angular/common": "~6.1.0",
    "@angular/compiler": "~6.1.0",
    "@angular/core": "~6.1.0",
    "@angular/forms": "~6.1.0",
    "@angular/http": "~6.1.0",
    "@angular/platform-browser": "~6.1.0",
    "@angular/platform-browser-dynamic": "~6.1.0",
    "@angular/router": "~6.1.0",
    "@ngx-translate/core": "^11.0.0",
    "nativescript-angular": "^6.2.0",
    "nativescript-auth0": "^2.1.0",
    "nativescript-localstorage": "^2.0.0",
    "nativescript-texttospeech": "^2.0.2",
    "nativescript-theme-core": "~1.0.4",
    "nativescript-ui-sidedrawer": "~4.3.0",
    "ngx-bootstrap": "^3.1.1",
    "reflect-metadata": "~0.1.10",
    "rxjs": "^6.0.0",
    "tns-core-modules": "^5.0.5",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~6.1.0",
    "@nativescript/schematics": "~0.3.0",
    "@ngtools/webpack": "~6.2.0",
    "codelyzer": "~4.3.0",
    "nativescript-dev-sass": "~1.6.0",
    "nativescript-dev-typescript": "~0.7.0",
    "nativescript-dev-webpack": "^0.17.0",
    "simpl-marengo-icons": "^2.6.0",
    "tslint": "~5.11.0",
    "typescript": "~2.7.2"
  }

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

  1. Install Webpack integration for HMR
  2. install nativescript-auth0
  3. tns run android --hmr
charsleysa commented 5 years ago

Hi @oezer-sahin-ext

Can you please try adding the following string to the appComponents variable in the webpack.config.js file: nativescript-auth0/android/provider/redirectActivity

adrianeguez commented 5 years ago

@oezer-sahin-ext This definitily solves the problem:

image

charsleysa commented 5 years ago

I've updated a doc with instructions about changes needed to the webpack.config.js file.