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

Sometimes iOS crashes at the end of the onboarding flow #16560

Closed
qoqobolo opened this issue Jul 11, 2023 · 34 comments
Closed

Sometimes iOS crashes at the end of the onboarding flow #16560

qoqobolo opened this issue Jul 11, 2023 · 34 comments
Assignees
Milestone

Comments

@qoqobolo
Copy link
Contributor

Bug Report

Problem

We've been experiencing random crashes on iOS for some time, but these particular crashes on creating a profile have become more common (but still not always reproducible).
More often it crashes right after creating a profile (after pressing Start using Status and opening the home screen), sometimes on the Enable notifications screen.

IMG_1575.MP4

Unfortunately, we do not have exact steps to reproduce.

Logs:
geth.log
Status.log

Reproduction

  1. Install Status on iOS
  2. Go through the onboarding flow
  3. Press Start using Status

Additional Information

  • Status version: nightly 11/07
  • Operating System: iOS
@qoqobolo qoqobolo added this to the 1.24.0 - Alpha milestone Jul 11, 2023
@qoqobolo
Copy link
Contributor Author

qoqobolo commented Jul 11, 2023

Adding to 1.24 but feel free to move it to 1.25.
The app crashes (currently, almost every time on the first opening), however, you can log in after that to your profile.

@cammellos
Copy link
Contributor

@qoqobolo for crashes we need the unfiltered logcat unfortunately, would you be able to provide one for the session?

@qoqobolo
Copy link
Contributor Author

@qoqobolo for crashes we need the unfiltered logcat unfortunately, would you be able to provide one for the session?

I've managed to reproduce the crash and get logs from Xcode (Device Logs) but I'm not sure that's what you need. Could you check please?
ios.log

@cammellos
Copy link
Contributor

@qoqobolo for crashes we need the unfiltered logcat unfortunately, would you be able to provide one for the session?

I've managed to reproduce the crash and get logs from Xcode (Device Logs) but I'm not sure that's what you need. Could you check please? ios.log

Thank you,
No, no useful info, though I think this should happen on android as well, any report of crashes there? (easier to extract logcat)

@qoqobolo
Copy link
Contributor Author

@cammellos hmm, we haven't experienced any crashes on android.
Or do you mean to get logs even without the crash, since the same thing should happen there?

@cammellos
Copy link
Contributor

@cammellos hmm, we haven't experienced any crashes on android. Or do you mean to get logs even without the crash, since the same thing should happen there?

No, I meant replicating on Android, since it looks like a status-go issue (generally those are the ones that crashes the device in this way)

@cammellos cammellos added bug and removed bug labels Jul 14, 2023
@qfrank qfrank self-assigned this Jul 19, 2023
@qfrank
Copy link
Contributor

qfrank commented Jul 19, 2023

I'm able to use xcode to run status now, so i'd like to take a look at this one

@qoqobolo
Copy link
Contributor Author

qoqobolo commented Jul 19, 2023

I'm able to use xcode to run status now, so i'd like to take a look at this one

hi @qfrank, thank you!

During the release testing, we noticed that the crash happens much less often, but it still happens sometimes (randomly).
If you don't mind, please take a look, maybe there will be something obvious to you. Feel free to ping the QA team if you need any help and let me know if you can't reproduce it. Maybe we'll just close this issue.

@qfrank
Copy link
Contributor

qfrank commented Jul 19, 2023

Hi @qoqobolo , i'm unable to reproduce it during 10+ profiles created

@qoqobolo
Copy link
Contributor Author

@pavloburykh could you share a PR link where you reproduced the crash today, please?

@pavloburykh
Copy link
Contributor

@pavloburykh could you share a PR link where you reproduced the crash today, please?

sure @qoqobolo #16330

@qfrank
Copy link
Contributor

qfrank commented Jul 20, 2023

sure @qoqobolo #16330

after installed it , created bunch of profiles(20+) but still not able to reproduce it ):

I did nothing else except simply switch the bottom tab after (Enable notifications -> Start using Status) each time , did i miss something? cc @pavloburykh

@pavloburykh
Copy link
Contributor

sure @qoqobolo #16330

after installed it , created bunch of profiles(20+) but still not able to reproduce it ):

I did nothing else except simply switch the bottom tab after (Enable notifications -> Start using Status) each time , did i miss something? cc @pavloburykh

@qfrank everything is correct. This is just a weird random crash which is hard to reproduce.

@pavloburykh
Copy link
Contributor

@qfrank I have just reproduced IOS crash on fresh installed latest build from this PR #16630

Here are the logs, if they will be helpful
logs (4).zip

@smohamedjavid
Copy link
Member

@pavloburykh - Can you try the build from #16741 and see if you could encounter the crash?

We are trying a new lib react-native-exception-handler to catch native exceptions.

If any native (module) exception occurred, it will show this screen instead of crashing immediately. It will also try to send the log via email. Just a trial and error.

@pavloburykh
Copy link
Contributor

@pavloburykh - Can you try the build from #16741 and see if you could encounter the crash?

We are trying a new lib react-native-exception-handler to catch native exceptions.

If any native (module) exception occurred, it will show this screen instead of crashing immediately. It will also try to send the log via email. Just a trial and error.

hi @smohamedjavid Thank you! As I will be off during next week, someone from QA team will try the build (cc @qoqobolo @VolodLytvynenko). Although, it will be quite difficult to catch the crash as it happens randomly.

@qfrank
Copy link
Contributor

qfrank commented Jul 24, 2023

I'm still unable to reproduce this crash when creating profile ... just removed my assignment, feel free to assign it to yourself , but i will keep an eye on it to see if i can reproduce it 🙂

@qfrank qfrank removed their assignment Jul 24, 2023
@qoqobolo
Copy link
Contributor Author

@ pavloburykh - Can you try the build from #16741 and see if you could encounter the crash?
We are trying a new lib react-native-exception-handler to catch native exceptions.
If any native (module) exception occurred, it will show this screen instead of crashing immediately. It will also try to send the log via email. Just a trial and error.

Hey @smohamedjavid, here is the error I got:

Screenshot 2023-07-24 at 13 04 12

The app crashed on the first few attempts (3 or 4 times). Then it stopped crashing.

On those first attempts, I enabled touch ID, then turned it off on onboarding, and the app stopped crashing.
BUT, when I tried to enable touch ID again (I thought this might be the case), the crash did not happen anymore, so now it doesn't seem like biometric id causes this..

@qfrank
Copy link
Contributor

qfrank commented Jul 26, 2023

the logs provided seems useless for me, i tried(3 times) nightly version to reproduce with no luck

i was using iphone xs max (ios 16.1, physical device), i enabled face ID @qoqobolo

@qoqobolo
Copy link
Contributor Author

Seems like for @VolodLytvynenko and @churik that's also reproducible even without enabling biometric id.

Also, @VolodLytvynenko faced the issue of getting stuck on the "Keys saved" screen and the inability to log in (which I mentioned yesterday on retro) on Android as well. So it looks like these issues are unrelated.

@Samyoul tagging you here since you wanted to take a look at this as well.
Thanks!

@VolodLytvynenko
Copy link
Contributor

Seems like for @VolodLytvynenko and @churik that's also reproducible even without enabling biometric id.

Also, @VolodLytvynenko faced the issue of getting stuck on the "Keys saved" screen and the inability to log in (which I mentioned yesterday on retro) on Android as well. So it looks like these issues are unrelated.

@Samyoul tagging you here since you wanted to take a look at this as well. Thanks!

The issue of getting stuck on the "Keys saved" screen is quite rare, but today I faced it again on the Android emulator. Here are the logcat logs:
android_logcat.txt

@smohamedjavid
Copy link
Member

Just sharing my findings.

Last week, while trying to reproduce this issue, @qfrank encountered a crash on the login page in iOS. When going through the logs, we discovered that the crash is possibly due to the react-native-reanimated library.

We didn't conclude anything as we are not sure this will be the root cause of the crash encountered by the QA team.

From the logs given by @VolodLytvynenko:

The issue of getting stuck on the "Keys saved" screen is quite rare, but today I faced it again on the Android emulator. Here are the logcat logs:
android_logcat.txt

com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 213 could not be found.
                         at com.facebook.react.uimanager.NativeViewHierarchyManager.resolveViewManager(NativeViewHierarchyManager.java:111)
                         at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties(NativeViewHierarchyManager.java:138)
                         at com.facebook.react.uimanager.UIImplementation.synchronouslyUpdateViewOnUIThread(UIImplementation.java:305)
                         at com.swmansion.reanimated.NodesManager.updateProps(NodesManager.java:590)
                         at com.swmansion.reanimated.NativeProxy.updateProps(NativeProxy.java:185)
                         at com.swmansion.reanimated.NativeProxy$AnimationFrameCallback.onAnimationFrame(Native Method)
                         at com.swmansion.reanimated.NodesManager.onAnimationFrame(NodesManager.java:275)
                         at com.swmansion.reanimated.NodesManager.access$000(NodesManager.java:67)

It seems like the crash is caused due to the react-native-reanimated library. We use animation on the Generating keys/Key saved screen.

I saw a lot of crashes reported on the library GH: https://github.com/software-mansion/react-native-reanimated/issues.

We use v2.11.0 (released on 14 Oct 2022). The navigation library and a few libraries in our codebase have reanimated as a dependency. It could be the library itself, or It MAY be due to the other libraries which use this as a dependency. We are due to update the libraries too in our codebase, after the React Native upgrade.

So, our primary suspect is the react-native-reanimated library. We can try newer versions of react-native-reanimated and react-native-navigation to see if it resolves the crash.

@qfrank
Copy link
Contributor

qfrank commented Jul 29, 2023

Just sharing my findings.

Last week, while trying to reproduce this issue, @qfrank encountered a crash on the login page in iOS. When going through the logs, we discovered that the crash is possibly due to the react-native-reanimated library.

We didn't conclude anything as we are not sure this will be the root cause of the crash encountered by the QA team.

From the logs given by @VolodLytvynenko:

The issue of getting stuck on the "Keys saved" screen is quite rare, but today I faced it again on the Android emulator. Here are the logcat logs:
android_logcat.txt

com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 213 could not be found.
                         at com.facebook.react.uimanager.NativeViewHierarchyManager.resolveViewManager(NativeViewHierarchyManager.java:111)
                         at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties(NativeViewHierarchyManager.java:138)
                         at com.facebook.react.uimanager.UIImplementation.synchronouslyUpdateViewOnUIThread(UIImplementation.java:305)
                         at com.swmansion.reanimated.NodesManager.updateProps(NodesManager.java:590)
                         at com.swmansion.reanimated.NativeProxy.updateProps(NativeProxy.java:185)
                         at com.swmansion.reanimated.NativeProxy$AnimationFrameCallback.onAnimationFrame(Native Method)
                         at com.swmansion.reanimated.NodesManager.onAnimationFrame(NodesManager.java:275)
                         at com.swmansion.reanimated.NodesManager.access$000(NodesManager.java:67)

It seems like the crash is caused due to the react-native-reanimated library. We use animation on the Generating keys/Key saved screen.

I saw a lot of crashes reported on the library GH: https://github.com/software-mansion/react-native-reanimated/issues.

We use v2.11.0 (released on 14 Oct 2022). The navigation library and a few libraries in our codebase have reanimated as a dependency. It could be the library itself, or It MAY be due to the other libraries which use this as a dependency. We are due to update the libraries too in our codebase, after the React Native upgrade.

So, our primary suspect is the react-native-reanimated library. We can try newer versions of react-native-reanimated and react-native-navigation to see if it resolves the crash.

1
confirmed! cc @smohamedjavid

@qfrank
Copy link
Contributor

qfrank commented Jul 31, 2023

faced the issue of getting stuck on the "Keys saved" screen and the inability to log in (which I mentioned yesterday on retro) on Android as well

getting stuck on the "Keys saved" screen is a separate issue, i will push a fix for it today cc @qoqobolo @VolodLytvynenko

@yqrashawn
Copy link
Contributor

yqrashawn commented Sep 5, 2023

Got one crash on iOS simulator (at the end of onboarding flow) the other day, caused by reanimated i guess

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: 9A13C8C0-C490-4A69-B9C2-442D157CCABE
CrashReporter Key:   D0B0305B-84EB-3033-37F6-9372EB78CEC8
Hardware Model:      Mac13,1
Process:             StatusIm [54164]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/3E2EB40E-9157-41A1-BEE8-3537A991CBE2/data/Containers/Bundle/Application/86FE3599-C8DE-404B-BE35-5F7603ED8653/StatusIm.app/StatusIm
Identifier:          im.status.ethereum.debug
Version:             1.0 (1)
Code Type:           X86-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [93156]
Coalition:           com.apple.CoreSimulator.SimDevice.3E2EB40E-9157-41A1-BEE8-3537A991CBE2 [73391]
Responsible Process: SimulatorTrampoline [3579]

Date/Time:           2023-08-29 09:56:20.4646 +0800
Launch Time:         2023-08-29 09:55:08.4024 +0800
OS Version:          macOS 13.4.1 (22F82)
Release Type:        User
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000018
Exception Codes: 0x0000000000000001, 0x0000000000000018
VM Region Info: 0x18 is not in any region.  Bytes before following region: 140703128616936
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      dyld private memory      7ff800000000-7ffffe000000 [ 32.0G] ---/--- SM=NUL  
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [54164]

Triggered by Thread:  0

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   <translation info unavailable>	       0x1d23b9e30 ???
1   <translation info unavailable>	       0x1101cd94c ???
2   libsystem_platform.dylib      	       0x11c555603 _sigtramp + 51
3   StatusIm                      	       0x10504a971 reanimated::MutableValue::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)::$_2::operator()() const + 49 (MutableValue.cpp:70)
4   StatusIm                      	       0x10504a935 decltype(std::declval<reanimated::MutableValue::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)::$_2&>()()) std::__1::__invoke[abi:v15006]<reanimated::MutableValue::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)::$_2&>(reanimated::MutableValue::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)::$_2&) + 21 (invoke.h:394)
5   StatusIm                      	       0x10504a8f5 void std::__1::__invoke_void_return_wrapper<void, true>::__call<reanimated::MutableValue::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)::$_2&>(reanimated::MutableValue::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)::$_2&) + 21 (invoke.h:479)
6   StatusIm                      	       0x10504a8cd std::__1::__function::__alloc_func<reanimated::MutableValue::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)::$_2, std::__1::allocator<reanimated::MutableValue::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)::$_2>, void ()>::operator()[abi:v15006]() + 29 (function.h:185)
7   StatusIm                      	       0x1050496f9 std::__1::__function::__func<reanimated::MutableValue::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)::$_2, std::__1::allocator<reanimated::MutableValue::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)::$_2>, void ()>::operator()() + 25 (function.h:359)
8   StatusIm                      	       0x105416942 std::__1::__function::__value_func<void ()>::operator()[abi:v15006]() const + 50 (function.h:512)
9   StatusIm                      	       0x105416885 std::__1::function<void ()>::operator()() const + 21 (function.h:1197)
10  StatusIm                      	       0x1050da5d2 reanimated::Scheduler::triggerUI() + 98 (Scheduler.cpp:17)
11  StatusIm                      	       0x1050a4adc invocation function for block in reanimated::REAIOSScheduler::scheduleOnUI(std::__1::function<void ()>) + 92 (REAIOSScheduler.mm:40)
12  libdispatch.dylib             	       0x11a923e40 _dispatch_call_block_and_release + 12
13  libdispatch.dylib             	       0x11a9250d9 _dispatch_client_callout + 8
14  libdispatch.dylib             	       0x11a934b86 _dispatch_main_queue_drain + 1330
15  libdispatch.dylib             	       0x11a934646 _dispatch_main_queue_callback_4CF + 31
16  CoreFoundation                	       0x11942b6cc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
17  CoreFoundation                	       0x119425fbe __CFRunLoopRun + 2429
18  CoreFoundation                	       0x119425264 CFRunLoopRunSpecific + 560
19  GraphicsServices              	       0x11ea0724e GSEventRunModal + 139
20  UIKitCore                     	       0x1406897bf -[UIApplication _run] + 994
21  UIKitCore                     	       0x14068e5de UIApplicationMain + 123
22  StatusIm                      	       0x104dc2e08 main + 104 (main.m:17)
23  dyld_sim                      	       0x11421c384 start_sim

@mohsen-ghafouri
Copy link
Contributor

mohsen-ghafouri commented Sep 5, 2023

Thanks, @yqrashawn . It seems to resemble this open issue on the reanimated repository
software-mansion/react-native-reanimated#3632

I'm not sure how far along we are with upgrading the reanimated library 🤔.

@qfrank
Copy link
Contributor

qfrank commented Sep 5, 2023

regarding to this comment issue, after tried reproducing with xcode, i found it point to reanimated library again 🤦‍♂️... note this crash can be reproduced in 100%
image
cc @smohamedjavid @churik @VolodLytvynenko @Samyoul @cammellos

@mohsen-ghafouri
Copy link
Contributor

I tested the flow (sync flow) with this PR #17241 , and I tried it four times in a row without any crash. So, I can confirm that the issue is related to the Reanimated version. After merging this PR, hopefully, it will resolve the sync and onboarding crash hopefully

@churik
Copy link
Member

churik commented Oct 20, 2023

Will be fixed by #17241

@siddarthkay
Copy link
Contributor

Assigning myself because we need not do anything and this will be fixed in the RN upgrade PR.

@siddarthkay
Copy link
Contributor

fixed here : #17241

@ilmotta ilmotta removed the bug label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests