crowdin / flutter-sdk

Crowdin Flutter SDK for instant translation delivery Over-The-Air directly to your application
https://pub.dev/packages/crowdin_sdk
MIT License
25 stars 3 forks source link

LateError (LateInitializationError: Field 'previewArb' has not been initialized.) #59

Open abdulrahumanea opened 1 week ago

abdulrahumanea commented 1 week ago

I am trying to integrate crowdin sdk to my flutter project for Over The Air Content Delivery. Getting error LateError (LateInitializationError: Field 'previewArb' has not been initialized.). when we ran the application. Followed every step, nothing missed to my knowledge. Please help on this

If I need to step back to previous version please inform

Steps to reproduce the behavior:

  1. Just follow the steps described in https://github.com/crowdin/flutter-sdk, including real time preview
  2. Run the application in VSCode. Run -> Start Debugging
  3. It will ask for OAuth authorisation
  4. Immediately after returning to our app, this crash occurs
andrii-bodnar commented 1 week ago

Hi @abdulrahumanea,

Could you please confirm that the issue is reproducible on the example project? Thank you!

andrii-bodnar commented 1 week ago

@abdulrahumanea could you please use the Formatting Syntax to highlight the code and structure the message? It's hard to understand this. Thanks a lot!

abdulrahumanea commented 1 week ago

working fine with example project, will check my app in detail and get back to you

abdulrahumanea commented 1 week ago

tried changing example app to GetMaterialApp (get: ^4.6.6), that too is working fine can you give me a hind why this error is happening then?

andrii-bodnar commented 1 week ago

@FlutterOd do you have any ideas?

abdulrahumanea commented 1 week ago

i have put the project here. Can someone please verify

abdulrahumanea commented 1 week ago

did anyone check? did got the error? please update

andrii-bodnar commented 1 week ago

@abdulrahumanea checking, we will update you

abdulrahumanea commented 3 days ago

I have been continuously following up on this issue for the past few days. This issue is creating a block for our app development. So I would request you to either fix the issue or suggest me a solution. We would also like to know what the exact issue is. We have been using crowdin for the past few years in native iOS. Waiting for your response at the earliest.

andrii-bodnar commented 3 days ago

@abdulrahumanea We are still investigating the issue and have not found out what is causing this. Sorry for the inconvenience.

FlutterOd commented 2 days ago

Hi @abdulrahumanea

Real time preview requires the translation to be loaded from Crowdin .

Please try using the Crowdin.loadTranslations(locale) method in some initial steps of your project (see Crowdin example project). It should solve the problem