Open dotupNET opened 2 years ago
Hi @dotupNET,
Can you please check if Plugin is installed properly we can see this error where it is failing from logs above.
E/MethodChannel#workspaceone_sdk_flutter: Failed to handle method call kotlin.UninitializedPropertyAccessException: lateinit property bridge has not been initialized
Can you re look into Initial setup for using the Plugin, for your reference attaching the link GettingStartedDocument.
Thanks Amit
Hi @akalghatgi, I don't know what I should check.
Some methods are working, others not:
const channel = EventChannel('workspaceone_sdk_event');
channel.receiveBroadcastStream().listen((dynamic event) async {
print('Received event: $event'); // <- initSuccess
print((await WorkspaceoneSdkFlutter.isEnrolled)); // <- returns true
print((await WorkspaceoneSdkFlutter.isCompliant)); // <- returns false
print((await WorkspaceoneSdkFlutter.isCompromised)); // <- returns false
print((await WorkspaceoneSdkFlutter.platformVersion)); // <-MissingPluginException
print((await WorkspaceoneSdkFlutter.userName)); // <-MissingPluginException
}, onError: (dynamic error) {
print('Received error: ${error.message}');
});
Future<void> initSDK() async {
try {
await WorkspaceoneSdkFlutter.startSDK;
} on PlatformException {
log('SDK Init Failed with Exception');
}
}
initSDK();
I'm calling startSDK() and receive initSuccess When I try to get the userName an Exception is thrown.
Unhandled Exception: MissingPluginException(No implementation found for method userName on channel workspaceone_sdk_flutter)
Log from application start
Flutter Doctor: