Repository navigation
Problem with ui/frame on getFragmentCallbacks #4901
Description
Activity
I've also tried to reproduce this issue with NativeScript 2.5.0 and there's no problem at all, it does the action expected.
Hi @pedromareis ,
I tested the described scenario while using NativeScript 3.2.1 and the description from this blog post, however, I was unable to recreate the similar problem. Keep in mind that I registeredactivityBackPressedEventinside the app.ts file as it is described on the blog and where it is the right place to do that.For your convenience, I am attaching GIF file from the simulator and sample project. You can review it and make the needed changes, which will allow us to recreate behavior.
Archive.zip

Hello @tsonevn,
From what I've seen from the gif I guess you're doing theactivityBackPressedEventonly on the last view (View 6) instead of doing it on view 1... And even if you remove the event I think you can see the error too when navigating from view 6 to 1 pressing multiple times the back button...Hi @pedromareis,
In sample project, I disabled the back button in theapp.tsfile for the whole application inside the callback method for the activityBackPressedEvent.The scenarios that I tested on our devices are as follows:
- I navigated to the latest page and tap several times on the hardware back button. In this case, the callback method was executed properly and the navigation was canceled properly.
- on the second scenario I navigated to the very first page, again without to be able to crash the application.
The described scenarios could be reviewed in the attached video and by building the attached project on your side.
To be able to investigate further the problem, it would help if you could send us sample project.
Archive.zip@tsonevn any updates on this?
Hi @pedromareis,
We reviewed your project, however as you could see on the attached GIF file, still the project is built properly and the navigation works as expected. The project was tested on Android simulator API level 23 similar to yours, Could you verify, whether I am missing some step on the attached gif?

@tsonevn well, from what I see in the gif I don't think you're doing it exactly like I did... The problem only occurs if you tap quickly on the back button and multiple times. Could you try that?
Basically I don't even give the app time to process all the taps on the back button and the app eventually crashes because of that.
Reacted by Nikolay TsonevIndeed you are right, to reproduce the problem, the Back button should be tapped quickly multiple times.
I tested this case with the official version and with@nextof the modules. Unfortunately, the issue is reproduced with both. Regarding that, I would suggest keeping track on the issue for further info about the case.Any updates on when will this be fixed?
Hi @pedromareis,
We are working on resolving this problem. We will provide more info in the issue when we have a solution.@pedromareis This should be fixed in master branch and will be included in 3.4
If possible please try it with @next of tns-core-modules and ping me back if issue is still present.Reacted by Jeremiah Ogbomo and Pedro ReisHello @hshristov, I've just updated the core modules and everything seems to be okay. Thank you!!
@pedromareis That's great.
Thanks for taking time to verify it. Really appreciate it.This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
- locked and limited conversation to collaborators
on Aug 27, 2019
Please, provide the details below:
Application crashes when navigating back on several views really fast and with the activityBackPressedEvent cancelling the back button on first view.
Did you verify this is a real problem by searching [Stack Overflow]
Yes, I've searched and couldn't find anything.
Tell us about the problem
I've created an app with some views and I need to block the back button ONLY on the first view with the activityBackPressedEvent.
Basically I've done this on the navigatedTo function of the first view:
And on the backEvent function I've put:
Basically it works as expected except when I'm on view 5 and click several times on the back button, that's when the app crashes:

Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
Please tell us how to recreate the issue in as much detail as possible.
Create some views and the navigation between them like View 1 --> View 2 --> View 3 --> View 4 --> View 5 and click on the back button really fast a lot of times. Also, insert the code I've put on the description of my problem in the code of first view.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
Already on the description of the problem.