Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

I can't log in with the API KEY. #165

Open
tomo-local opened this issue Aug 17, 2023 · 4 comments
Open

I can't log in with the API KEY. #165

tomo-local opened this issue Aug 17, 2023 · 4 comments

Comments

@tomo-local
Copy link

tomo-local commented Aug 17, 2023

I try to log in using the API KEY, but I am not logged in.

I am asked to process the attached video.
I was able to log in without any problems on cli's end.

This is a video of the action

2023-08-18.1.33.34.mov

It seems that the following error is output when debugging.

[01:27:36.319] Bitwarden v2[Run Script] Processing complete
[01:27:36.321] Bitwarden v2[Run Script] Passing output 'Login to Bitwarden failed. Error:
/Users/tomo/.nvm/versions/node/v16.15.0/lib/node_modules/@bitwarden/cli/node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js:583 this[filesSymbol] ||= FileList.createImpl(this._globalObject); ^^^SyntaxError: Unexpected token '||=' at wrapSafe (internal/modules/cjs/loader.js:979:16) at Module._compile (internal/modules/cjs/loader.js:1027:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (/Users/tomo/.nvm/versions/node/v16.15.0/lib/node_modules/@bitwarden/cli/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js:1875:14) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)' to Conditional
[01:27:36.323] Bitwarden v2[Conditional] Processing complete

[01:27:36.325] Bitwarden v2[Conditional] Passing output 'Login to Bitwarden failed. Error:
/Users/tomo/.nvm/versions/node/v16.15.0/lib/node_modules/@bitwarden/cli/node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js:583 this[filesSymbol] ||= FileList.createImpl(this._globalObject); ^^^SyntaxError: Unexpected token '||=' at wrapSafe (internal/modules/cjs/loader.js:979:16) at Module._compile (internal/modules/cjs/loader.js:1027:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (/Users/tomo/.nvm/versions/node/v16.15.0/lib/node_modules/@bitwarden/cli/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js:1875:14) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)' to Post Notification

@tomo-local tomo-local changed the title I can't log in with the API. I can't log in with the API KEY. Aug 17, 2023
@blacs30
Copy link
Owner

blacs30 commented Aug 30, 2023

If you have the latest version of the bitwarden-cli then this is the reason I think. 2023.8.2 is currently not working with the workflow

@blacs30
Copy link
Owner

blacs30 commented Aug 31, 2023

@tomo-local Can you try the new version

https://github.com/blacs30/bitwarden-alfred-workflow/releases/tag/3.0.0

@tomo-local
Copy link
Author

tomo-local commented Sep 2, 2023

@blacs30

If you have the latest version of the bitwarden-cli then this is the reason I think. 2023.8.2 is currently not working with the workflow

Should I downgrade the version?

The same error was displayed as before.

[15:04:09.940] Bitwarden v2[Run Script] Processing complete
[15:04:09.943] Bitwarden v2[Run Script] Passing output 'Login to Bitwarden failed. Error:
/opt/homebrew/Cellar/bitwarden-cli/2023.8.2/libexec/lib/node_modules/@bitwarden/cli/node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js:583 this[filesSymbol] ||= FileList.createImpl(this._globalObject); ^^^SyntaxError: Unexpected token '||=' at wrapSafe (internal/modules/cjs/loader.js:979:16) at Module._compile (internal/modules/cjs/loader.js:1027:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (/opt/homebrew/Cellar/bitwarden-cli/2023.8.2/libexec/lib/node_modules/@bitwarden/cli/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js:1875:14) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)' to Conditional

[15:04:09.945] Bitwarden v2[Conditional] Processing complete
[15:04:09.947] Bitwarden v2[Conditional] Passing output 'Login to Bitwarden failed. Error:
/opt/homebrew/Cellar/bitwarden-cli/2023.8.2/libexec/lib/node_modules/@bitwarden/cli/node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js:583 this[filesSymbol] ||= FileList.createImpl(this._globalObject); ^^^SyntaxError: Unexpected token '||=' at wrapSafe (internal/modules/cjs/loader.js:979:16) at Module._compile (internal/modules/cjs/loader.js:1027:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (/opt/homebrew/Cellar/bitwarden-cli/2023.8.2/libexec/lib/node_modules/@bitwarden/cli/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js:1875:14) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)' to Post Notification

@tomo-local
Copy link
Author

tomo-local commented Sep 24, 2023

Hi there,
I've fixed the previous error by directly modifying the library, but it seems to have led to a different error.

:

Previous Error:

||= FileList.createImpl(this._globalObject); SyntaxError: Unexpected token '||='

This error indicates a SyntaxError related to the ||= token, suggesting a problem with the JavaScript code. The ||= operator is not supported in all JavaScript environments, so it's possible that the code you're using is not compatible with your Node.js version. To resolve this, you might need to update your code or switch to a different syntax.

Current Error:

[ERROR] ==> [internal/modules/cjs/loader.js:1122 return process.dlopen(module, path.toNamespacedPath(filename)); Error: dlopen(/Users/tomo/.nvm/versions/node/v16.20.2/lib/node_modules/@bitwarden/cli/node_modules/argon2/lib/binding/napi-v3/argon2.node, 0x0001): tried: '/Users/tomo/.nvm/versions/node/v16.20.2/lib/node_modules/@bitwarden/cli/node_modules/argon2/lib/binding/napi-v3/argon2.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/tomo/.nvm/versions/node/v16.20.2/lib/node_modules/@bitwarden/cli/node_modules/argon2/lib/binding/napi-v3/argon2.node' (no such file), '/Users/tomo/.nvm/versions/node/v16.20.2/lib/node_modules/@bitwarden/cli/node_modules/argon2/lib/binding/napi-v3/argon2.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

This error seems to be related to loading the argon2 module and indicates an architecture compatibility issue (mach-o file). It looks like the architecture of the module is not matching your system's architecture ('arm64' vs. 'x86_64'). To resolve this, you may need to reinstall the argon2 module using a version that matches your system's architecture.

If you encounter any further issues or need more specific instructions, please don't hesitate to ask. You can also provide additional details about your environment to help us assist you better.

Best regards,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants