Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No static field msalApp #4

Open
michaelmairegger opened this issue Nov 27, 2019 · 8 comments
Open

No static field msalApp #4

michaelmairegger opened this issue Nov 27, 2019 · 8 comments

Comments

@michaelmairegger
Copy link
Contributor

I do not know what I am doing wrong. I followed the readme file but I get the following exception

E/flutter (19355): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.NoSuchFieldError: No static field msalApp of type Lcom/microsoft/identity/client/IMultipleAccountPublicClientApplication; in class Luk/co/moodio/msal_flutter/MsalFlutterPlugin$Companion; or its superclasses (declaration of 'uk.co.moodio.msal_flutter.MsalFlutterPlugin$Companion' appears in /data/app/com.example.flutter_app1-swehphgquUI3YKtyjLgW9A==/base.apk!classes3.dex)

@mswehli
Copy link
Member

mswehli commented Nov 27, 2019

Hmm, did you call the initialize function in the dart code before acquiring the token? That should throw a platform error but maybe I missed something.

@mswehli
Copy link
Member

mswehli commented Nov 27, 2019

Also, in your msal configuration file can you confirm if youve changed any of the properties? Specifically if you've change the account type to single?

@michaelmairegger
Copy link
Contributor Author

@mswehli I have copied your example folder to a new folder. There it works. I will now find the diffs to my project.

I can confirm that I have changed the redirect uri only.

@mswehli
Copy link
Member

mswehli commented Nov 27, 2019

@michaelmairegger oh ok. Please let me know if you figure out what went wrong. I'll make sure to update the readme or to fix it.

@michaelmairegger
Copy link
Contributor Author

@mswehli Yes. I think it will take some days until I have time to test it again.

@michaelmairegger
Copy link
Contributor Author

@mswehli I have created a new flutter-project and have added the dependency and your main.dart file. Furthermore I have also added the config.json file. Attached you a test project where the MSAS is within but with the error above. Maybe I have missed something to get this working.

flutter_app.zip

@mswehli
Copy link
Member

mswehli commented Nov 28, 2019

@michaelmairegger think i've found the issue, it seems that kotlin 1.3.50 and 1.3.10 are behaving differently in terms of initialization checks. Could you goto your android folder, and in build.gradle, change ext.kotlin_version to 1.3.50 and let me know if that works for you.

@mswehli
Copy link
Member

mswehli commented Nov 28, 2019

@michaelmairegger @dwhiteddsoft Ok, on further research, it appears to be a known issue with Kotlin but has since been fixed. Please take a look at https://youtrack.jetbrains.com/issue/KT-21862 for more information, but yeah seems the best thing to do is just update kotlin to 1.3.50. Let me know if that fixes things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants