alexziskind1 / nativescript-oauth2

Other
85 stars 93 forks source link

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

Open cjohn001 opened 4 years ago

cjohn001 commented 4 years ago

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?

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

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;

JohanBeumer commented 4 years ago

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.