Slice-machine error

I was setting up my project, following Prismic instructions, which I got from my repository. It went well, until I received this message in my terminal: a login link to click. I clicked it and got this: "It looks like you are logging in from your terminal, but something has gone wrong." I have tried to log in customarily on the browser, but didn’t get away with this error. Kindly guide me on this matter.

1 Like

Hey @Muzamil,

Welcome to the community! Are you using Chrome by any chance? There's a new feature which blocks access to local network resources (such as http://localhost:9999). Once enabled for prismic.io, Slice Machine works again:

Have a look and let me know if that solves it!

Describe your question/issue in detail

I’m trying to login to Prismic from slicemachine, but keep getting an error message saying that something’s gone wrong when trying to login through the terminal. I am however already authenticated to the Prismic UI.

What steps have you taken to resolve this issue already?

  • Updating slice-machine-ui package
  • prismic logout followed by prismic login

Errors

Error message visible in the screenshot.
The dev console shows that the connection is refused with a CORS error.

Access to fetch at 'http://localhost:9999/api/auth' from origin 'https://prismic.io' has been blocked by CORS policy: Permission was denied for this request to access the `unknown` address space.Understand this error host-network-events.js:1  

POST http://localhost:9999/api/auth net::ERR_FAILED


Package.json file

{
  "name": "site-next",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "dev": "next dev --turbopack",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "lint:fix": "next lint --fix",
    "slicemachine": "start-slicemachine",
    "deploy": "./tools/scripts/deploy-production"
  },
  "dependencies": {
    "@hookform/resolvers": "3.1.0",
    "@kodingdotninja/use-tailwind-breakpoint": "^1.0.0",
    "@prismicio/client": "^7.20.1",
    "@prismicio/next": "^1.7.2",
    "@prismicio/react": "2.9.2",
    "axios": "1.12.0",
    "fathom-client": "^3.7.2",
    "next": "15.5.2",
    "posthog-js": "^1.261.6",
    "react": "19.1.1",
    "react-dom": "19.1.1",
    "react-hook-form": "^7.62.0",
    "swiper": "^11.2.10",
    "swr": "^2.3.6",
    "tailwind-merge": "^2.3.0",
    "yup": "^1.7.0"
  },
  "devDependencies": {
    "@slicemachine/adapter-next": "^0.3.83",
    "@types/node": "^20.12.13",
    "@types/react": "19.1.12",
    "@types/react-dom": "19.1.9",
    "@typescript-eslint/eslint-plugin": "7.11.0",
    "@typescript-eslint/parser": "7.11.0",
    "autoprefixer": "^10.4.21",
    "cssnano": "^7.1.1",
    "eslint": "8.56.0",
    "eslint-config-airbnb": "^19.0.4",
    "eslint-config-next": "15.5.2",
    "eslint-config-prettier": "^9.1.0",
    "eslint-import-resolver-alias": "^1.1.2",
    "eslint-import-resolver-typescript": "^3.5.5",
    "eslint-plugin-import": "^2.27.5",
    "eslint-plugin-prettier": "^5.5.4",
    "postcss": "^8.5.6",
    "prettier": "^3.6.2",
    "prettier-plugin-tailwindcss": "^0.6.14",
    "slice-machine-ui": "^2.19.1",
    "tailwindcss": "^3.3.2",
    "type-fest": "^4.41.0",
    "typescript": "^5.9.2"
  },
  "overrides": {
    "@types/react": "19.1.12",
    "@types/react-dom": "19.1.9"
  }
}

Steps to reproduce

  • npm run slicemachine
  • Click the Login required link in the top left of slicemachine
  • Input credentials to Prismic

Or

  • prismic login from terminal

Hey @samir.fors,

Have a look at this forum reply, it should solve it for you: Slice-machine error - #2 by Ezekiel!

Hi @Ezekiel Yes, perfect. That solved the issue, thank you!

1 Like