#White Admin Panel Page After Today's Medusa Update - 1.20.11 V

76 messages · Page 1 of 1 (latest)

rugged compass
#

I updated Medusa JS today. The update included only a small code change—just some adjustments to the admin panel colors. After that, the admin panel stopped working completely. It only works when I rollback to the previous version or run it locally; in those cases, everything is fine and no errors appear.

However, on the Railway server, the admin panel doesn’t work at all.

My Medusa version: 1.20.11

heady loom
#

anything in console?

rugged compass
long radish
#

Hey @rugged compass
Can you also share your package.json?

rugged compass
half island
#

Same here

#

Did you find a solution ?

long radish
#

Can I get you to update the @medusajs/admin too ? To 7.1.18 ?

half island
#

I just deploy a small feature and I can get the admin working anymore

rugged compass
long radish
#

Weird I don't have this issue, can I also get you to add serve to true on the admin plugin options

rugged compass
long radish
#

We've made an update a couple months ago on the @medusajs/admin but the default value should be set to true for the serve option

#

and should be backwards compatible

half island
#

seems to work locally, i'm deploying on prod

long radish
#

but yeah keep me posted so we can try to debug this further, @rugged compass you should definitely check the dependencies used inside the node_modules folder

half island
#

still not working

long radish
half island
#

with
"@medusajs/admin": "^7.1.18"

and

  {
    resolve: "@medusajs/admin",
    /** @type {import('@medusajs/admin').PluginOptions} */
    options: {
      autoRebuild: true,
      serve: true
    },
  },
rugged compass
#

It’s exactly the same for me.
It works on localhost,
and everything broke this morning when I was making a small fix to the services.

I try use serve: true and still not working

long radish
#

(don't know how you handle deployment of course but this is the idea)

half island
#

yep

render@srv-X:~/project/src$ cat node_modules/@medusajs/admin/package.json
{
  "name": "@medusajs/admin",
  "version": "7.1.18",
  "bin": {
    "medusa-admin": "./bin/medusa-admin.js"
  },
  "main": "lib/index.js",
  "types": "lib/index.d.ts",
  "files": [
    "bin",
    "types",
    "*.js",
    "api",
    "lib",
    "loaders",
    "commands",
    "utils",
    "setup"
  ],
  "scripts": {
    "build": "tsc --build",
    "test": "jest --passWithNoTests"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/medusajs/medusa.git",
    "directory": "packages/admin"
  },
  "dependencies": {
    "@medusajs/admin-ui": "^2.1.18",
    "@rollup/plugin-alias": "5.0.0",
    "@rollup/plugin-commonjs": "24.1.0",
    "@rollup/plugin-json": "6.0.0",
    "@rollup/plugin-node-resolve": "15.0.2",
    "@rollup/plugin-replace": "5.0.2",
    "@rollup/plugin-virtual": "^3.0.1",
    "commander": "^10.0.0",
    "dotenv": "^16.4.5",
    "esbuild": "0.17.18",
    "express": "4.18.2",
    "fs-extra": "11.1.0",
    "lodash": "^4.17.21",
    "medusa-core-utils": "1.2.3",
    "rollup": "3.20.7",
    "rollup-plugin-esbuild": "5.0.0",
    "ts-dedent": "^2.2.0"
  },
  "peerDependencies": {
    "@medusajs/medusa": "^1.14.0"
  },
  "devDependencies": {
    "@medusajs/medusa": "^1.20.9",
    "@types/express": "^4.17.13",
    "typescript": "^4.9.3"
  },
  "packageManager": "yarn@3.2.1"
}
long radish
half island
#
render@srv-X:~/project/src$ ls -ali
total 820
18373142 drwxr-sr-x   1 render render   4096 Apr 24 19:50 .
18358632 drwxr-sr-x   1 render render   4096 Apr 24 19:47 ..
18373143 -rw-r--r--   1 render render    302 Apr 24 19:46 .babelrc.js
18373144 drwxr-sr-x   1 render render   4096 Apr 24 19:50 .cache
18374523 -rw-r--r--   1 render render   1616 Apr 24 19:46 .env.template
18374524 drwxr-sr-x   8 render render   4096 Apr 24 19:46 .git
18374562 drwxr-sr-x   3 render render   4096 Apr 24 19:46 .github
18374565 -rw-r--r--   1 render render    264 Apr 24 19:46 .gitignore
18374566 -rw-r--r--   1 render render      6 Apr 24 19:46 .node-version
18374567 -rw-r--r--   1 render render      6 Apr 24 19:46 .nvmrc
18374568 -rw-r--r--   1 render render     24 Apr 24 19:46 .yarnrc.yml
18374569 -rw-r--r--   1 render render    328 Apr 24 19:46 Dockerfile
18374570 -rw-r--r--   1 render render   2876 Apr 24 19:46 README.md
18699783 drwxr-sr-x   4 render render   4096 Apr 24 19:50 build
18374651 drwxr-sr-x   3 render render   4096 Apr 24 19:46 data
18374657 -rwxr-xr-x   1 render render     45 Apr 24 19:46 develop.sh
18374658 drwxr-sr-x  10 render render   4096 Apr 24 19:48 dist
18374746 -rw-r--r--   1 render render   1345 Apr 24 19:46 index.js
18374747 -rw-r--r--   1 render render   5928 Apr 24 19:46 medusa-config.js
18374748 drwxr-sr-x 968 render render  36864 Apr 24 19:48 node_modules
18403400 -rw-r--r--   1 render render   3040 Apr 24 19:46 package.json
18403401 drwxr-sr-x  11 render render   4096 Apr 24 19:46 src
18403499 -rw-r--r--   1 render render    145 Apr 24 19:46 tsconfig.admin.json
18403500 -rw-r--r--   1 render render    767 Apr 24 19:46 tsconfig.json
18403501 -rw-r--r--   1 render render    216 Apr 24 19:46 tsconfig.server.json
18403502 -rw-r--r--   1 render render     96 Apr 24 19:46 tsconfig.spec.json
18403537 drwxr-sr-x   2 render render   4096 Apr 24 19:50 uploads
18403503 -rw-r--r--   1 render render 678423 Apr 24 19:48 yarn.lock
rugged compass
#

Unfortunately, I’m not able to inspect the files because I’m using Railway app.

long radish
#

And on your white page anything that can help to troubleshoot this ? Is there something in the source page similar to what we have on the build files @half island ?

#

i'm trying to understand what could be the cause of this white page, technically it should be missing js files

rugged compass
long radish
#

Thanks @rugged compass

long radish
#

Can you guys remove the .cache and .build folders before building the admin again ? 🙌

#

I was wondering if it was related to the express router logic but I don't think so, the static files are well served

#

Now my theory is related to the cache-time and especially of the js files

#

basically I think that there is a mismatch between the files served and the cached ones, due to the upgrade and .cache/admin-build-manifest.json but I'll investigate a bit more and I'm trying to find a way to reproduce this issue

rugged compass
#

@long radish The thing is, I’m using Railway, and I’m not sure if I can just delete that folder manually.
Also, Railway builds a fresh image every time, so theoretically the .cache and .build folders shouldn’t persist between builds.

half island
#

Same here, I'm using Render and I deployed with the "Clear build cache & deploy".

long radish
#

just sharing my thoughts right now and what I've done yesterday evening

I encountered the same problem yesterday, but I don't know how I've managed to reproduce this bug? I've just played around with the dependencies
I also noticed that calls to the files were logged in the terminal, like api requests, as if the static files linked to the admin weren't served/detected from the express router

So I debugged the routes and middleware registered at the time of the production launch within the Medusa loaders, and I saw that the static routes linked to the admin were indeed registered in the "Medusa global router"

I looked into the cache hypothesis, because last night I saw that there were these headers linked to the cache control + a linked build manifest. So this is why I wondered if it wasn't a cache issue that was loading an old version of the js file but I don't think it is the issue since the js file is always resolved from the server with a 200 and with some content inside, on top of this it's a complete js file

Right now, I'm trying to check if the upgrade didn't introduced some sort of issue when building the files for production, since @half island said that it was working on dev but not prod 🤔

misty wigeon
#

I'm facing same issue of blank page in medusa admin panel since last evening after I have deployed my changes. Does any one find any solution for this problem? I need to fix this ASAP.

nimble venture
#

same issue here.

rugged compass
#

We are waiting for a solution from @Adil
@misty wigeon
@nimble venture

long radish
#

So far it's hard to reproduce the issue on my side, can you share a private repo @rugged compass or @half island

#

khamerling-potts
In case it helps, node's recent patch v22.15.0 was the culprit for me. Had a very similar issue today where medusa itself was fine but the admin screen was white after rebuild. I downgraded to the previous version to fix it temporarily.

that's an interesting take here, maybe there is some issues with the dependencies and how they are resolved using node, I'll try with some different package managers and node versions, because I can't reproduce the issue on a fresh install too (node 22 ; yarn 1.22.22)

#

seems very tricky

#

FINALLY I'VE MANAGED TO REPRODUCE IT

#

I've tried using Node 18 and NPM install

#

white screen immediately

#

same goes for yarn@1.22.22

nimble venture
# long radish white screen immediately

i'm running node v22.13.0 and yarn v1.22.19.
when using old yarn.lock file everything works. when deleting yarn.lock and reinstalling without any other code changes, i'm getting the white screen.

long radish
#

I’m investigating, I think it might be related to Vite but not sure, need more time to debug on my side 🙌

long radish
nimble venture
#

seems that the swc/* dependencies cause the issue. still not sure which one exactly but reverting to old dep resolves the issue.

long radish
#

Ok so indeed the issue is with the latest release around @swc/core

#

So far I've tried :

  "resolutions": {
    "glob": "^7.1.6",
    "@swc/core": "1.11.21" // ✅ Force this to 1.11.21, as the latest version of `@swc/core` 1.11.22 causes the white screen issue on our side 
  } 
#

If you can keep me posted @half island @rugged compass 🙌

#

I've tried with @swc/core@1.10.18 and no issues too

#

So I don't know why this causes some issues but thanks @nimble venture for pointing this out 🙌

misty wigeon
#

@long radish what's the solution? how can we fix this issue for our domain?

long radish
#

I've just added a comment on the GitHub Issue

long radish
#

Can you try @misty wigeon and tell me if that solves the issue ?

misty wigeon
#

Yes, sure. I'm trying this solution.

long radish
#

I've even tried with 1.11.21 and it works

#

I think their latest update from 3 days ago has introduced some breaking changes for us

#

TIL a lot of things around dependencies and swc 😆

nimble venture
long radish
#

From what I've seen, SWC is used around vite/webpack ?

nimble venture
#

Webpack it is...

long radish
#

I really wonder what is the change that have introduced this issue so we can point it out either to medusa or swc team

long radish
#

I think we could also make a new page on the "documentation" side to warn devs that they need to pin/override the @swc/core version, because currently in the codebase I see that only "this file" is where we actually use SWC, but I have the impression that it's more internal on the SWC side than on the Medusa side, I may be wrong

misty wigeon