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

Error spam "$attrs is readonly" and "$listeners is readonly" in console with current master #3281

Closed
nickvergessen opened this issue Sep 21, 2022 · 9 comments · Fixed by nextcloud-libraries/webpack-vue-config#432
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working feature: app-navigation Related to the app-navigation component regression Regression of a previous working feature
Milestone

Comments

@nickvergessen
Copy link
Contributor

Open Talk with 7beta4:

Open Talk with master what is going to be 7beta5:

  • 💥 Huge error log for each conversation in your left sidebar
[Vue warn]: $attrs is readonly.

found in

---> <VPopperContent>
       <VPopper>
         <VDropdown>
           <NcPopover>
             <NcActions>
               <RouterLink>
                 <NcListItem>
                   <Conversation> at src/components/LeftSidebar/ConversationsList/Conversation.vue
                     <ConversationsList> at src/components/LeftSidebar/ConversationsList/ConversationsList.vue
                       <NcAppNavigation>
                         <LeftSidebar> at src/components/LeftSidebar/LeftSidebar.vue
                           <NcContent>
                             <App> at src/App.vue
                               <Root> vue.runtime.esm.js:4568
[Vue warn]: $listeners is readonly.

found in

---> <VPopperContent>
       <VPopper>
         <VDropdown>
           <NcPopover>
             <NcActions>
               <RouterLink>
                 <NcListItem>
                   <Conversation> at src/components/LeftSidebar/ConversationsList/Conversation.vue
                     <ConversationsList> at src/components/LeftSidebar/ConversationsList/ConversationsList.vue
                       <NcAppNavigation>
                         <LeftSidebar> at src/components/LeftSidebar/LeftSidebar.vue
                           <NcContent>
                             <App> at src/App.vue
                               <Root>
@nickvergessen nickvergessen added bug Something isn't working 1. to develop Accepted and waiting to be taken care of feature: app-navigation Related to the app-navigation component regression Regression of a previous working feature labels Sep 21, 2022
@nickvergessen nickvergessen added this to the 7.0.0 milestone Sep 21, 2022
@raimund-schluessler
Copy link
Contributor

Could you try this approach: #3268 (comment)

@raimund-schluessler
Copy link
Contributor

The problem is a duplication of the vue dependency which causes this warning. Adding this

webpackConfig.resolve.alias = {
    "vue$": path.resolve('./node_modules/vue')
}

to my webpack config, e.g. in Tasks fixes the issue and even reduces the bundle size, indicating the duplication is gone.
Maybe we should put this in the common webpack configuration. It seems to be necessary for vue3 anyway, see here:
https:/nextcloud/webpack-vue-config/blob/800d666f1117523481f519d7b6a15e4fe49576fc/webpack.config.js#L117-L119

@skjnldsv @marcoambrosini @vinicius73 for opinions.

@vinicius73
Copy link
Contributor

This is a good trick.
Although it not solves the root cause, it will work in the main scenarios.

@raimund-schluessler
Copy link
Contributor

Although it not solves the root cause, it will work in the main scenarios.

The question is what is the root cause. One package probably imports in a different way than simply using import Vue from 'vue' but finding which one it is, might be a pain.

@jotoeri jotoeri modified the milestones: 7.0.0, 7.0.1 Oct 12, 2022
@nickvergessen nickvergessen modified the milestones: 7.0.1, 7.0.2 Oct 25, 2022
@skjnldsv skjnldsv modified the milestones: 7.0.2, 7.1.1 Nov 16, 2022
@skjnldsv skjnldsv modified the milestones: 7.1.1, 7.2.0 Dec 6, 2022
@skjnldsv skjnldsv modified the milestones: 7.2.0, 7.2.1 Dec 16, 2022
@skjnldsv skjnldsv modified the milestones: 7.3.1, 7.4.1 Jan 11, 2023
@Pytal Pytal modified the milestones: 7.4.1, 7.6.0 Jan 20, 2023
@skjnldsv
Copy link
Contributor

skjnldsv commented Feb 2, 2023

Is this still happening?

@raimund-schluessler
Copy link
Contributor

Is this still happening?

I don't know, to be honest. I didn't see it for a while, and if I remember correctly, it only happened when mixing development builds with production builds.

But the workaround to prevent this is still necessary for the vue3 branch in my case:

webpackConfig.resolve.alias = {
    "vue$": path.resolve('./node_modules/vue')
}

@skjnldsv
Copy link
Contributor

skjnldsv commented Feb 2, 2023

But the workaround to prevent this is still necessary for the vue3 branch in my case:

webpackConfig.resolve.alias = {
    "vue$": path.resolve('./node_modules/vue')
}

Seems I also encountered this and this is the way. On the app side, not this library ofc.

@raimund-schluessler
Copy link
Contributor

But the workaround to prevent this is still necessary for the vue3 branch in my case:

webpackConfig.resolve.alias = {
    "vue$": path.resolve('./node_modules/vue')
}

Seems I also encountered this and this is the way. On the app side, not this library ofc.

Something for the shared webpack config then?

@raimund-schluessler
Copy link
Contributor

PR is in nextcloud-libraries/webpack-vue-config#432.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working feature: app-navigation Related to the app-navigation component regression Regression of a previous working feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants