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

InfiniteLoader doesn't play nice with Vue keep-alive #394

Closed
ivelin opened this issue Jun 2, 2020 · 5 comments
Closed

InfiniteLoader doesn't play nice with Vue keep-alive #394

ivelin opened this issue Jun 2, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@ivelin
Copy link
Contributor

ivelin commented Jun 2, 2020

In review of PR #347 we noticed that when the Ambianic Edge Peer ID changes on the Settings page, that causes a Vue callback into infiniteloader which tries to reference its DOM parent. However since the inifiniteloader is on the timeline page, which is not rendered while the user is on the settings page, there is no DOM parent that infiniteloader can reference at the time.

When we remove the keep-alive wrap around the timeline page, the infiniteloader callback error does not occur.

See exception details below:

vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in callback for immediate watcher "forceUseInfiniteWrapper": "TypeError: Cannot read property 'tagName' of null"

found in

---> <InfiniteLoading>
       <VList>
         <Timeline> at src/views/Timeline.vue
           <VContent>
             <VApp>
               <AppFrame> at src/components/AppFrame.vue
                 <VLazy>
                   <App> at src/App.vue
                     <Root>
warn @ vue.runtime.esm.js?2b0e:619
logError @ vue.runtime.esm.js?2b0e:1884
globalHandleError @ vue.runtime.esm.js?2b0e:1879
handleError @ vue.runtime.esm.js?2b0e:1839
Vue.$watch @ vue.runtime.esm.js?2b0e:4951
mounted @ vue-infinite-loading.js?e166:6
invokeWithErrorHandling @ vue.runtime.esm.js?2b0e:1854
callHook @ vue.runtime.esm.js?2b0e:4219
insert @ vue.runtime.esm.js?2b0e:3139
invokeInsertHook @ vue.runtime.esm.js?2b0e:6346
patch @ vue.runtime.esm.js?2b0e:6565
Vue._update @ vue.runtime.esm.js?2b0e:3948
updateComponent @ vue.runtime.esm.js?2b0e:4066
get @ vue.runtime.esm.js?2b0e:4479
run @ vue.runtime.esm.js?2b0e:4554
flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4310
eval @ vue.runtime.esm.js?2b0e:1980
flushCallbacks @ vue.runtime.esm.js?2b0e:1906
Promise.then (async)
timerFunc @ vue.runtime.esm.js?2b0e:1933
nextTick @ vue.runtime.esm.js?2b0e:1990
queueWatcher @ vue.runtime.esm.js?2b0e:4402
update @ vue.runtime.esm.js?2b0e:4544
notify @ vue.runtime.esm.js?2b0e:730
reactiveSetter @ vue.runtime.esm.js?2b0e:1055
eval @ pnp.js?d013:102
wrappedMutationHandler @ vuex.esm.js?2f62:785
commitIterator @ vuex.esm.js?2f62:407
eval @ vuex.esm.js?2f62:406
_withCommit @ vuex.esm.js?2f62:565
commit @ vuex.esm.js?2f62:405
boundCommit @ vuex.esm.js?2f62:350
_callee7$ @ pnp.js?d013:464
tryCatch @ runtime.js?96cf:45
invoke @ runtime.js?96cf:274
prototype.<computed> @ runtime.js?96cf:97
asyncGeneratorStep @ asyncToGenerator.js?1da1:3
_next @ asyncToGenerator.js?1da1:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js?1da1:13
_next @ asyncToGenerator.js?1da1:25
eval @ asyncToGenerator.js?1da1:32
eval @ asyncToGenerator.js?1da1:21
eval @ pnp.js?d013:444
wrappedActionHandler @ vuex.esm.js?2f62:792
dispatch @ vuex.esm.js?2f62:457
boundDispatch @ vuex.esm.js?2f62:347
eval @ pnp.js?d013:250
setTimeout (async)
eval @ pnp.js?d013:250
i.emit @ peerjs.min.js?a0bc:46
dataChannel.onopen @ peerjs.min.js?a0bc:62
12:03:46.276 vue.runtime.esm.js?2b0e:1888 TypeError: Cannot read property 'tagName' of null
    at VueComponent.getScrollParent (vue-infinite-loading.js?e166:6)
    at VueComponent.getScrollParent (vue-infinite-loading.js?e166:6)
    at VueComponent.getScrollParent (vue-infinite-loading.js?e166:6)
    at VueComponent.getScrollParent (vue-infinite-loading.js?e166:6)
    at VueComponent.getScrollParent (vue-infinite-loading.js?e166:6)
    at VueComponent.eval (vue-infinite-loading.js?e166:6)
    at VueComponent.Vue.$watch (vue.runtime.esm.js?2b0e:4949)
    at VueComponent.mounted (vue-infinite-loading.js?e166:6)
    at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
    at callHook (vue.runtime.esm.js?2b0e:4219)
logError @ vue.runtime.esm.js?2b0e:1888
globalHandleError @ vue.runtime.esm.js?2b0e:1879
handleError @ vue.runtime.esm.js?2b0e:1839
Vue.$watch @ vue.runtime.esm.js?2b0e:4951
mounted @ vue-infinite-loading.js?e166:6
invokeWithErrorHandling @ vue.runtime.esm.js?2b0e:1854
callHook @ vue.runtime.esm.js?2b0e:4219
insert @ vue.runtime.esm.js?2b0e:3139
invokeInsertHook @ vue.runtime.esm.js?2b0e:6346
patch @ vue.runtime.esm.js?2b0e:6565
Vue._update @ vue.runtime.esm.js?2b0e:3948
updateComponent @ vue.runtime.esm.js?2b0e:4066
get @ vue.runtime.esm.js?2b0e:4479
run @ vue.runtime.esm.js?2b0e:4554
flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4310
eval @ vue.runtime.esm.js?2b0e:1980
flushCallbacks @ vue.runtime.esm.js?2b0e:1906
Promise.then (async)
timerFunc @ vue.runtime.esm.js?2b0e:1933
nextTick @ vue.runtime.esm.js?2b0e:1990
queueWatcher @ vue.runtime.esm.js?2b0e:4402
update @ vue.runtime.esm.js?2b0e:4544
notify @ vue.runtime.esm.js?2b0e:730
reactiveSetter @ vue.runtime.esm.js?2b0e:1055
eval @ pnp.js?d013:102
wrappedMutationHandler @ vuex.esm.js?2f62:785
commitIterator @ vuex.esm.js?2f62:407
eval @ vuex.esm.js?2f62:406
_withCommit @ vuex.esm.js?2f62:565
commit @ vuex.esm.js?2f62:405
boundCommit @ vuex.esm.js?2f62:350
_callee7$ @ pnp.js?d013:464
tryCatch @ runtime.js?96cf:45
invoke @ runtime.js?96cf:274
prototype.<computed> @ runtime.js?96cf:97
asyncGeneratorStep @ asyncToGenerator.js?1da1:3
_next @ asyncToGenerator.js?1da1:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js?1da1:13
_next @ asyncToGenerator.js?1da1:25
eval @ asyncToGenerator.js?1da1:32
eval @ asyncToGenerator.js?1da1:21
eval @ pnp.js?d013:444
wrappedActionHandler @ vuex.esm.js?2f62:792
dispatch @ vuex.esm.js?2f62:457
boundDispatch @ vuex.esm.js?2f62:347
eval @ pnp.js?d013:250
setTimeout (async)
eval @ pnp.js?d013:250
i.emit @ peerjs.min.js?a0bc:46
dataChannel.onopen @ peerjs.min.js?a0bc:62
12:03:46.290 vue-infinite-loading.js?e166:6 Uncaught TypeError: Cannot read property 'addEventListener' of null
    at eval (vue-infinite-loading.js?e166:6)
@ivelin ivelin added the bug Something isn't working label Jun 2, 2020
ivelin added a commit to BKristenssonAlfsson/ambianic-ui that referenced this issue Jun 2, 2020
it turns out infiniteloader does not play nive with vue keep-alive
see issue ambianic#394 for details
@ivelin
Copy link
Contributor Author

ivelin commented Jun 2, 2020

Related to an open issue in the infiniteloader repo:
PeachScript/vue-infinite-loading#281

github-actions bot pushed a commit that referenced this issue Jun 2, 2020
# [2.4.0](v2.3.3...v2.4.0) (2020-06-02)

### Bug Fixes

* Added E2E test ([de1d8e3](de1d8e3))
* Bug in disconnecting / connecting ([c4d27a0](c4d27a0))
* Bug removed ([34c0c6e](34c0c6e))
* Changed disconnection stream ([f457ab4](f457ab4))
* changed text to be more specific ([2674ca7](2674ca7))
* choose edge connection clean up ([d0b563b](d0b563b))
* cosmetic UI changes in settings page ([4596d29](4596d29))
* Fixed merge conflicts ([87907df](87907df))
* fixed tests so timeout was correct ([f616f66](f616f66))
* mapstate to avoid error ([9608cbb](9608cbb))
* merge branch 'master' of https://github.com/ambianic/ambianic-ui into remote-access ([66883b3](66883b3))
* merge branch 'remote-access' of https://github.com/BKristenssonAlfsson/ambianic-ui into remote-access ([ac4c957](ac4c957))
* Redirect to edge connect if connected ([16b1878](16b1878))
* remote pairing code cleanup ([e095212](e095212))
* remove vue keep-alive around timeline vue ([1bde1b1](1bde1b1)), closes [#394](#394)
* Removed unused variable ([43c03ec](43c03ec))
* Setting state to false ([d4a8914](d4a8914))
* structure grid system ([cbecd0b](cbecd0b))
* vuetify warnings and initilization of app ([6f3545d](6f3545d))

### Features

* Remote connection ([1a89b66](1a89b66))
* remote first time connectivity ([538a2d1](538a2d1))
* remote first time connectivity ([d038f27](d038f27))
* remote network pairing with ambianic edge ([7c297b1](7c297b1))
* Remote-access changes ([4c6b58a](4c6b58a))
@sniperadmin
Copy link
Contributor

I am having thoughts about the dynamic importing for the timeline component,.. my thoughts might be wrong, so I will try a small test and see...

@sniperadmin
Copy link
Contributor

looks like it is taking long to connect
image
I think it might be better to test it on a good internet connection (I don't have this option yet 😆 )

@ivelin
Copy link
Contributor Author

ivelin commented Jun 4, 2020 via email

@ivelin
Copy link
Contributor Author

ivelin commented Jan 25, 2021

fixed.

@ivelin ivelin closed this as completed Jan 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants