TypeError: params.hasOwnProperty is not a function, error



  • Guys I'm having this error in the logs more times:
    I don't what's that, I was checking in the log because sometimes when I publish articles, it "automatically" changes category...

    Oct 19 19:57:48 nodebb[24281]: 19/10 19:57 [29724] - error: TypeError: params.hasOwnProperty is not a function
    Oct 19 19:57:48 nodebb[24281]:     at _checkSignatureUsingProvider (/var/nodebb/node_modules/openid/openid.js:1148:15)
    Oct 19 19:57:48 nodebb[24281]:     at _checkSignature (/var/nodebb/node_modules/openid/openid.js:1083:5)
    Oct 19 19:57:48 nodebb[24281]:     at _verifyAssertionAgainstProviders (/var/nodebb/node_modules/openid/openid.js:1047:12)
    Oct 19 19:57:48 nodebb[24281]:     at /var/nodebb/node_modules/openid/openid.js:1012:7
    Oct 19 19:57:48 nodebb[24281]:     at /var/nodebb/node_modules/openid/openid.js:545:7
    Oct 19 19:57:48 nodebb[24281]:     at /var/nodebb/node_modules/openid/openid.js:411:16
    Oct 19 19:57:48 nodebb[24281]:     at Request._callback (/var/nodebb/node_modules/openid/openid.js:174:7)
    Oct 19 19:57:48 nodebb[24281]:     at Request.self.callback (/var/nodebb/node_modules/request/request.js:187:22)
    Oct 19 19:57:48 nodebb[24281]:     at emitTwo (events.js:106:13)
    Oct 19 19:57:48  nodebb[24281]:     at Request.emit (events.js:191:7)
    Oct 19 19:57:48  nodebb[24281]:     at Request.<anonymous> (/var/nodebb/node_modules/request/request.js:1044:10)
    Oct 19 19:57:48  nodebb[24281]:     at emitOne (events.js:96:13)
    Oct 19 19:57:48 nodebb[24281]:     at Request.emit (events.js:188:7)
    Oct 19 19:57:48  nodebb[24281]:     at IncomingMessage.<anonymous> (/var/nodebb/node_modules/request/request.js:965:12)
    Oct 19 19:57:48  nodebb[24281]:     at emitNone (events.js:91:20)
    Oct 19 19:57:48 nodebb[24281]:     at IncomingMessage.emit (events.js:185:7)
    Oct 19 19:57:48 nodebb[24281]: TypeError: params.hasOwnProperty is not a function
    Oct 19 19:57:48 nodebb[24281]:     at _checkSignatureUsingProvider (/var/nodebb/node_modules/openid/openid.js:1148:15)
    Oct 19 19:57:48 nodebb[24281]:     at _checkSignature (/var/nodebb/node_modules/openid/openid.js:1083:5)
    Oct 19 19:57:48 nodebb[24281]:     at _verifyAssertionAgainstProviders (/var/nodebb/node_modules/openid/openid.js:1047:12)
    Oct 19 19:57:48 nodebb[24281]:     at /var/nodebb/node_modules/openid/openid.js:1012:7
    Oct 19 19:57:48 nodebb[24281]:     at /var/nodebb/node_modules/openid/openid.js:545:7
    Oct 19 19:57:48 nodebb[24281]:     at /var/nodebb/node_modules/openid/openid.js:411:16
    Oct 19 19:57:48 nodebb[24281]:     at Request._callback (/var/nodebb/node_modules/openid/openid.js:174:7)
    Oct 19 19:57:48 nodebb[24281]:     at Request.self.callback (/var/nodebb/node_modules/request/request.js:187:22)
    Oct 19 19:57:48 nodebb[24281]:     at emitTwo (events.js:106:13)
    Oct 19 19:57:48 nodebb[24281]:     at Request.emit (events.js:191:7)
    Oct 19 19:57:48 nodebb[24281]:     at Request.<anonymous> (/var/nodebb/node_modules/request/request.js:1044:10)
    Oct 19 19:57:48 nodebb[24281]:     at emitOne (events.js:96:13)
    Oct 19 19:57:48 nodebb[24281]:     at Request.emit (events.js:188:7)
    Oct 19 19:57:48 nodebb[24281]:     at IncomingMessage.<anonymous> (/var/nodebb/node_modules/request/request.js:965:12)
    Oct 19 19:57:48 nodebb[24281]:     at emitNone (events.js:91:20)
    Oct 19 19:57:48 nodebb[24281]:     at IncomingMessage.emit (events.js:185:7)
    

    And, I'm getting also this error:

    Oct 19 17:06:39 nodebb[24281]: This is converted to a "null" string now and will return an error from v.3.0 on.
    Oct 19 17:06:39 nodebb[24281]: Please handle this in your code to make sure everything works as you intended it to.
    

  • Plugin & Theme Dev

    @Giggiux are you running NodeBB v1.2.1? What version of the composer are you using?

    npm ls nodebb-plugin-composer-default to get composer version



  • @pichalite

    nodebb@1.2.1 /var/nodebb
    ā””ā”€ā”€ nodebb-plugin-composer-default@4.2.7 
    

    There is a nice way to update all plugins?


  • Plugin & Theme Dev

    @Giggiux nodebb v1.x.x branch has been updated with a newer version of the composer plugin. The version you have has a bug. Pull latest and run ./nodebb upgrade



  • @pichalite I hope it fixes this error :) Let you know!

    Just to know: How can I update al npm packages to the latest version?


  • Plugin & Theme Dev

    @Giggiux when you say npm packages... do you mean NodeBB dependencies or plugins?



  • @pichalite plugins, I think that dependencies are updated with the ./nodebb upgrade right?


  • Plugin & Theme Dev

    @Giggiux ./nodebb upgrade will also prompt you for updating plugins if they have a new version that is compatible with your NodeBB version.



  • @pichalite mhm strange, because I had to install nodebb-plugin-youtube-lite from scratch (with the GitHub repo) even after updating nodebb ^^

    So the ./nodebb upgrade looks into node_modules or in the package.json?

    Also it update versions in the package.json too?


  • Community Rep

    @Giggiux NPM and NodeBB will never update a git repo. If you cloned the repo, you must update the repo manually using git pull in the repo directory.


  • Plugin & Theme Dev

    @Giggiux nothing strange here... as I said in my previous post, NodeBB only prompts plugin upgrades if there is a compatible version.

    Looking at nodebb-plugin-youtube-lite it's not set to be compatible with NodeBB v1.x.x

    https://github.com/a5mith/nodebb-plugin-youtube-lite/blob/master/package.json#L5



  • @yariplus Even if I do install it with npm?
    @pichalite Oh, wow didn't see that. BTW the plugin works perfectly šŸ˜‚

    Thanks a lot guys!



  • @pichalite Is 4.2.9 the latest one? Ever since we upgraded to 1.2.1, now 1.2.2 Iframely is not working properly. Some links will not embed.


  • Plugin & Theme Dev

    @torn2 said in TypeError: params.hasOwnProperty is not a function, error:

    Is 4.2.9 the latest one?

    no it's not but that's the latest that can work with NodeBB v1.x.x

    @torn2 said in TypeError: params.hasOwnProperty is not a function, error:

    Ever since we upgraded to 1.2.1, now 1.2.2

    There is no 1.2.2 by the way... you are using a weekly snapshot of master. Not recommended for production unless you are okay dealing with bugs.



  • @pichalite If I do ./nodebb upgrade it doesn't upgrade composer. It stays at 4.2.7?


  • Plugin & Theme Dev

    @torn2 that's because your package.json has 4.2.7 for composer. Run npm i nodebb-plugin-composer-default@4.2.9 to install v4.2.9



  • @pichalite I get this?

    nodebb@1.2.1 /root/nodebb
    ā””ā”€ā”€ nodebb-plugin-composer-default@4.2.9 invalid


  • Plugin & Theme Dev

    @torn2 corrected plugin name.... npm i nodebb-plugin-composer-default@4.2.9 works for me



  • @pichalite Yea, I entered it with default at the end when I noticed it would not work. When I entered it correctly that one gave an error. It says invalid when I enter it with the correct name. Does it have to be 4.2.11 instead? When I do npm outdated it says the new version is 4.2.11?



  • guys, still getting this error :S

    Oct 22 21:03:33 nodebb[11163]: 22/10 21:03 [24687] - error: TypeError: params.hasOwnProperty is not a function
    Oct 22 21:03:33 nodebb[11163]:     at _checkSignatureUsingProvider (/var/nodebb/node_modules/openid/openid.js:1148:15)
    Oct 22 21:03:33 nodebb[11163]:     at _checkSignature (/var/nodebb/node_modules/openid/openid.js:1083:5)
    Oct 22 21:03:33 nodebb[11163]:     at _verifyAssertionAgainstProviders (/var/nodebb/node_modules/openid/openid.js:1047:12)
    Oct 22 21:03:33 nodebb[11163]:     at /var/nodebb/node_modules/openid/openid.js:1012:7
    Oct 22 21:03:33 nodebb[11163]:     at /var/nodebb/node_modules/openid/openid.js:545:7
    Oct 22 21:03:33 nodebb[11163]:     at /var/nodebb/node_modules/openid/openid.js:411:16
    Oct 22 21:03:33 nodebb[11163]:     at Request._callback (/var/nodebb/node_modules/openid/openid.js:174:7)
    Oct 22 21:03:33 nodebb[11163]:     at Request.self.callback (/var/nodebb/node_modules/request/request.js:187:22)
    Oct 22 21:03:33 nodebb[11163]:     at emitTwo (events.js:106:13)
    Oct 22 21:03:33 nodebb[11163]:     at Request.emit (events.js:191:7)
    Oct 22 21:03:33 nodebb[11163]:     at Request.<anonymous> (/var/nodebb/node_modules/request/request.js:1048:10)
    Oct 22 21:03:33 nodebb[11163]:     at emitOne (events.js:96:13)
    Oct 22 21:03:33 nodebb[11163]:     at Request.emit (events.js:188:7)
    Oct 22 21:03:33 nodebb[11163]:     at IncomingMessage.<anonymous> (/var/nodebb/node_modules/request/request.js:969:12)
    Oct 22 21:03:33 nodebb[11163]:     at emitNone (events.js:91:20)
    Oct 22 21:03:33 nodebb[11163]:     at IncomingMessage.emit (events.js:185:7)
    Oct 22 21:03:33 nodebb[11163]: TypeError: params.hasOwnProperty is not a function
    Oct 22 21:03:33 nodebb[11163]:     at _checkSignatureUsingProvider (/var/nodebb/node_modules/openid/openid.js:1148:15)
    Oct 22 21:03:33 nodebb[11163]:     at _checkSignature (/var/nodebb/node_modules/openid/openid.js:1083:5)
    Oct 22 21:03:33 nodebb[11163]:     at _verifyAssertionAgainstProviders (/var/nodebb/node_modules/openid/openid.js:1047:12)
    Oct 22 21:03:33 nodebb[11163]:     at /var/nodebb/node_modules/openid/openid.js:1012:7
    Oct 22 21:03:33 nodebb[11163]:     at /var/nodebb/node_modules/openid/openid.js:545:7
    Oct 22 21:03:33 nodebb[11163]:     at /var/nodebb/node_modules/openid/openid.js:411:16
    Oct 22 21:03:33 nodebb[11163]:     at Request._callback (/var/nodebb/node_modules/openid/openid.js:174:7)
    Oct 22 21:03:33 nodebb[11163]:     at Request.self.callback (/var/nodebb/node_modules/request/request.js:187:22)
    Oct 22 21:03:33 nodebb[11163]:     at emitTwo (events.js:106:13)
    Oct 22 21:03:33 nodebb[11163]:     at Request.emit (events.js:191:7)
    Oct 22 21:03:33 nodebb[11163]:     at Request.<anonymous> (/var/nodebb/node_modules/request/request.js:1048:10)
    Oct 22 21:03:33 nodebb[11163]:     at emitOne (events.js:96:13)
    Oct 22 21:03:33 nodebb[11163]:     at Request.emit (events.js:188:7)
    Oct 22 21:03:33 nodebb[11163]:     at IncomingMessage.<anonymous> (/var/nodebb/node_modules/request/request.js:969:12)
    Oct 22 21:03:33 nodebb[11163]:     at emitNone (events.js:91:20)
    Oct 22 21:03:33 nodebb[11163]:     at IncomingMessage.emit (events.js:185:7)
    

    Is that because I have

    nodebb@1.2.1 /var/nodebb
    ā””ā”€ā”€ nodebb-plugin-composer-default@4.2.11 
    

    version 4.2.11 instead of 4.2.9?


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.