ghettovoice / vuelayers

Web map Vue components with the power of OpenLayers
https://vuelayers.github.io/
MIT License
682 stars 230 forks source link

ol lifecycle error #461

Closed scadergit closed 2 years ago

scadergit commented 2 years ago

Getting the following error after upgrading to VL 0.12.0-rc26 (which bumped OL to 6.9.0). I attempted to review the previous lifecycle issue, but that pull request had quite a few changes. Would this be similar? If related, we use v-else making v-show not possible. I haven't been able to identify the exact component yet. I'll keep looking into it, but haven't dealt with this aspect of OpenLayers yet.

https://github.com/ghettovoice/vuelayers/blob/d0aca44d0af12c4561962b58dfd293f191c12dbd/src/mixins/ol-cmp.js#L765

image

scadergit commented 2 years ago

So the component id makes it obvious this is affecting the VL view component, but oddly the uuid doens't match up to the vue inspector. You'd think they would be the same? Not sure why it would ever create more than one OL View component.

image

image

scadergit commented 2 years ago

Turns out the id in every error is the id of the VLMap component, which I find interesting as vmName implies it would have been the VLView component.

ghettovoice commented 2 years ago

Hello @scadergit , can you dump here a some simplified code sample of your app?

I'm trying to reproduce this issue and need to understand what lead to it. As I see from your first comment, you are using v-else somewhere. Is it conditional render of vl-map component?

In my local test demo toggle the vl-map with v-show don't trigger this error. So I need more info to find out a reason

wendellwt commented 2 years ago

I had the same issue with the "ol object lifecycle canceled" and was trying to help you, but the problem went away. All I did was make an entire copy of the directory, and I did not get that error. The specific steps were:

$ cd orig_tree
$ tar cvf - * | ( cd ../no_lifecycle_error ; tar xvf - )
$ cd ../no_lifecycle_error/vuelayers_v12/
$ npm run serve

and in another window:

$ cd no_lifecycle_error/vuelayers_v12/src
$ code .

Running what seemed to be the exact same code from the no_lifecycle_error/vuelayers_v12 directory ran fine. Running from the orig_tree/vuelayers_v12 gave the error. Switching back and forth kept giving the same results (the error always happened when running from orig_tree, and always did not happen when running from no_lifecycle_error tree).

Sorry, but I was not able to reproduce the error, but I was able to at least make it go away.

ghettovoice commented 2 years ago

Hmm, interesting... It's a mystery

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.