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

update web-vault to v2024.2.2 and change color of navbar #156

Closed
wants to merge 5 commits into from

Conversation

stefan0xC
Copy link
Contributor

@stefan0xC stefan0xC commented Feb 6, 2024

new web-vault: web-v2024.2.0

I've rewritten the patch file so Vaultwarden will behave more like a self hosted instance and will only make the changes that are necessary for liberating the web-vault (and for rebranding as Vaultwarden).

I also changed the navbar background color to same as /admin #212529 because a self hosted instance defaults to #1a3b66 (instead of #175ddc):
Screenshot 2024-02-06 at 22-55-48 Vaults Vaultwarden Web

rewrite patch file so Vaultwarden will behave more like a self hosted
instance and will only make the changes that are necessary

also changes the navbar background color to same as /admin `#212529`
because a self hosted instance defaults to `#1a3b66` (`#175ddc`).
@stefan0xC
Copy link
Contributor Author

stefan0xC commented Feb 6, 2024

Just a quick warning: on my system building the web-vault seems to be scratching on some limits, i.e. I had to export NODE_OPTIONS="--max-old-space-size=8192" because webpack ran out of memory:

<--- Last few GCs --->

[4278:0x634ab271df50]    90707 ms: Scavenge 1987.4 (2062.4) -> 1984.9 (2063.9) MB, 3.6 / 0.0 ms  (average mu = 0.588, current mu = 0.294) allocation failure;
[4278:0x634ab271df50]    90723 ms: Scavenge 1989.2 (2063.9) -> 1987.7 (2083.4) MB, 12.0 / 0.0 ms  (average mu = 0.588, current mu = 0.294) allocation failure;
[4278:0x634ab271df50]    91343 ms: Mark-sweep 2002.3 (2085.1) -> 1997.0 (2100.0) MB, 606.4 / 0.0 ms  (average mu = 0.414, current mu = 0.111) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0x634ab0419ce5 node::Abort() [webpack]
 2: 0x634ab02901a4 node::OOMErrorHandler(char const*, bool) [webpack]
 3: 0x634ab061dd54 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [webpack]
 4: 0x634ab061e14b v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [webpack]
 5: 0x634ab07e8b1a  [webpack]
 6: 0x634ab080121c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [webpack]
 7: 0x634ab07db5b7 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [webpack]
 8: 0x634ab07dc5e9 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [webpack]
 9: 0x634ab07c0836 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [webpack]
10: 0x634ab0b59ba7 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [webpack]
11: 0x634ab0f6e639  [webpack]


npm ERR! Lifecycle script `build:oss:selfhost:prod` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @bitwarden/web-vault@2024.2.0
npm ERR!   at location: /home/stefan/Projects/rust/programs/bw_web_builds/web-vault/apps/web
npm ERR! Lifecycle script `dist:oss:selfhost` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @bitwarden/web-vault@2024.2.0
npm ERR!   at location: /home/stefan/Projects/rust/programs/bw_web_builds/web-vault/apps/web
FAILED: line 25, exit code 1. Press any key to exit...make: *** [Makefile:52: build] Fehler 1

Not sure if this is a general problem or not. (At least GitHub seemed to have no issues building v2024.2.0.)

@BlackDex
Copy link
Collaborator

BlackDex commented Feb 7, 2024

I see several items which we might need to address with this new version on the server side.

So we should really test this version very good.

@stefan0xC
Copy link
Contributor Author

The new web-vault version v2024.2.1 just disables the payment method banners (cf. bitwarden/clients@f1400d7) which I've already patched out, so upgrading would not make a difference.

@BlackDex
Copy link
Collaborator

BlackDex commented Feb 7, 2024

Except for people asking for the latest version 🙈.
But i agree.

@stefan0xC stefan0xC changed the title update web-vault to v2024.2.0 and change color of navbar update web-vault to v2024.2.1 and change color of navbar Feb 7, 2024
@stefan0xC
Copy link
Contributor Author

stefan0xC commented Feb 8, 2024

I've added a new patch that removes the line so that we won't forget to remove the payment method banner on a future upgrade (when they enable it again). In the future once this seems a bit more stable we might also implement the new /api/organizations/<org_uuid>/risks-subscription-failure endpoint and return a organizationRisksSubscriptionFailure object that always returns false but currently (as this is still in active development) I think that excising it seems to be the better move.

@SuperSandro2000
Copy link
Contributor

This got kinda forgotten, did it?

@stefan0xC stefan0xC changed the title update web-vault to v2024.2.1 and change color of navbar update web-vault to v2024.2.2 and change color of navbar Feb 24, 2024
@stefan0xC
Copy link
Contributor Author

Sorry, I've been a bit busy lately.

@BlackDex
Copy link
Collaborator

Sorry, I've been a bit busy lately.

np, I think it's the same for me and dani

@polyzen
Copy link

polyzen commented Feb 24, 2024

Just a quick warning: on my system building the web-vault seems to be scratching on some limits, i.e. I had to export NODE_OPTIONS="--max-old-space-size=8192" because webpack ran out of memory:

<--- Last few GCs --->

[4278:0x634ab271df50]    90707 ms: Scavenge 1987.4 (2062.4) -> 1984.9 (2063.9) MB, 3.6 / 0.0 ms  (average mu = 0.588, current mu = 0.294) allocation failure;
[4278:0x634ab271df50]    90723 ms: Scavenge 1989.2 (2063.9) -> 1987.7 (2083.4) MB, 12.0 / 0.0 ms  (average mu = 0.588, current mu = 0.294) allocation failure;
[4278:0x634ab271df50]    91343 ms: Mark-sweep 2002.3 (2085.1) -> 1997.0 (2100.0) MB, 606.4 / 0.0 ms  (average mu = 0.414, current mu = 0.111) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0x634ab0419ce5 node::Abort() [webpack]
 2: 0x634ab02901a4 node::OOMErrorHandler(char const*, bool) [webpack]
 3: 0x634ab061dd54 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [webpack]
 4: 0x634ab061e14b v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [webpack]
 5: 0x634ab07e8b1a  [webpack]
 6: 0x634ab080121c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [webpack]
 7: 0x634ab07db5b7 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [webpack]
 8: 0x634ab07dc5e9 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [webpack]
 9: 0x634ab07c0836 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [webpack]
10: 0x634ab0b59ba7 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [webpack]
11: 0x634ab0f6e639  [webpack]


npm ERR! Lifecycle script `build:oss:selfhost:prod` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @bitwarden/web-vault@2024.2.0
npm ERR!   at location: /home/stefan/Projects/rust/programs/bw_web_builds/web-vault/apps/web
npm ERR! Lifecycle script `dist:oss:selfhost` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @bitwarden/web-vault@2024.2.0
npm ERR!   at location: /home/stefan/Projects/rust/programs/bw_web_builds/web-vault/apps/web
FAILED: line 25, exit code 1. Press any key to exit...make: *** [Makefile:52: build] Fehler 1

Not sure if this is a general problem or not. (At least GitHub seemed to have no issues building v2024.2.0.)

For reference, had to use --max-old-space-size to get 2024.1.2 to build on 32-bit Arch Linux ARM under QEMU.
https://gitlab.archlinux.org/archlinux/packaging/packages/vaultwarden-web/-/commit/5a926159f75559781f5611c4a199919517de90d0
bitwarden/clients#3557 (comment)

They're still on version 2.23.0.c for their armv7 targets 💀. Not sure how to trigger a new build on their end.

@stefan0xC
Copy link
Contributor Author

closing in favor of #157

@stefan0xC stefan0xC closed this Mar 21, 2024
@stefan0xC stefan0xC deleted the update-to-v2024.2.0 branch May 18, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants