Google Cloud Deployment problem

System Information
  • Strapi Version: 4.1.1
  • Operating System: MacOS Big Sur 11.6
  • Database: postgreSQL
  • Node Version: 14.17.6
  • NPM Version: 6.14.14
  • Yarn Version: 1.22.17

I’m following the strapi documentation exactly, and deployment itself is successful, but after registering an admin user in https://.ew.r.appspot.com/admin , I only see a spinning cursor which gives way to a blank page.

GCP shows no errors, but there is this in the (chrome) browser console:

TypeError: Cannot read properties of undefined (reading 'toggleNotification')
    at t.default (main.a784bb51.js:2:966583)
    at f (main.a784bb51.js:2:1191350)
    at s (main.a784bb51.js:2:1175533)
    at si (main.a784bb51.js:2:1945405)
    at Gu (main.a784bb51.js:2:1997702)
    at ks (main.a784bb51.js:2:1984943)
    at Ps (main.a784bb51.js:2:1984871)
    at Ss (main.a784bb51.js:2:1984734)
    at xs (main.a784bb51.js:2:1981700)
    at main.a784bb51.js:2:1931197
fu @ main.a784bb51.js:2
n.callback @ main.a784bb51.js:2
va @ main.a784bb51.js:2
bu @ main.a784bb51.js:2
Rs @ main.a784bb51.js:2
t.unstable_runWithPriority @ main.a784bb51.js:2
$o @ main.a784bb51.js:2
Ds @ main.a784bb51.js:2
xs @ main.a784bb51.js:2
(anonymous) @ main.a784bb51.js:2
t.unstable_runWithPriority @ main.a784bb51.js:2
$o @ main.a784bb51.js:2
Ko @ main.a784bb51.js:2
Xo @ main.a784bb51.js:2
Fs @ main.a784bb51.js:2
t.unstable_runWithPriority @ main.a784bb51.js:2
$o @ main.a784bb51.js:2
zs @ main.a784bb51.js:2
(anonymous) @ main.a784bb51.js:2
L @ main.a784bb51.js:2
w.port1.onmessage @ main.a784bb51.js:2
main.a784bb51.js:2 Uncaught TypeError: Cannot read properties of undefined (reading 'toggleNotification')
    at t.default (main.a784bb51.js:2:966583)
    at f (main.a784bb51.js:2:1191350)
    at s (main.a784bb51.js:2:1175533)
    at si (main.a784bb51.js:2:1945405)
    at Gu (main.a784bb51.js:2:1997702)
    at ks (main.a784bb51.js:2:1984943)
    at Ps (main.a784bb51.js:2:1984871)
    at Ss (main.a784bb51.js:2:1984734)
    at xs (main.a784bb51.js:2:1981700)
    at main.a784bb51.js:2:1931197

I’m not an experienced developer but have deployed strapi (v3 onto AWS) previously. After a day of fruitless searching for answers or reports of similar problems, I’m lost about what to do from here. Any help, much appreciated, thanks!

2 Likes

I’m having the exact same error in windows

Have the same issue.

I’ve found this issue only occurs if you use Yarn to build your projects.

If this is the case adding, adding your yarn.lock file to the .gcloudignore should resolve the issue.