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

error when trying to build bit better - net framework #61

Closed
robina80 opened this issue Apr 2, 2020 · 14 comments
Closed

error when trying to build bit better - net framework #61

robina80 opened this issue Apr 2, 2020 · 14 comments

Comments

@robina80
Copy link

robina80 commented Apr 2, 2020

hi all,

so ive installed the net framework 3.1 using this how to guide

https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1804

but when i build bitbetter i get this error message

  • dotnet /bitBetter/bitBetter.dll
    It was not possible to find any compatible framework version
    The specified framework 'Microsoft.NETCore.App', version '3.1.0' was not found.

but when i check my version i have 3.1

root@lon-c-bw:/bitwarden/bwdata/BitBetter# dotnet --version
3.1.201

am i missing something here?

thanks,
rob

@robina80
Copy link
Author

robina80 commented Apr 2, 2020

shall i delete the directory ie

/usr/share/dotnet

and try a re-install using the how to guide again?

@robina80
Copy link
Author

robina80 commented Apr 2, 2020

as you can see i have the sdk and runtime, i just dont get why this is happening

root@lon-c-bw:/bitwarden/bwdata/BitBetter# dotnet --list-sdks
3.1.201 [/root/dotnet/sdk]
root@lon-c-bw:/bitwarden/bwdata/BitBetter# dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.3 [/root/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.3 [/root/dotnet/shared/Microsoft.NETCore.App]
root@lon-c-bw:/bitwarden/bwdata/BitBetter#

@JeffAlyanak
Copy link
Collaborator

Hi @robina80 The dotnet build happens inside a container. You don't need to install dotnet stuff on your host machine.

The error you seem to be having was in issue we have recently patched. Can you confirm that you're using the latest commit faf7833?

@robina80
Copy link
Author

robina80 commented Apr 3, 2020

When you say commit, do you mean the latest version of bitbetter

@JeffAlyanak
Copy link
Collaborator

JeffAlyanak commented Apr 3, 2020

@robina80 If you're unsure about what a commit is, your safest bet is to just remove the copy of bitbetter you have and download the latest version:

https://github.com/jakeswenson/BitBetter/archive/master.zip

If you do know what a commit is and have git installed on your computer, simply run git log to see the latest commits in your local copy of the repo and confirm it's faf7833.

@robina80
Copy link
Author

robina80 commented Apr 3, 2020

mmm... i deleted the dir BitBetter and when running the build again i get the same errors

EDIT, just saw its a master zip, hang on il give this a try

@robina80
Copy link
Author

robina80 commented Apr 3, 2020

no the master copy didnt work, when i build it, im getting the same error

@JeffAlyanak
Copy link
Collaborator

Try deleting the docker images/containers before you rebuild them.

@robina80
Copy link
Author

robina80 commented Apr 3, 2020

yeah thats wht i did deleted the microsfot sdk 2.1 as when i did a docker images i saw 3.1 and 2.1, so i deleted 2.1

@JeffAlyanak
Copy link
Collaborator

Can you just confirm the output of each of these commands:

docker ps
docker image ls
docker container ls

@nmdemarco
Copy link

nmdemarco commented Apr 3, 2020

I'm having the same troubles. We're farther than robina80, but not back up yet.

Listed the BitBetter Docker images
# docker image ls

Deleted the BitBetter Docker images
# docker image rm <for each BitBetter image and for the Microsoft dotnet SDK images>

Rerun ./BitBetter/src/build.sh

@robina80
Copy link
Author

robina80 commented Apr 4, 2020

What I did was install a brand new server Ubuntu 1804, once did that I installed sdk core via this

https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1804

Mkdir /bitwarden/bwdata

Cd /bitwarden/bwdata

git clone https://github.com/jakeswenson/BitBetter.git

/bitwarden/bwdata/BitBetter/build.sh

and I got no errors

Once I built it I then copied my old bitwarden files in my /bitwarden/bwdata folder

Then ran this to get it going

docker-compose -f ./docker/docker-compose.yml up -d

I obviously changed the path to my docker compose yml file

You obviously need to install docker and docker compose on the server

and then run this script i made to install all the bitwarden styuff

#!/bin/bash

mkdir /dockers

cd /dockers

docker pull bitwarden/web
docker save bitwarden/web:latest > bitwarden.web:latest.tar
docker load < bitwarden.web:latest.tar
docker pull bitwarden/mssql
docker save bitwarden/mssql:latest > bitwarden.mssql:latest.tar
docker load < bitwarden.mssql:latest.tar
docker pull bitwarden/nginx
docker save bitwarden/nginx:latest > bitwarden.nginx:latest.tar
docker load < bitwarden.nginx:latest.tar
docker pull bitwarden/admin
docker save bitwarden/admin:latest > bitwarden.admin:latest.tar
docker load < bitwarden.admin:latest.tar
docker pull bitwarden/events
docker save bitwarden/events:latest > bitwarden.events:latest.tar
docker load < bitwarden.events:latest.tar
docker pull bitwarden/notifications
docker save bitwarden/notifications:latest > bitwarden.notifications:latest.tar
docker load < bitwarden.notifications:latest.tar
docker pull bitwarden/icons
docker save bitwarden/icons:latest > bitwarden.icons:latest.tar
docker load < bitwarden.icons:latest.tar
docker pull bitwarden/attachments
docker save bitwarden/attachments:latest > bitwarden.attachments:latest.tar
docker load < bitwarden.attachments:latest.tar
docker pull bitwarden/identity
docker save bitwarden/identity:latest > bitwarden.identity:latest.tar
docker load < bitwarden.identity:latest.tar
docker pull bitwarden/api
docker save bitwarden/api:latest > bitwarden.api:latest.tar
docker load < bitwarden.api:latest.tar
docker pull bitwarden/setup
docker save bitwarden/setup:latest > bitwarden.setup:latest.tar
docker load < bitwarden.setup:latest.tar
docker pull bitwarden/server
docker save bitwarden/server:latest > bitwarden.server:latest.tar
docker load < bitwarden.server:latest.tar

@JeffAlyanak
Copy link
Collaborator

JeffAlyanak commented Apr 4, 2020

@robina80 You don't need the SDK on your host machine at all. The license generator is built entirely inside a container.

It's hard to tell exactly what was going wrong, but my best guess is that you still had an outdated docker container or image that wasn't being rebuilt and when running the build process for the license generator the out-of-date image was being used.

Sounds like you've gotten this solved now, though?

@robina80
Copy link
Author

robina80 commented Apr 4, 2020

thanks Jeff,

i then realised when i did a docker images bitbetter api license gen and identity was running so maybe if i removed them it would had worked

@robina80 robina80 closed this as completed Apr 4, 2020
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

No branches or pull requests

3 participants