orbstack / orbstack

Fast, light, simple Docker containers & Linux machines for macOS
https://orbstack.dev
MIT License
4.48k stars 31 forks source link

Downgrading from 1.6.0 to 1.5.1 #1181

Closed ciaranmcnulty closed 2 weeks ago

ciaranmcnulty commented 2 weeks ago

Describe the bug

I removed 1.6.0 Canary 1 via brew, then installed 1.5.1 with brew, now I get this error:

start VM: VM exited unexpectedly; logs:
panic: last-used version 3 is newer than current version 2. Downgrades are not supported; please update OrbStack [recovered]
    panic: last-used version 3 is newer than current version 2. Downgrades are not supported; please update OrbStack [recovered]
    panic: last-used version 3 is newer than current version 2. Downgrades are not supported; please update OrbStack

This implies to me that the brew remove doesn't delete some state, and the removal script could be improved?

If this isn't fixable it'd be great to know what I should manually delete to get up and running again

To Reproduce

  1. brew install orbstack (currently getting 1.5.1)
  2. (possibly needed?) open OrbStack and use it for a while
  3. Switch to canary channel and update in-app
  4. brew remove orbstack
  5. brew install orbstack
  6. Run a command like orb

Expected behavior

I'd expect the brew remove to clean the system completely and allow a clean reinstall of 1.5.1

Diagnostic report (REQUIRED)

OrbStack info: Version: 1.5.1 Commit: 4cfac15e1080617c70eb163966e1cb2009dac1c2 (v1.5.1)

System info: macOS: 14.0 (23A344) CPU: arm64, 8 cores CPU model: Apple M1 Model: MacBookPro17,1 Memory: 16 GiB

Screenshots and additional context (optional)

No response

kdrag0n commented 2 weeks ago

brew remove doesn't remove data. brew uninstall --zap does.

This is due to an incompatible upgrade in 1.6.0 but you can work around it without losing data by editing ~/.orbstack/vmstate.json and changing the version from 3 to 2.

Also, can you share more about why you're downgrading from 1.6.0 Canary? Would be great to fix any issues before it goes stable.

ciaranmcnulty commented 2 weeks ago

Thanks, deleting those files fixed the issue for me

I was only downgrading for benchmarking purposes :)

dmuriel commented 2 weeks ago

@kdrag0n I don't want to extend this issue given that it is already closed, but, I also had to downgrade to 1.5.1 because Webpack stopped working. When the step for running yarn build I noticed that it was taking a lot of time so I had to abort the build. After downgrading to 1.5.1, the build worked normally. Not sure if it is something related to Webpack, npm, but this what I can share from my dockerfile:

# Preparing Go Application Builder
FROM golang:1.21-alpine as builder

# Installing nodejs and other dependecies
RUN apk add --update nodejs-current python3 curl bash build-base

# Installing Yarn
RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s --
ENV PATH="$PATH:/root/.yarn/bin:/root/.config/yarn/global/node_modules"
RUN yarn set version berry

ADD package.json .
ADD yarn.lock .
RUN yarn install
RUN yarn build

...
kdrag0n commented 2 weeks ago

@dmuriel Please share a diagnostic report from Help > Upload Diagnostics, as well as your docker build command, in a new issue.

Also, is this --platform linux/amd64 on Apple Silicon by any chance?

dmuriel commented 2 weeks ago

Yes @kdrag0n, you are correct. I created a new issue #1186, I've put more information there.