![firefox restore previous session not working firefox restore previous session not working](https://img.webnots.com/2019/12/Restore-Sessions-Option-in-Firefox-scaled.png)
- #FIREFOX RESTORE PREVIOUS SESSION NOT WORKING UPDATE#
- #FIREFOX RESTORE PREVIOUS SESSION NOT WORKING CODE#
I think if you then close the other instance, it might be able to write the tab set it currenty has (which is just the welcome screen) back to localStorage and overrwrite your data that way, but I'd have to test that to be sure. If you do that, the second instance can't access the database, so you won't have any of your data, and it will start with just the welcome screen. I think what might have happened is that you opened two instance of Min at the same time. If we've created the backup file, then the data is corrupted somehow, and I'm not really sure there's any way to reliably detect whats wrong. Some kind of way to recover from the backup file would be nice, but I'm not really sure how it would work. Was there anything in particular you were doing before this happened? I'm also not really seeing how selectedTask could point to a tab - we don't set that property in very many places, and as far as I can tell we use a task ID in all of them. If you were on an older branch, it would make sense that the tour screen would show up, but then you also wouldn't have had a backup file, which it sounds like you did. Assuming you're on the 1.6.1 branch or later, you should have seen an error screen instead - if you're seeing the tour screen, that means we don't have any saved data at all, but it sounds like that's not what happened.
#FIREFOX RESTORE PREVIOUS SESSION NOT WORKING CODE#
I've looked through the session restore code again, and I'm not really seeing how this could occur. The fix to this is going to be that, whenever we delete the currently-selected task, we need to pick another task to switch to immediately, instead of waiting until you close the task overlay. This results in a broken UI, and when you reload the browser, the saved state will be broken as well. This error moves up th stack - syncStateAndOverlay will throw an error, which in turn breaks the drag-and-drop library we're using. So we'll end up calling tSelected with a task that doesn't actually exist, which throws an error. The problem is in the last step: we're resetting the selectedTask to it's value from before syncStateAndOverlay was called, but if you've deleted the currently-selected task in the overlay, then selectedTask is going to be a task that doesn't exist any more.
![firefox restore previous session not working firefox restore previous session not working](https://venturebeat.com/wp-content/uploads/2019/05/AI-development-kit-asus-zenbook.png)
![firefox restore previous session not working firefox restore previous session not working](https://helpdeskgeek.com/wp-content/pictures/2021/09/image-70.png)
To do this, we do the following (the code for this is here: ):
#FIREFOX RESTORE PREVIOUS SESSION NOT WORKING UPDATE#