Open phoenix377 opened 5 years ago
Hi, thanks for reporting the issue, were using react-native-image-crop-picker with no issues, could you perhaps create a basic app that reproduces the issue so that we can debug?
Hi @rmcfarlane82
I created demo app here - https://github.com/phoenix377/sample
And you can check how it is crashing through this video - https://www.dropbox.com/s/i22fzhmcoga258d/crash.mp4?dl=0
Please check it and let me know if it's enough for debug.
Thanks.
Brilliant We’ll have a look and see if we can solve the Issue issue-19-android-crash
Hi @rmcfarlane82 , may I ask if there is update on this issue? Thanks.
@phoenix377, just trying to find some tome to fully test, should be looking at getting a beta release with the fix over the weekend.
@phoenix377 Hi Could you test this version on npm 3.0.1-beta.0
@rmcfarlane82 Hi, the crash issue is fixed. Thanks.
But I've got another issue.
I'm logging in with Azure AD B2C, and SCOPES
is not defined in Azure dashboard.
If I don't specify SCOPES, it causes error, so I set SCOPES as ["email"]
.
Login was working before with version 1.0.20, but now I've got following error.
Error: Error Domain=MSALErrorDomain Code=-42500 "(null)" UserInfo={MSALErrorDescriptionKey=Authentication response received without expected accessToken}
Could you please check it?
Okay I'll see if i can help, what is the scope you are sending up in your request? in azure go to the application you've set up in b2c and if you have set up an App ID URI in the properties tab then you should have scopes available in the published scopes section
the scope you request has to have the full scope value, for example
"https://reactnativemsalplugin.onmicrosoft.com/react-native/user_impersonation"
also just for security, i know its only your test b2c but i would blur stuff like client id in any images, just in-case.
@rmcfarlane82 The Azure app is installed by our customer, and they don't need to setup App ID URI. So there is no scopes set.
But authClient.aquireTokenB2CAsync
cause error if I don't pass SCOPE parameter, so I pass scope as ["email"]
.
const AUTHORITY = "https://xxx.b2clogin.com/tfp/xxx.onmicrosoft.com";
const CLIENTID = "xxxx";
const SCOPES = ['email'];
const POLICIES = {
signUpSignInPolicy: 'B2C_1_SignUp',
passwordResetPolicy: 'B2C_1_edit_profile',
}
const authClient = new MsalPlugin(AUTHORITY, CLIENTID);
const result = await authClient.aquireTokenB2CAsync(SCOPES, POLICIES, { loginHint: email });
Btw, this code is working with version 1.0.2.
@rmcfarlane82 , is there any news for the above issue?
Yes no joy yet, need to spend a bit more time on it, at the moment if you do not specify a valid scope that B2C knows about, you will not get an access token only an I’d token, so I’m changing it to allow only requesting an Id token if no valid scope is provided.
On 29 Apr 2019, at 17:44, phoenix377 notifications@github.com wrote:
@rmcfarlane82 , is there any news for the above issue?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@rmcfarlane82 is this fix (the app crashing fix) still in beta or is it part of the most recent release?
Still in beta, I’ll release it soon, I’ve not been able to work on the project for a couple of weeks, hopefully I’ll get back on react native asap.
On 14 May 2019, at 21:53, Cleveland Thompson notifications@github.com wrote:
@rmcfarlane82 is this fix (the app crashing fix) still in beta or is it part of the most recent release?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I got the same issue, my app has google ans MS sign in, though signing in using google causes me this error. I believe some callback causing this.
09-18 11:24:43.061: E/AndroidRuntime(11211): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=9001, result=0, data=Intent { (has extras) }} to activity {com.idealily/com.idealily.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.microsoft.identity.client.PublicClientApplication.handleInteractiveRequestRedirect(int, int, android.content.Intent)' on a null object reference 09-18 11:24:43.061: E/AndroidRuntime(11211): at android.app.ActivityThread.deliverResults(ActivityThread.java:4360) 09-18 11:24:43.061: E/AndroidRuntime(11211): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4402) 09-18 11:24:43.061: E/AndroidRuntime(11211): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49) 09-18 11:24:43.061: E/AndroidRuntime(11211): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 09-18 11:24:43.061: E/AndroidRuntime(11211): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 09-18 11:24:43.061: E/AndroidRuntime(11211): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) 09-18 11:24:43.061: E/AndroidRuntime(11211): at android.os.Handler.dispatchMessage(Handler.java:106) 09-18 11:24:43.061: E/AndroidRuntime(11211): at android.os.Looper.loop(Looper.java:193) 09-18 11:24:43.061: E/AndroidRuntime(11211): at android.app.ActivityThread.main(ActivityThread.java:6669) 09-18 11:24:43.061: E/AndroidRuntime(11211): at java.lang.reflect.Method.invoke(Native Method) 09-18 11:24:43.061: E/AndroidRuntime(11211): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 09-18 11:24:43.061: E/AndroidRuntime(11211): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 09-18 11:24:43.061: E/AndroidRuntime(11211): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.microsoft.identity.client.PublicClientApplication.handleInteractiveRequestRedirect(int, int, android.content.Intent)' on a null object reference 09-18 11:24:43.061: E/AndroidRuntime(11211): at com.rmcfarlane.msalplugin.RNMsalPlugin.onActivityResult(RNMsalPlugin.java:46) 09-18 11:24:43.061: E/AndroidRuntime(11211): at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:262) 09-18 11:24:43.061: E/AndroidRuntime(11211): at com.facebook.react.ReactInstanceManager.onActivityResult(ReactInstanceManager.java:703) 09-18 11:24:43.061: E/AndroidRuntime(11211): at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:124) 09-18 11:24:43.061: E/AndroidRuntime(11211): at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:75) 09-18 11:24:43.061: E/AndroidRuntime(11211): at android.app.Activity.dispatchActivityResult(Activity.java:7454) 09-18 11:24:43.061: E/AndroidRuntime(11211): at android.app.ActivityThread.deliverResults(ActivityThread.java:4353) 09-18 11:24:43.061: E/AndroidRuntime(11211): ... 11 more
Hello, we use this plugin and react-native-image-picker (https://github.com/react-native-community/react-native-image-picker).
But when we call ImagePicker.launchImageLibrary function of react-native-image-picker, app crashes and there is mention of RNMsalPlugin in the crash log:
I also tried to use another image picker library, but still has similar crash report relating with react-native-msal library.