nativescript-oauth2 icon indicating copy to clipboard operation
nativescript-oauth2 copied to clipboard

Angular Demo broken on Android after NS7 migration, BUGFIX included in bugreport

Open cjohn001 opened this issue 5 years ago • 1 comments

After the migration to NS7 the Angular demo does not run on android anymore. During startup I am getting the following error:

ERROR in ../src/tns-oauth-native-view-controller.ts:21:14 - error TS2339: Property 'browser' does not exist on type 'typeof androidx'.

21 ? androidx.browser.customtabs

Which platform(s) does your issue occur on?

  • Android emulator
  • device untested

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

✔ Getting NativeScript components versions information... ✔ Component nativescript has 7.0.8 version and is up to date. ✔ Component @nativescript/core has 7.0.3 version and is up to date. ✔ Component @nativescript/ios has 7.0.0 version and is up to date. ✔ Component @nativescript/android has 7.0.0 version and is up to date.

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

-git clone auth2 plugin

  • go to Angular Demo
  • ns run android --emulator --aot

Is there any code involved?

no code involved. Code base is from fresh clone of this repo.

Bugfix: In file tns-oauth-native-view-controller.android.tns replace line 13

const customtabs = useAndroidX() ? androidx.browser.customtabs : android.support.customtabs;

with: const customtabs = useAndroidX() ? global.androidx.browser.customtabs : android.support.customtabs;

cjohn001 avatar Sep 16 '20 12:09 cjohn001

I was just wondering if there is an estimate for the fix of @cjohn001?

I use the fix for the customtabs mentioned above and the fix from #135 successfully in my project. However it is not possible to use ci/cd for the project as I can't install that fix in a local repo on the buildderver.

JohanBeumer avatar Oct 02 '20 11:10 JohanBeumer