Blitz: Getting `AuthenticationError` in new app after following initial blitz instructions

Created on 27 Aug 2020  路  3Comments  路  Source: blitz-js/blitz

What is the problem?

After creating brand new blitz app and following first steps from localhost:3000 main page I am getting AuthenticationError: You must be logged in to access this on localhost:3000/projects page.

Steps to Reproduce

  1. blitz new blitz-playground
  2. cd blitz-playground
  3. blitz db migrate
  4. blitz generate all project name:string
  5. blitz db migrate
  6. blitz dstart
  7. Then go to /projects

Versions

macOS Catalina | darwin-x64 | Node: v13.12.0

blitz: 0.18.0 (global)
blitz: 0.18.0 (local)

  Package manager: yarn 
  System:
    OS: macOS 10.15.6
    CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
    Memory: 9.71 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.12.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: Not Found
  npmPackages:
    @prisma/cli: 2.5.1 => 2.5.1 
    @prisma/client: 2.5.1 => 2.5.1 
    blitz: 0.18.0 => 0.18.0 
    react: 0.0.0-experimental-33c3af284 => 0.0.0-experimental-33c3af284 
    react-dom: 0.0.0-experimental-33c3af284 => 0.0.0-experimental-33c3af284 
    typescript: 3.9.7 => 3.9.7 

Other

Screenshot 2020-08-27 at 17 23 10

kinbad-experience statudone

Most helpful comment

Yeah @svobik7 you're totally right this is dumb. Here the login screen should show without the error popup.

Unfortunately this is a limitation with Next.js :( It shows this error overlay even if the error was caught by by an ErrorBoundary. Note: it only shows this overlay in development, not in production.

Anyone reading this, please go add a new comment in this Next.js discussion saying that you want this too.

All 3 comments

I think the error should not be thrown in this way but handled silently instead. Showing Login form in the background works great but error is not catched.

Yeah @svobik7 you're totally right this is dumb. Here the login screen should show without the error popup.

Unfortunately this is a limitation with Next.js :( It shows this error overlay even if the error was caught by by an ErrorBoundary. Note: it only shows this overlay in development, not in production.

Anyone reading this, please go add a new comment in this Next.js discussion saying that you want this too.

Fixed in latest blitz

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eorenstein1 picture eorenstein1  路  3Comments

aaronfulkerson picture aaronfulkerson  路  3Comments

svobik7 picture svobik7  路  3Comments

netheril96 picture netheril96  路  4Comments

markhaehnel picture markhaehnel  路  3Comments