core: 'emitsOptions' error impossible to debug

Version

3.2.26 (Latest version)

Reproduction link

https://beta.deeeep.io/

Steps to reproduce

Not needed (I’m sorry for the lack of reproduction link, it’s honestly impossible to create one at the moment)

What is expected?

More detailed error log

What is actually happening?

Many of my users are reporting errors on my Vue project, and what they get on the console is multiple of the following errors:

runtime-core.esm-bundler.js?5c40:958 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'emitsOptions')
    at shouldUpdateComponent (runtime-core.esm-bundler.js?5c40:958)
    at updateComponent (runtime-core.esm-bundler.js?5c40:4448)
    at processComponent (runtime-core.esm-bundler.js?5c40:4402)
    at patch (runtime-core.esm-bundler.js?5c40:3993)
    at patchBlockChildren (runtime-core.esm-bundler.js?5c40:4307)
    at patchElement (runtime-core.esm-bundler.js?5c40:4215)
    at processElement (runtime-core.esm-bundler.js?5c40:4073)
    at patch (runtime-core.esm-bundler.js?5c40:3990)
    at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js?5c40:4608)
    at ReactiveEffect.run (reactivity.esm-bundler.js?a1e9:160)

I’m not able to reproduce the problem as it seems to happen randomly, and the error itself does not give any helpful information.

Is there any way to debug this? Some aditional “console.log” I can add somewhere to know at least what component is failing?

Thanks in advance, I’ve been stuck with this for a few days.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 23 (2 by maintainers)

Most upvoted comments

@posva Please reopen this issue and look into it. We are all stuck on this issue…

I have the same issue, only in production env, cant find the reason

I have the same issue:

<teleport to=".component-ui-config-container">
            <div></div>
</teleport>

But finally, I solved the problem:

<teleport  v-if="isLoaded" to=".component-ui-config-container">
    <div></div>
</teleport>

const isLoaded = ref(false);
onMounted(() => {
    isLoaded.value = true;
});

I had the same issue,and i fixed it by avoid use undefined properties in element-plus el-popover comonent. my code is below my content attribute has undefined value sometime;

 <el-popover placement="left" :width="400" trigger="hover" :content="scope.row.user?.branchPaths">
  <template #reference>
    <span style="cursor: pointer">
      {{ formatBranch(scope.row.user.branchPaths) }}
    </span>
  </template>
</el-popover>`

I have the same issue, only in production env, cant find the reason

After stucking on this problem two days. Finally solved it, although i dont konw the real reason. I have tried changing v-if to v-show, not works. And changed my template slot to div, not works. And then i found a strange thing is that when i leave a route path, i found the functions in the component is still working, so thats the reason why “Cannot read properties of null…” in my case , i wrote a async function in setup , just like : setup() { doSomeInit() ... } I found that when leaving the route path , the doSomeInit function will still run one time. And finally I moved it into onMounted, the problem is disapared. setup() { onMounted( () => { doSomeInit() }) ... }

can you please elaborately explain how you wrote