question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: vue, switching tabs causes wrong view to be unmounted

See original GitHub issue

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

App crashes when navigating between tabs and tabs child pages.

Error thrown:

Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'mount') at Object.unmountLeavingViews (index.esm.js?ba1f:802:1) at handlePageTransition (index.esm.js?58b7:1320:1)

Expected Behavior

The application can navigate between tabs and child pages of tabsThe application

Steps to Reproduce

on start page (tab 1) ->

  1. Click “go to child page”
  2. click TAB 2
  3. click TAB 1
  4. click TAB 1 again
  5. click TAB 2
  6. click TAB 1
  7. Click “go to child page”
  8. click TAB 2
  9. click TAB 1
  10. click TAB 1 agina

Code Reproduction URL

https://github.com/Jannik-KJ/ionic-6-router

Ionic Info

Ionic:

Ionic CLI : 6.18.1 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/vue 6.1.3

Capacitor:

Capacitor CLI : 3.5.0 @capacitor/android : not installed @capacitor/core : 3.5.0 @capacitor/ios : not installed

Utility:

cordova-res : not installed globally native-run : 1.5.0

System:

NodeJS : v16.13.1 (/usr/local/bin/node) npm : 8.1.2 OS : macOS Monterey

Additional Information

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
liamdebeasicommented, May 10, 2022

Thanks for the issue. Can you try the following dev build and let me know if it resolves the issue?

npm install @ionic/vue@6.1.5-dev.11652207609.1ba60afe @ionic/vue-router@6.1.5-dev.11652207609.1ba60afe
1reaction
liamdebeasicommented, May 11, 2022

You can keep the issue open for now. We will close the issue once the fix has been merged into the main branch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to re-mount a component in VueJS? - Stack Overflow
The trick is to alter the key. When the key changes, vue regards it as a new component, so it will unmount the...
Read more >
Handling Mounting And Unmounting Of Navigation Routes In ...
Usually, to see more content, you have to be authenticated in some way. Let's look at how to mount and unmount navigation stack...
Read more >
KeepAlive | Vue.js
By default, an active component instance will be unmounted when switching away from it. This will cause any changed state it holds to...
Read more >
Cancelling async operations in Vue.js | by Michał Męciński
The user can use buttons to switch between them and the component loads ... As you can see, we have to distinguish the...
Read more >
How to work with React the right way to avoid some common ...
Or when you call an API and while the promise is pending, the component get unmounted and you get the following beautiful error....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found