AmitySocket, LoginUsecase is not registered inside GetIt

Hello,
I’m receiving error each time when I login:
GetIt: Object/factory with type AmitySocket is not registered inside GetIt.
(Did you accidentally do GetIt sl=GetIt.instance(); instead of GetIt sl=GetIt.instance;
Did you forget to register it?)

and another one is :
Bad state: GetIt: Object/factory with type LoginUsecase is not registered inside GetIt.
(Did you accidentally do GetIt sl=GetIt.instance(); instead of GetIt sl=GetIt.instance;
Did you forget to register it?)

I use flutter_amity_uikit_beta_service local package and amity_sdk: ^0.51.0
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0 24A335 darwin-arm64, locale en-GB)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)

Why I receive that error and how to resolve that?

Seems like I was trying to call AmityUIKit.registerDevice method faster than AmityUIKit.setup method finished

1 Like

Hello @Yarshau , For your issue, you need to complete the AmityUIKit.setup method first, then call the AmityUIKit.registerDevice method and try again.

1 Like