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

Deprecation Warning for punycode Module and Sync Command Failure #11075

Open
1 task done
valorisa opened this issue Sep 16, 2024 · 2 comments
Open
1 task done

Deprecation Warning for punycode Module and Sync Command Failure #11075

valorisa opened this issue Sep 16, 2024 · 2 comments
Labels
bug cli CLI Application

Comments

@valorisa
Copy link

valorisa commented Sep 16, 2024

Steps To Reproduce

  1. Open a terminal.

  2. Run the bw sync command :

    bw sync

  3. Observe the following deprecation warning and error in the terminal output:

Deprecation Warning

(node:11846) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    at node:punycode:3:9
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:399:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:338:10)
    at loadBuiltinModule (node:internal/modules/helpers:108:7)
    at Module._load (node:internal/modules/cjs/loader:1099:17)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)
    at require (node:internal/modules/helpers:135:16)
    at Object.<anonymous> (/opt/homebrew/Cellar/bitwarden-cli/2024.8.2/libexec/lib/node_modules/@bitwarden/cli/node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js:2:18)

TypeError

/opt/homebrew/Cellar/bitwarden-cli/2024.8.2/libexec/lib/node_modules/@bitwarden/cli/build/bw.js:19572
                return Response.error("Syncing failed: " + e.toString());
                                                             ^


TypeError: Cannot read properties of null (reading 'toString')
    at SyncCommand.<anonymous> (/opt/homebrew/Cellar/bitwarden-cli/2024.8.2/libexec/lib/node_modules/@bitwarden/cli/build/bw.js:19572:62)
    at Generator.throw (<anonymous>)
    at rejected (/opt/homebrew/Cellar/bitwarden-cli/2024.8.2/libexec/lib/node_modules/@bitwarden/cli/build/bw.js:19547:65)

Expected Behavior

The Bitwarden CLI should run without displaying deprecation warnings or errors, and the bw sync command should execute successfully.

Actual Behavior

The Bitwarden CLI runs but displays a deprecation warning for the punycode module and a TypeError that causes the bw sync command to fail.

Screenshots or Videos

Capture d’écran 2024-09-16 à 11 36 31

Additional Context

Operating System: macOS 15.0
Node.js Version: v22.8.0
Bitwarden CLI Version: 2024.8.2
Installation Method: Homebrew (`brew install bitwarden-cli`)

Additional Information

I have tried updating the Bitwarden CLI using Homebrew:

brew upgrade bitwarden-cli

However, the issues persist. I believe the deprecation warning is coming from a dependency (node-fetch) used by the Bitwarden CLI.

Possible Solutions :

  1. Update Dependencies: Ensure that all dependencies, including node-fetch, are up to date and do not rely on the deprecated punycode module.
  2. Fix Null Value: Investigate and fix the null value issue in the SyncCommand that is causing the TypeError.

Conclusion

I would appreciate it if these issues could be addressed in a future release of the Bitwarden CLI. Thank you for your attention to this matter.

Operating System

macOS

Operating System Version

ProductName : macOS
ProductVersion : 15.0
BuildVersion : 24A335

Shell

Zsh

Build Version

2024.8.2

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@valorisa valorisa added bug cli CLI Application labels Sep 16, 2024
@djsmith85
Copy link
Contributor

Hi @valorisa , the first issue (punycode) has previously been reported with #6689

@valorisa
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cli CLI Application
Projects
None yet
Development

No branches or pull requests

2 participants