@ldebeasi Getting a common problem when navigating from one screen to another in my Ionic Vue project. Occasionally, I’ll get the error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'classList')
Which points to at x (index.esm.js:1072):
leavingEl.classList.add('ion-page-hidden');
Full stack trace:
x @ index.esm.js:1072
async function (async)
x @ index.esm.js:1071
V @ index.esm.js:1134
(anonymous) @ index.esm.js:938
Oe @ runtime-core.esm-bundler.js:154
Ze @ runtime-core.esm-bundler.js:163
z @ runtime-core.esm-bundler.js:2032
oa @ runtime-core.esm-bundler.js:329
ha @ runtime-core.esm-bundler.js:370
Promise.then (async)
ta @ runtime-core.esm-bundler.js:286
na @ runtime-core.esm-bundler.js:308
ia @ runtime-core.esm-bundler.js:311
M @ runtime-core.esm-bundler.js:2060
v @ reactivity.esm-bundler.js:183
y @ reactivity.esm-bundler.js:189
scheduler @ reactivity.esm-bundler.js:854
v @ reactivity.esm-bundler.js:183
y @ reactivity.esm-bundler.js:189
set value @ reactivity.esm-bundler.js:764
F @ vue-router.esm-bundler.js:3133
(anonymous) @ vue-router.esm-bundler.js:3187
Promise.then (async)
(anonymous) @ vue-router.esm-bundler.js:3184
(anonymous) @ vue-router.esm-bundler.js:441
o @ vue-router.esm-bundler.js:440
This is all within the handlePageTransition method. Any ideas what is happening? I find that the transitions in my app are jittery sometimes but not sure it’s directly related to this.
I don’t know exactly what is causing it. It’s really just clicking around and mostly going into a detail view and then clicking back. Eventually it breaks and then it stays broken. The worst part is on native app it usually means you have to force quit.
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'classList')
I am still seeing it in v5.8.5. I’m trying to figure out if there is any consistency to it.
UPDATE
There doesn’t seem to be any consistency to it. I only see it happening when going to an IonPage from a tab and then clicking the IonBackButton but not always. Once it starts doing it, it seems to be consistent until I navigate to a different tab. It doesn’t completely break the app. Once navigating away to a different tab and back to where it was throwing the error, it no longer throws the error.
@ldebeasi I can confirm this still happens since we added Sentry to notify us. However, it doesn’t actually mess up the UI or do anything bad. Seems to error on navigating away from a screen. Oh well. Hopefully fixed in v6.