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

App crashes if initMapkit is not called #3

Open
nerdkick opened this issue Jun 4, 2024 · 2 comments
Open

App crashes if initMapkit is not called #3

nerdkick opened this issue Jun 4, 2024 · 2 comments

Comments

@nerdkick
Copy link

nerdkick commented Jun 4, 2024

Application completely freezes and crashes if the method await init.initMapkit(apiKey: ''); is not called before using the map. The issue has been reproduced on the iOS platform, but I am unable to test it on Android.

Steps to Reproduce:

  1. Initialize the flutter yandex maps mapkit lite library without calling the method await init.initMapkit(apiKey: '');.
  2. Attempt to use the map in the application.
  3. Observe the application freezing and crashing.

Expected Behavior:
The application should handle errors properly and not freeze if await init.initMapkit(apiKey: ''); is not called.

Actual Behavior:
The application freezes and crashes, making it unusable.

Platform:

  • iOS

Library Version:
yandex_maps_mapkit_lite: ^4.6.1-beta2

Error Log:

Assertion failed: runtime::locale::localeWasSet() with message "Trying to create MapKit before setting locale. Use MapKitFactory." at /usr/local/place/sandbox-data/tasks/3/7/2310574173/fake-svn-root/arcadia/maps/mobile/libs/mapkit/mapkit/mapkit_lite_impl.cpp:123. Stacktrace:
	yandex::maps::mapkit::internal::MapKitLiteImpl::MapKitLiteImpl()
	std::__1::shared_ptr<yandex::maps::mapkit::internal::MapKitLiteImpl> yandex::maps::runtime::makeWeakPlatformObject<yandex::maps::mapkit::internal::MapKitLiteImpl, yandex::maps::mapkit::internal::MapKitLiteImpl>()
	yandex::maps::mapkit::internal::MapKitHolder::MapKitHolder()
	yandex::maps::mapkit::internal::MapKitHolder& yandex::maps::runtime::singleton<yandex::maps::mapkit::internal::MapKitHolder>()
	yandex::maps::mapkit::getMapKit()
	maps_flutter_get_mapkit_factory

Screenshot of the Error:
Screenshot 2024-06-04 at 10 49 08

@nerdkick
Copy link
Author

nerdkick commented Jun 4, 2024

Additional Note for Issue

Additionally, if I call await init.initMapkit(apiKey: ''); with an empty API key, the map works as expected. I'm unsure why this happens and whether my API key is being correctly attached. Could you provide clarification on this behavior?

@soundboss-77
Copy link

If there is a non-official version in the Yandex_mapkit dependencies, you need to delete it and leave only the official version of Yandex_maps_mapkit_lite. They seem to be in conflict

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