Closed overdrowe closed 2 years ago
Здравствуйте!
Какую проблему наблюдаете?
Нужен полный текст ошибки, flutter doctor --verbose
и пример для воспроизведения.
[✓] Flutter (Channel stable, 2.10.4, on macOS 12.2.1 21D62 darwin-arm, locale ru-RU) • Flutter version 2.10.4 at /Users/overdrowe/Development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision c860cba910 (4 weeks ago), 2022-03-25 00:23:12 -0500 • Engine revision 57d3bac3dd • Dart version 2.16.2 • DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /Users/overdrowe/Library/Android/sdk • Platform android-32, build-tools 32.1.0-rc1 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.3) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.2
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio • Android Studio at /Applications/Android Studio Preview.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart ✗ Unable to find bundled Java version. • Try updating or re-installing Android Studio.
[✓] Android Studio (version 2021.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
[✓] Connected device (2 available) • iPhone 13 (mobile) • 86E900D5-1308-4260-B0DA-7D003F5AE61F • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-4 (simulator) • Chrome (web) • chrome • web-javascript • Google Chrome 100.0.4896.127
[✓] HTTP Host Availability • All required HTTP hosts are available
Здравствуйте Почти всегда срабатывает такой сценарий:
Под примером имелся ввиду, пример кода, который вызывает ошибку. Также какая версия yandex_mapkit используется?
К сожалению пример кода предоставить не смогу, пока пробуем играться с использованием библиотеки, возможно мы как то лишний раз дергаем обновление карты и поэтому крашится Во всяком случае сейчас, после обновления до версии 2.0.4 могу предоставить молный текст крашей из крашлитики
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x990fc __exceptionPreprocess
1 libobjc.A.dylib 0x15d64 objc_exception_throw
2 Foundation 0x13039c _userInfoForFileAndLine
3 Runner 0x13e8c58 -[YMKMap moveWithCameraPosition:]
4 Runner 0x2355d88 YandexMapController.move(cameraPosition:animationParams:result:) (<compiler-generated>)
5 Runner 0x23541ec YandexMapController.moveCamera(_:_:) + 158 (YandexMapController.swift:158)
6 Runner 0x2352e60 YandexMapController.handle(_:result:) + 69 (YandexMapController.swift:69)
7 Runner 0x2359cb0 partial apply for closure #1 in YandexMapController.init(id:frame:registrar:params:) (<compiler-generated>)
8 Runner 0x2368950 thunk for @escaping @callee_guaranteed (@guaranteed FlutterMethodCall, @guaranteed @escaping @callee_guaranteed (@in_guaranteed Any?) -> ()) -> () (<compiler-generated>)
9 Flutter 0x50d038 (Missing UUID d24b4305a5d8348c8a0909c859505f3a)
10 Flutter 0x41ce0 (Missing UUID d24b4305a5d8348c8a0909c859505f3a)
11 Flutter 0x3d3ca4 (Missing UUID d24b4305a5d8348c8a0909c859505f3a)
12 Flutter 0x2fbbf0 (Missing UUID d24b4305a5d8348c8a0909c859505f3a)
13 Flutter 0x2ff1bc (Missing UUID d24b4305a5d8348c8a0909c859505f3a)
14 CoreFoundation 0xae318 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
15 CoreFoundation 0x32cf0 __CFRunLoopDoTimer
16 CoreFoundation 0x2d4ec __CFRunLoopDoTimers
17 CoreFoundation 0xbd08 __CFRunLoopRun
18 CoreFoundation 0x1f468 CFRunLoopRunSpecific
19 GraphicsServices 0x138c GSEventRunModal
20 UIKitCore 0x5195d0 -[UIApplication _run]
21 UIKitCore 0x297f74 UIApplicationMain
22 Runner 0x699c main + 6 (AppDelegate.swift:6)
23 ??? 0x105b89aa4 (Missing)
Тут проблема в вызове в dart YandexMapController.moveCamera
.
При 0, 0 размерах карты, и вызове этого метода нативная либа ошибку выдает, что приводит к крешу, причем только на iOS. В мастере поправил
Информация из крашлитики: Position should be finite, provided position is target = (nan,nan), zoom = nan, azimuth = 0, tilt = 0
При первом входе в приложение и переходе на карту происходит краш в момент появления пермишена местоположения
По этому проблеме получилось найти одно ишью https://webcache.googleusercontent.com/search?q=cache:jRvf0A57zQMJ:https://githubmemory.com/repo/Unact/yandex_mapkit/issues/136+&cd=15&hl=ru&ct=clnk&gl=ru
Но поля onMapRendered, с помощью которого решается проблема, как я понял нет в последней версии карт