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

fix: iOS crash after updating via TestFlight #2612

Closed
eseidel opened this issue Nov 8, 2024 · 2 comments · Fixed by shorebirdtech/updater#233
Closed

fix: iOS crash after updating via TestFlight #2612

eseidel opened this issue Nov 8, 2024 · 2 comments · Fixed by shorebirdtech/updater#233
Labels
bug Something isn't working

Comments

@eseidel
Copy link
Contributor

eseidel commented Nov 8, 2024

app_id: 9b31b495-59ac-4e87-9433-fed2489311be

The steps according to the user:

  1. Install 1.1.2 (has various patches)
  2. Update to 1.1.4 via testflight
  3. Crash.

Looking at our admin dashboard, there are 9 patches to 1.1.2 and 0 to 1.1.4.

If they install 1.1.4 directly (via TestFlight or Preview) it does not crash.

This would suggest that somehow 1.1.4 is reading the patches from 1.1.2? But they should have been deleted when 1.1.4 was installed, as per:
https://github.com/shorebirdtech/updater/blob/0988c854af11639f610c9545647a8bc9dea0de6c/library/src/cache/updater_state.rs#L108

The crashes appear to be when trying to read a snapshot. The IPS files were shared on Discord:
https://discord.com/channels/1030243211995791380/1304505647747825685/1304524374946087064

Symbolicated crashing threads:

Thread 13 io.flutter.1.ui
Thread 13:
0    libsystem_kernel.dylib                   0x1d9bc3274 __pthread_kill
1    libsystem_pthread.dylib                  0x2110f2ef8 pthread_kill
2    libsystem_c.dylib                        0x191ad7ad8 abort
3    Flutter                                  0x107271670 dart::SimpleHashMap::Lookup(void*, unsigned int, bool) (in Flutter) (hashmap.cc:22)
4    Flutter                                  0x1072983b0 dart::CodeDeserializationCluster::ReadAllocOneCode(dart::Deserializer*) (in Flutter) (app_snapshot.cc:3331)
5    Flutter                                  0x107297a8c dart::CodeDeserializationCluster::ReadFill(dart::Deserializer*, long, long, bool) (in Flutter) (app_snapshot.cc:3369)
6    Flutter                                  0x107297858 dart::CodeDeserializationCluster::ReadFill(dart::Deserializer*) (in Flutter) (app_snapshot.cc:3343)
7    Flutter                                  0x10729e1c4 dart::Deserializer::Deserialize(dart::DeserializationRoots*) (in Flutter) (app_snapshot.cc:10073)
8    Flutter                                  0x1073de434 dart::CreateIsolate(dart::IsolateGroup*, bool, char const*, void*, char**) (in Flutter) (dart_api_impl.cc:1263)
9    Flutter                                  0x1073df010 Dart_CreateIsolateGroup (in Flutter) (dart_api_impl.cc:1351)
10   Flutter                                  0x106d89dc4 std::_fl::__function::__func<flutter::DartIsolate::CreateRootIsolate(flutter::Settings const&, fml::RefPtr<flutter::DartSnapshot const>, std::_fl::unique_ptr<flutter::PlatformConfiguration, std::_fl::default_delete<flutter::PlatformConfiguration>>, flutter::DartIsolate::Flags const&, std::_fl::function<void ()> const&, std::_fl::function<void ()> const&, flutter::UIDartState::Context const&, flutter::DartIsolate const*)::$_1, std::_fl::allocator<flutter::DartIsolate::CreateRootIsolate(flutter::Settings const&, fml::RefPtr<flutter::DartSnapshot const>, std::_fl::unique_ptr<flutter::PlatformConfiguration, std::_fl::default_delete<flutter::PlatformConfiguration>>, flutter::DartIsolate::Flags const&, std::_fl::function<void ()> const&, std::_fl::function<void ()> const&, flutter::UIDartState::Context const&, flutter::DartIsolate const*)::$_1>, _Dart_Isolate* (std::_fl::shared_ptr<flutter::DartIsolateGroupData>*, std::_fl::shared_ptr<flutter::DartIsolate>*, Dart_IsolateFlags*, char**)>::operator()(std::_fl::shared_ptr<flutter::DartIsolateGroupData>*&&, std::_fl::shared_ptr<flutter::DartIsolate>*&&, Dart_IsolateFlags*&&, char**&&) (in Flutter) (function.h:359)
11   Flutter                                  0x106d85cbc flutter::DartIsolate::CreateDartIsolateGroup(std::_fl::unique_ptr<std::_fl::shared_ptr<flutter::DartIsolateGroupData>, std::_fl::default_delete<std::_fl::shared_ptr<flutter::DartIsolateGroupData>>>, std::_fl::unique_ptr<std::_fl::shared_ptr<flutter::DartIsolate>, std::_fl::default_delete<std::_fl::shared_ptr<flutter::DartIsolate>>>, Dart_IsolateFlags*, char**, std::_fl::function<_Dart_Isolate* (std::_fl::shared_ptr<flutter::DartIsolateGroupData>*, std::_fl::shared_ptr<flutter::DartIsolate>*, Dart_IsolateFlags*, char**)> const&) (in Flutter) (dart_isolate.cc:1200)
12   Flutter                                  0x106d84e18 flutter::DartIsolate::CreateRootIsolate(flutter::Settings const&, fml::RefPtr<flutter::DartSnapshot const>, std::_fl::unique_ptr<flutter::PlatformConfiguration, std::_fl::default_delete<flutter::PlatformConfiguration>>, flutter::DartIsolate::Flags const&, std::_fl::function<void ()> const&, std::_fl::function<void ()> const&, flutter::UIDartState::Context const&, flutter::DartIsolate const*) (in Flutter) (dart_isolate.cc:265)
13   Flutter                                  0x107242a30 flutter::Engine::Run(flutter::RunConfiguration) (in Flutter) (engine.cc:241)
14   Flutter                                  0x107267584 std::_fl::__function::__func<fml::internal::CopyableLambda<flutter::Shell::RunEngine(flutter::RunConfiguration, std::_fl::function<void (flutter::Engine::RunStatus)> const&)::$_0>, std::_fl::allocator<fml::internal::CopyableLambda<flutter::Shell::RunEngine(flutter::RunConfiguration, std::_fl::function<void (flutter::Engine::RunStatus)> const&)::$_0>>, void ()>::operator()() (in Flutter) (function.h:359)
15   Flutter                                  0x106d29de0 fml::MessageLoopImpl::FlushTasks(fml::FlushType) (in Flutter) (message_loop_impl.cc:128)
16   Flutter                                  0x106d2d3e4 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) (in Flutter) (message_loop_darwin.mm:86)
17   CoreFoundation                           0x189dd73f8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
18   CoreFoundation                           0x189dd709c __CFRunLoopDoTimer
19   CoreFoundation                           0x189dd6bf0 __CFRunLoopDoTimers
20   CoreFoundation                           0x189d750fc __CFRunLoopRun
21   CoreFoundation                           0x189d745b8 CFRunLoopRunSpecific
22   Flutter                                  0x106d2d4d0 fml::MessageLoopDarwin::Run() (in Flutter) (message_loop_darwin.mm:52)
23   Flutter                                  0x106d2d118 std::_fl::__function::__func<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0, std::_fl::allocator<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>, void ()>::operator()() (in Flutter) (function.h:359)
24   Flutter                                  0x106d2cda8 fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)::$_0::__invoke(void*) (in Flutter) (thread.cc:73)
25   libsystem_pthread.dylib                  0x2110f137c _pthread_start
26   libsystem_pthread.dylib                  0x2110ec494 thread_start
hread 13:
0    libsystem_kernel.dylib                   0x1d9bc3274 __pthread_kill
1    libsystem_pthread.dylib                  0x2110f2ef8 pthread_kill
2    libsystem_c.dylib                        0x191ad7ad8 abort
3    Flutter                                  0x103d2d670 dart::SimpleHashMap::Lookup(void*, unsigned int, bool) (in Flutter) (hashmap.cc:22)
4    Flutter                                  0x103d543b0 dart::CodeDeserializationCluster::ReadAllocOneCode(dart::Deserializer*) (in Flutter) (app_snapshot.cc:3331)
@eseidel eseidel added the bug Something isn't working label Nov 8, 2024
@bryanoltman
Copy link
Contributor

Attempt at reproducing:

We have an app with bundle id dev.shorebird.ios-test.
I created release 1.0.0+52 with Flutter version 6e83d825c4
I uploaded it to TestFlight and installed it on my phone via TestFlight
I published two patches for that release and installed both of those on my phone
I changed the background color and created release 1.0.0+54 with Flutter version b42f87c03b
I uploaded it to TestFlight and installed it on my phone via TestFlight without uninstalling the previous version
I opened the app.
It printed [INFO:flutter/shell/common/shorebird/shorebird.cc(148)] Shorebird updater: active path: /private/var/mobile/Containers/Data/Application/C9064A71-048B-4A1C-9796-CA199ABBFB61/Library/Application Support/shorebird/shorebird_updater/patches/2/dlc.vmcode, which is a patch from 1.0.0+52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants