Comments (6)
@fw224 Was the Company Portal app installed on the device where this repros?
from azure-activedirectory-library-for-cordova.
Same issue here. On iOS it is working, on android the type cast exception occurs
The company portal app is indeed installed on the device
from azure-activedirectory-library-for-cordova.
+1
Any update on this bug? After uninstalled Company Portal it won't repro. Anyone knows the root cause?
from azure-activedirectory-library-for-cordova.
FYI @weijjia
I think issue here is that if the Company Portal is installed then the Android version of ADAL uses that to get tokens. The cordova version of ADAL depends on the Android version of ADAL. When Android ADAL talks the Company Portal a different object type that the Cordova version of ADAL isn't prepared to deal with causes a crash.
We've seen this issue in at least one other context as well and are working on a fix, but it may require an update to both Cordova ADAL and the Company Portal.
from azure-activedirectory-library-for-cordova.
@RandalliLama Sorry I just saw the issue. For the crash stack trace, I don't think it even starts to talk to company portal. It looks like the crash happens inside the readTokenCacheItems, which contains the authContext.getCache. In android version of ADAL, the getCache method will check if we can switch to broker, it seems in this particular case, the existence of Company Portal makes adal-android switch to broker, and we're retuning a new anonymous inner class implementing the interface ITokenCacheStore. When authContext.getCache returns, the cordova plugin is trying to cast it to the DefaultTokenCacheStore...oops, exception is thrown here. The returned anonymous inner class implementing the interface ITokenCacheStore cannot be casted to DefaultTokenCacheStore.
from azure-activedirectory-library-for-cordova.
Also seeing this issue on a WP8.1 device, but not the emulator. Packaging is Windows Universal app.
Exception was thrown at line 208, column 17 in ms-appx://com.microsoft.research.selfsourcing.mobile/www/plugins/cordova-plugin-ms-adal/src/windows/ADALProxy.js
0x80004002 - JavaScript runtime error: No such interface supported
System.InvalidCastException: Specified cast is not valid.
at System.StubHelpers.InterfaceMarshaler.ConvertToNative(Object objSrc, IntPtr itfMT, IntPtr classMT, Int32 flags)
WinRT information: System.InvalidCastException: Specified cast is not valid.
at System.StubHelpers.InterfaceMarshaler.ConvertToNative(Object objSrc, IntPtr itfMT, IntPtr classMT, Int32 flags)
The relevant line, as @RandalliLama and @weijjia suggest, is reading the token cache:
win(context.tokenCache.readItems().map(function(item) {
from azure-activedirectory-library-for-cordova.
Related Issues (20)
- Adal not working in windows UWP app (release mode)
- Microsoft CRM on-Premise log in HOT 1
- Unable to get logged in user mail ID
- Do anyone have alternative solution ? HOT 15
- Cannot read property 'constructor' of undefined HOT 1
- IOS12 App+The user is currently prompted for credentials as result of another acquireToken request. Please retry the acquireToken call later HOT 2
- (ADAL) integration with ionic getting “We are unable to issue tokens” , need to use v 2.0 HOT 1
- Back to my Android App. Ionic 4. Need help please. HOT 8
- requireCordovaModule should be changed to require
- iOS 13.2.3 ms adal not redirect on Microsoft sign in page HOT 1
- ms adal cordova plugin for ionic 4 not compatible with cordova 9.0 and ios 13.2 HOT 13
- msadal - acquireTokenSilentAsync doesn't works until "userId" is passed, even it is optional as per docs. HOT 5
- replace the UiWebView with the WkWebView HOT 1
- [iOS] [help Needed] [Objc] new ms-Adal HOT 8
- [IOS] Plugin not working with IOS 13 HOT 1
- iOS archive cordova-plugin-ms-adal-is-back capacitor HOT 4
- Not receiving role from the token response, as roles were declared from azure
- iOS archive cordova-plugin-ms-adal-is-back capacitor HOT 1
- Any capacitor alternative to this plugin?
- getting "ITMS-90809: Deprecated API Usage" error in ionic 3 ios app
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-activedirectory-library-for-cordova.