Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

(node:106467) DeprecationWarning: collection.save is deprecated. Use insertOne, insertMany, updateOne, or updateMany instead. #2607

Open
reynard80 opened this issue Jan 12, 2021 · 8 comments
Labels

Comments

@reynard80
Copy link

System information

  • Have I written custom code (as opposed to using zenbot vanilla): no
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): 20.04
  • Zenbot version (commit ref, or version): 8a5792a
  • Zenbot branch: unstable
  • NodeJS version: 10
  • Exact command to reproduce (include everything): ./zenbot.sh trade --paper
  • Did I make any changes to conf-sample.js?: no

Describe the problem

When starting zenbot, I get a DepreactionWarning about collection.save. Should I use an older version of mongodb?

Source code / Error logs

(node:106467) DeprecationWarning: collection.save is deprecated. Use insertOne, insertMany, updateOne, or updateMany instead.

@DeviaVir
Copy link
Owner

Dupe of #2234 ?

@reynard80
Copy link
Author

Yes, but that issue isn't about this message despite the title.

@DeviaVir DeviaVir added bug and removed duplicate labels Jan 14, 2021
@mmdiego
Copy link
Contributor

mmdiego commented Feb 5, 2021

Duplicate of #1988 and is already fixed.

@grainz
Copy link
Contributor

grainz commented Feb 17, 2021

Duplicate of #1988 and is already fixed.

the error above is not corrected in the fix you tagged.

@mmdiego
Copy link
Contributor

mmdiego commented Feb 17, 2021

I don't see any bug described here. It only mentions a Warning message that appears somewhere. It doesn't give any kind of details and it's the same message fixed in #1988.
@grainz What are you talking about?

@grainz
Copy link
Contributor

grainz commented Feb 18, 2021

I meant to say the warning, not an error, posted above was not included in the ticket you tagged.
They are the same type of warnings that were fixed but the one posted above is not fixed.
What are you talking about @mmdiego ? You say this is a duplicate but it is not.

@Pistol-Peet
Copy link

I do receive these warnings as well. Not sure about the exact impact yet.
@james-ingold stated his fix "Replaces deprecated save calls in mongodb with replaceOne and insertOne." and it was merged into unstable end of Feb 2020. Unfortunately I do receive the warning still...
image
Version details:
nodejs/unknown,now 14.16.0-deb-1nodesource1 amd64
mongodb/focal,now 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5 amd64
Ubuntu 20.04

Despite the mentioned versions on the documentaries, is there a up-to-date recommendation?

@mmdiego
Copy link
Contributor

mmdiego commented Mar 1, 2021

There is stilll one call to save() in trade.js that wasn't changed in the previous fix, that's why the message is still appearing.
However, it won't affect functionality until it become obsolete.
I'll fix it soon if I have some time.

fgrosswig added a commit to fgrosswig/zenbot that referenced this issue Oct 11, 2021
DeviaVir pushed a commit that referenced this issue Oct 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants