Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error 404 when trying to create a new product (Sales channel not found) #10110

Open
Paquito86 opened this issue Nov 15, 2024 · 0 comments

Comments

@Paquito86
Copy link

Paquito86 commented Nov 15, 2024

Package.json file

{
  "name": "medusa-starter-default",
  "version": "0.0.1",
  "description": "A starter for Medusa projects.",
  "author": "Medusa (https://medusajs.com)",
  "license": "MIT",
  "keywords": [
    "sqlite",
    "postgres",
    "typescript",
    "ecommerce",
    "headless",
    "medusa"
  ],
  "scripts": {
    "build": "medusa build",
    "seed": "medusa exec ./src/scripts/seed.ts",
    "start": "medusa start",
    "dev": "medusa develop",
    "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit",
    "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit",
    "test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit"
  },
  "dependencies": {
    "@medusajs/admin-sdk": "latest",
    "@medusajs/cli": "latest",
    "@medusajs/framework": "latest",
    "@medusajs/medusa": "latest",
    "@mikro-orm/core": "5.9.7",
    "@mikro-orm/knex": "5.9.7",
    "@mikro-orm/migrations": "5.9.7",
    "@mikro-orm/postgresql": "5.9.7",
    "awilix": "^8.0.1",
    "pg": "^8.13.0"
  },
  "devDependencies": {
    "@medusajs/test-utils": "latest",
    "@mikro-orm/cli": "5.9.7",
    "@swc/core": "1.5.7",
    "@swc/jest": "^0.2.36",
    "@types/jest": "^29.5.13",
    "@types/node": "^20.0.0",
    "@types/react": "^18.3.2",
    "@types/react-dom": "^18.2.25",
    "jest": "^29.7.0",
    "prop-types": "^15.8.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "ts-node": "^10.9.2",
    "typescript": "^5.6.2",
    "vite": "^5.2.11"
  },
  "engines": {
    "node": ">=20"
  }
}

Node.js version

v20.18.0

Database and its version

PostgreSQL 12.0

Operating system name and version

Debian 11 Bullseye

Browser name

Opera GX

What happended?

I get an error 404 when trying to create a new product, when checking the logs I see this:

error: Sales channel with id: sc_01JCPK6669CBRF5DNCG6D1T9MN not found MedusaError: Sales channel with id: sc_01JCPK6669CBRF5DNCG6D1T9MN not found at GET (/home/node/app/blessed/node_modules/@medusajs/medusa/src/api/admin/sales-channels/[id]/route.ts:28:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) at async /home/node/app/blessed/node_modules/@medusajs/utils/src/common/wrap-handler.ts:17:14 { __isMedusaError: true, type: 'not_found', code: undefined, date: 2024-11-15T00:38:31.242Z } http: GET /admin/sales-channels/sc_01JCPK6669CBRF5DNCG6D1T9MN ← http://portainer.alphatechs.net:9000/app/products/create (404) - 14.379 ms error: Sales channel with id: sc_01JCPK6669CBRF5DNCG6D1T9MN not found MedusaError: Sales channel with id: sc_01JCPK6669CBRF5DNCG6D1T9MN not found at GET (/home/node/app/blessed/node_modules/@medusajs/medusa/src/api/admin/sales-channels/[id]/route.ts:28:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) at async /home/node/app/blessed/node_modules/@medusajs/utils/src/common/wrap-handler.ts:17:14 { __isMedusaError: true, type: 'not_found', code: undefined, date: 2024-11-15T00:38:32.324Z }

Expected behavior

I should be able to create products on to any of the two existing sales channels

Actual behavior

Can't create a new product because apparently the sales channel is missing. (I've deleted the default sales channel and created two new ones).

Link to reproduction repo

working on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant