Error loading content manager after 4.6.1 upgrade

System Information
  • Strapi Version - 4.6.1:
  • Operating System - MacOS:
  • Database - Postgresql:
  • Node Version - 16.18.1:
  • NPM Version - 8.19.2:
  • Yarn Version - 1.22.19:

I have tried locally upgrading from 4.6.0 to 4.6.1. This issue was also reproducible when I deployed to test environment. The issue is that when I go to content manager, a warning box appears that an error has occurred but page doesn’t load with just a spinner staying on the screen. The only error I see in logs is console log of:
content-manager.cce6b811.chunk.js:1139 TypeError: de.cancelToken.subscribe is not a function
at main.13897e6a.js:2898:5779
at new Promise ()
at xhr (main.13897e6a.js:2898:3470)
at Be.Ie (main.13897e6a.js:2898:7014)
at async Promise.all (:1337/admin/index 0)
at async Object.f [as current] (content-manager.cce6b811.chunk.js:1139:14974)

I followed the steps in Migrate from 4.5.1+ to 4.6.1 - Strapi Developer Docs | Strapi Documentation but as we didn’t have webhooks or sizeLimit, I excluded those steps. Has anyone had similiar issues? I tried updating to more recent versions (including 4.7.1) but had same issue there.

I tried to increase log levels but have been unsuccessful so any hints on that would be appreciated. Thanks

I’m getting the same issue from upgrading from 4.39 to 4.7.0 but i followed all of the migration steps and get the same error:

content-manager.04adfde6.chunk.js:1139 TypeError: q.cancelToken.subscribe is not a function
at main.dcd03a6e.js:2982:5707
at new Promise ()
at xhr (main.dcd03a6e.js:2982:3440)
at $e.Le (main.dcd03a6e.js:2982:6911)
at async Promise.all (index 0)
at async Object.f (content-manager.04adfde6.chunk.js:1139:14974)

bump, can anyone advise?

@cflemingnsw Hey I resolved it my side by upgrading AXIOS to version 0.22 where cancelToken is deprecated. Hope this works for you

update your package.json to: (or higher if you need, I need to use an old version )

"axios": "^0.22.0",

then npm i
npm run build
and start server again

5 Likes

@jakeholcr , thanks very much… that worked for me as well… was even able to upgrade to 4.7.1 with that axios version

You’re a genius! :clap: